CLI Reference
The savants CLI is a single binary with 37 MCP tools for code intelligence, guard management, and infrastructure monitoring. Zero dependencies — no bash, no Python, no runtime needed. Works on macOS, Linux (including NixOS), and Windows.
CLI vs. npm package: The CLI gives your LLM code intelligence tools (semantic search, error diagnosis, blast radius). The npm package (@savants.dev/guard) adds guardrails to your AI agent code. You can use both together or independently.
Install
# macOS / Linux
curl -fsSL savants.sh | sh
# Windows (PowerShell)
irm releases.savants.dev/latest/install.ps1 | iex Code Intelligence
These tools help your LLM understand your codebase. They run as an MCP server for Claude Code, Cursor, and Windsurf.
| Command | Description |
|---|---|
savants up | Start the MCP server (auto-detects repos, clusters) |
savants mcp install | Register MCP tools with your IDE |
savants diagnose <error> | Trace error to root cause with source context |
savants search <query> | Semantic code search across all indexed repos |
savants callers <function> | Find all callers of a function (recursive) |
savants blast-radius <file> | Show impact of changing a file |
Profile Commands
| Command | Description |
|---|---|
savants profile install <slug> | Install a profile from the registry |
savants profile search <query> | Search the registry |
savants profile publish <dir> | Publish your profile to the registry |
savants profile info <slug> | Show profile details |
Install a profile
savants profile install @savants/ai-agent-guardrails
# Output:
# ✓ Schema loaded: agent-action (6 states, 7 transitions)
# ✓ Guard set: block destructive actions in production
# ✓ Guard set: require approval for send actions
# ✓ Profile applied successfully Guard Commands
| Command | Description |
|---|---|
savants guard add "<rule>" | Add a guard rule in DSL |
savants guard list | List all active guards |
savants guard test "<rule>" --context '...' | Test a guard with sample data |
savants guard remove <id> | Remove a guard |
savants guard share <name> --version <ver> | Publish a guard profile to the cloud |
savants guard browse | Browse popular guard profiles |
savants guard update [name] | Update installed profiles (or --check for dry run) |
savants guard pin <name> <version> | Pin a profile to an exact version |
savants guard versions <name> | List all available versions of a profile |
savants guard rollback <name> | Roll back a profile to its previous version |
savants guard why <rule-id> | Explain why a guard rule exists and when it fires |
savants guard sync push | Push local guard rules to the cloud |
savants guard sync pull | Pull guard rules from the cloud to this machine |
Add a guard
savants guard add "when action contains 'delete' and env eq 'production' then block" Test a guard
savants guard test "when spend gt 100 then block" --context '{"spend": 150}'
# Output:
# ✓ Guard FIRED → action: block
# Context: spend=150, threshold=100 Monitor Commands
| Command | Description |
|---|---|
savants monitor start | Start infrastructure monitoring |
savants monitor status | Show current entity states |
savants monitor history <entity> | Show transition log for an entity |
General Commands
| Command | Description |
|---|---|
savants update | Update Savants to the latest version |
savants connect | Connect to Savants Cloud |
savants reindex | Re-index the current codebase |
Configuration
Telemetry
Savants collects privacy-respecting, anonymous usage telemetry to improve the product. No code, file paths, or personal data is ever sent. You can opt out at any time:
# Check current telemetry status
savants config telemetry status
# Opt out of telemetry
savants config telemetry off
# Opt back in
savants config telemetry on You can also set the environment variable DO_NOT_TRACK=1 to disable telemetry without running a command.
Uninstall
# macOS / Linux
curl -fsSL releases.savants.dev/latest/uninstall.sh | sh
# Windows (PowerShell)
irm releases.savants.dev/latest/uninstall.ps1 | iex