Installation
Start here
Section titled “Start here”If you want the fastest successful first run, start with one local-only command and read the variants below only if you need them:
bunx @lambdacurry/anvil audit --target . --ciIf you are one directory above the repo you want to audit, use --target ./my-repo instead.
Need npx, global anvil, or the full AI-backed lane? The install options below keep those paths, but this is the first command Anvil wants a new user to trust.
Proof-lane note: If you arrived here because someone sent you Anvil’s external first-user proof packet, do not switch to the unpinned commands on this page; they track the latest build, not your pinned proof version. Keep using the exact pinned
bunx @lambdacurry/anvil@<exact-version> ...command from that outreach note for the full proof run.
Prerequisites
Section titled “Prerequisites”- Bun ≥ 1.0
- Node.js ≥ 20 only if you want to launch the published package with
npxinstead ofbunx - A local repo you want to audit (any codebase with CLAUDE.md, AGENTS.md,
.cursor/rules/, or similar AI rule files)
You do not need an AI provider for a successful first run if you use --ci. The full default audit path needs a working provider.
Install options
Section titled “Install options”Zero-install local-only first pass
Section titled “Zero-install local-only first pass”No install step, no provider setup required:
bunx @lambdacurry/anvil audit \ --target ./my-repo \ --ciZero-install full AI-backed audit
Section titled “Zero-install full AI-backed audit”Use this when you already have Claude Code, Codex CLI, Gemini CLI, opencode, or OPENAI_API_KEY available:
bunx @lambdacurry/anvil audit \ --target ./my-reponpm launcher (Bun still required)
Section titled “npm launcher (Bun still required)”Use this only if Bun is already installed and you prefer npx as the launcher:
npx @lambdacurry/anvil audit \ --target ./my-repoGlobal install
Section titled “Global install”bun add -g @lambdacurry/anvilanvil audit --target ./my-repoVerify the CLI
Section titled “Verify the CLI”Use the same launcher you picked above:
bunx @lambdacurry/anvil --helpbunx @lambdacurry/anvil --versionnpx (still launches the Bun-native CLI)
Section titled “npx (still launches the Bun-native CLI)”npx @lambdacurry/anvil --helpnpx @lambdacurry/anvil --versionGlobal install only
Section titled “Global install only”anvil --helpanvil --versionAll commands
Section titled “All commands”Note: If you are using
bunxornpx, keep your chosen launcher prefix when you run these commands. The list below uses the plainanvil [subcommand]form for readability.
anvil audit— Full rule auditanvil drift— Detect drift in rule surfacesanvil bootstrap— Generate starter rules from tech stackanvil mine-pr— Mine PR review comments for rule candidates
Recommended tooling
Section titled “Recommended tooling”The published CLI is Bun-native. npx is an alternate launcher, not a Node-only compatibility lane. These optional tools unlock more of Anvil’s capabilities:
GitHub CLI (gh)
Section titled “GitHub CLI (gh)”Used by mine-pr to fetch PR review comments and cluster recurring feedback into rule candidates.
# installbrew install ghgh auth login
# verifygh auth statusWithout gh: mine-pr falls back to the GitHub API via GITHUB_TOKEN environment variable. With gh installed and authenticated, you get a smoother auth flow and higher rate limits.
AI synthesis (auto-detected)
Section titled “AI synthesis (auto-detected)”The default anvil audit path is the full AI-backed report. Anvil scans the repo locally, then uses a working AI provider for repo-specific improvement suggestions, prioritization, and natural-language explanations.
Use --ci when you want deterministic local-only structural lint instead:
bunx @lambdacurry/anvil audit --target ./my-repo --ciYou can also force a specific provider. Keep the same launcher you already chose:
# bunxbunx @lambdacurry/anvil audit \ --target ./my-repo \ --ai-provider openai
# npx (Bun still required)npx @lambdacurry/anvil audit \ --target ./my-repo \ --ai-provider openai
# global install onlyanvil audit \ --target ./my-repo \ --ai-provider openaiSwap openai for claude-code, codex-cli, gemini-cli, or opencode as needed.
Any installed AI coding CLI works automatically. If you already use Claude Code, Codex, Gemini CLI, or opencode, Anvil can pick it up with zero extra API-key setup.
What you get at each level
Section titled “What you get at each level”Bun installed
Section titled “Bun installed”audit --ci, drift detection, coverage scoring, and bootstrap all work locally with no keys.
Bun installed + gh CLI authenticated
Section titled “Bun installed + gh CLI authenticated”mine-pr gets a smoother auth flow and higher rate limits.
Bun installed + any AI coding CLI on PATH
Section titled “Bun installed + any AI coding CLI on PATH”The full audit path can auto-detect AI synthesis, so you get smarter suggestions with no extra API-key setup.
Bun installed + OPENAI_API_KEY
Section titled “Bun installed + OPENAI_API_KEY”The full audit path can run through OpenAI models directly.
Read First Audit to run your first audit and understand the output. Keep the same launcher you chose above (bunx, npx, or global anvil) when you move to that page.