CLI Reference
The savants CLI is a single binary with 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. This page covers the commands most people use; savants --help lists all of them, and savants <command> --help documents each one.
CLI vs. npm package: The CLI gives your LLM code intelligence tools (semantic search, error diagnosis). 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 mcp install | Register MCP tools with your IDE |
savants search <query> | Semantic code search across all indexed repos |
savants files | List every indexed file with its function count — what troubleshooting tells you to run to confirm indexing worked |
savants skeleton <file> | Show file structure: functions, classes, types (no bodies) |
savants callers <function> | Find all callers of a function |
savants xray <function> | Full structural profile of a function (params, callers, callees, source) |
savants blast <function> | Show blast radius: what breaks if you change a function |
Infrastructure
| Command | Description |
|---|---|
savants up | Build the local index and report infrastructure problems — run this FIRST; the code-intelligence commands below fail without it |
savants doctor | Check the things that break silently; exits non-zero on failure |
savants story | Full diagnosis narrative of your infrastructure |
savants status | Show graph stats and service health |
savants serve | Start the MCP server (Claude Code / Cursor) |
Guard Commands
Install a profile
# A community profile
savants guard install nixos-safe
# A cloud profile, pinned to a major version
savants guard install @acme/backend-safe@^1 | Command | Description |
|---|---|
savants guard add "<rule>" | Add a guard rule in DSL |
savants guard list | List all active guards |
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 | Show the last blocked event and the rule that fired |
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" More guard commands
| Command | Description |
|---|---|
savants guard preset <profiles> | Set active profiles (e.g. standard+secrets) |
savants guard install <source> | Install a profile (@user/name, community, or URL) |
savants guard status | Show guard state (active/paused/inactive) |
savants guard off [duration] | Pause guard (e.g. off 10m); `on` resumes |
savants guard add <rule> | Add a custom guard rule |
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