Installation

Install guardian-cli globally to enable AI-assisted code reviews on any Git repository on your machine.

Requirements

Before installing Guardian, make sure your environment meets these prerequisites.

  • Node.js >= 22
  • A Git repository to protect
  • At least one supported provider CLI installed and authenticated

Global Installation

The recommended way to install Guardian is globally via npm. This makes the guardian command available system-wide.

$ npm install -g @ajosecortes/guardian-cli

Verify the installation

Confirm the CLI is available by running:

$ guardian --help

Provider CLIs

Guardian does not call AI APIs directly — it shells out to an installed provider CLI. You must have at least one of the following installed and authenticated before using Guardian.

ProviderCLI nameInstall
ClaudeclaudeSee anthropic.com/claude-code
GeminigeminiSee ai.google.dev/gemini-api/docs
OpenCodeopencodeSee opencode.ai
CodexcodexSee developers.openai.com/codex/quickstart
AntigravityantigravitySee npmjs.com/package/antigravity-cli

Guardian will fail at runtime if the configured provider CLI is not found in PATH.

Local Development

To build from source or contribute to Guardian, clone the repository and install dependencies.

$ git clone https://github.com/JoseCortezz25/guardian.git

$ cd guardian

$ npm install

$ npm run build

Available scripts

ScriptDescription
npm run buildCompile TypeScript to dist/
npm testRun the test suite
npm run test:watchRun tests in watch mode
npm run lintRun ESLint
npm run formatFormat with Prettier