Skip to main content
The anvil CLI is the primary entry point for all Anvil development workflows. Once you install the package, the anvil command is available in your project’s node_modules/.bin and, when using a package manager with bin hoisting, on your PATH. Every workflow — scaffolding, local development, production builds, MCP serving, linting, evaluations, and trace replay — runs through this single binary.

Commands at a glance

Explore each command

anvil init

Scaffold a new project — pick a basic API, MCP server, or agent route template.

anvil dev

Start the live-reload development server with file watching and instant route hot-reloading.

anvil build

Generate the route manifest and bundle a self-contained production server.

anvil start

Run the production bundle created by anvil build, with optional port override.

anvil mcp

Expose your routes as an MCP tool server over HTTP or stdio for AI agents and Claude Desktop.

anvil lint

Catch param mismatches and lossy MCP schemas at compile time, before a broken deploy.

anvil eval

Run deterministic and LLM-as-judge assertions against agent routes in a reproducible suite.

anvil replay

Replay a captured trace locally with no live model calls to debug production failures.

Installation

The CLI is included in the main anvil package — no separate install is needed.
Run any command via your package manager’s script runner:
Anvil requires Node.js ≥ 20. All CLI commands are ESM-native and use the Node.js --input-type=module environment automatically.