Install

Run Warden from a local clone, check your setup, and get a first deterministic result.

Warden isn't on npm yet, so you run it from a clone of the repository. Setup takes a few minutes, and the first useful command needs no API key.

What you need

Clone and build

git clone https://github.com/99Yash/warden.git
cd warden
pnpm install
pnpm build

Inside the clone, pnpm warden <command> runs the CLI. The examples below use that form.

Check your setup

pnpm warden setup

setup creates a global config at ~/.config/warden/config.jsonc and a template for secrets at ~/.config/warden/env. Then it reports which providers are ready. To get the report without writing anything, run pnpm warden setup --check. If you want settings for one repository only, pnpm warden setup project writes a warden.jsonc there.

Config files can name the environment variable that holds a key, but they never hold the key itself. Keys come from your shell, your secret manager, or an env file. See Configuration for the order Warden reads them in.

Run the deterministic check

pnpm warden check

check runs every deterministic tool against the diff and stops there: TypeScript, ESLint, npm audit confirmed against OSV, duplication, Warden's detectors, and the scans of added lines. It makes no model call and needs no key, so it's a good first command and a safe CI gate. Add --json for the typed output.

By default check looks at your uncommitted changes. To check a whole branch, pass --base main, or any other ref, and Warden diffs from the merge-base.

Which keys you need

Most commands need no key from Warden at all. On the OpenCode path, the model belongs to OpenCode, so the model key does too.

CommandNeeds
warden checkNothing
warden mcpNothing
warden opencode-reviewNothing from Warden. OpenCode needs its own model credentials.
warden post-passNothing
warden initVOYAGE_API_KEY, for embeddings
warden reviewANTHROPIC_API_KEY or OPENAI_API_KEY. VOYAGE_API_KEY improves context selection.

Build the context index (optional)

pnpm warden init

init chunks your repository and embeds it with Voyage voyage-code-3, which lets warden review pick relevant code from outside the diff. The index lives in .warden/cache.sqlite. That file is gitignored and safe to delete, and running init again rebuilds it. Re-runs only embed what changed. To see the cost estimate without spending anything, use --dry-run. To set a ceiling, use --max-cost <usd>.

The OpenCode path doesn't use the index yet. A search_index tool is planned (#44).

Next

Connect OpenCode to run your first review lane.