Skip to content
← Back to site
Soleri | Docs

CLI Reference

The Soleri CLI (@soleri/cli) is how you create, develop, and maintain agents.

The CLI is available via npx (no install needed) or as a dev dependency:

Terminal window
npx @soleri/cli <command>

Scaffold a new agent project.

Terminal window
npx @soleri/cli create [name]

Options:

FlagDescription
[name]Agent name (prompted if omitted)
-c, --config <path>Path to JSON config file (skip interactive prompts)
--setup-target <target>Editor target: claude, opencode, codex, both, all
-y, --yesSkip confirmation prompts (use with --config for fully non-interactive)
--dir <path>Parent directory for the agent (default: current directory)
--filetreeCreate a file-tree agent (v7, no TypeScript, no build step, default)
--legacyCreate a legacy TypeScript agent (v6, requires npm install + build)
--no-gitSkip git repository initialization

If you skip the flags, the interactive wizard walks you through agent name, role, domains, persona voice, hook packs, and git remote setup.

Example:

Terminal window
npx @soleri/cli create sentinel
# or use the npm create shorthand:
npm create soleri sentinel
# Non-interactive with config file:
npx @soleri/cli create --config agent.json -y
# Quick defaults (Italian Craftsperson persona):
npx @soleri/cli create my-agent -y
# File-tree agent for OpenCode:
npx @soleri/cli create my-agent --setup-target opencode

Show agents in a directory.

Terminal window
npx @soleri/cli list [dir]

Scans for agent projects and shows their ID, domains, and build status.


Run the agent locally in dev mode with auto-rebuild.

Terminal window
npx @soleri/cli dev

Starts the MCP server via stdio transport, watches for file changes, and restarts when you save.


Run agent test suite.

Terminal window
npx @soleri/cli test [options]

Options:

FlagDescription
--watchRe-run tests on file changes
--coverageGenerate coverage report

Uses vitest under the hood. For monorepo-level E2E tests, run npm run test:e2e from the project root. See Testing for more.


Add a knowledge domain to your agent.

Terminal window
npx @soleri/cli add-domain <domain>

Creates a domain facade with 5 ops (get_patterns, search, get_entry, capture, remove) and regenerates the facade registry.

Example:

Terminal window
npx @soleri/cli add-domain security
npx @soleri/cli add-domain infrastructure

Import a knowledge bundle into the agent’s vault.

Terminal window
npx @soleri/cli install-knowledge <pack>

Takes a local path, directory, or npm package name. npm packages resolve as @soleri/knowledge-{name}.

Options:

FlagDescription
--no-facadesSkip facade generation for new domains

Example:

Terminal window
npx @soleri/cli install-knowledge ./bundles/react-patterns
npx @soleri/cli install-knowledge react-hooks

System health check.

Terminal window
npx @soleri/cli doctor

Checks Node.js version, npm status, agent context, vault health, and CLAUDE.md status. Gives you fix recommendations if anything looks off.


Register your agent as an MCP server in your AI editor.

Terminal window
npx @soleri/cli install [dir]

Arguments:

ArgumentDescription
[dir]Agent directory or agent name (checks ~/.soleri/<name> first, then cwd)

Options:

FlagDescription
--target <target>Registration target: claude, opencode, codex, both, all (default: claude)
--verifyVerify the install chain (config, engine, agent.yaml)

Also creates a global launcher script so you can invoke the agent by name from any directory.

Example:

Terminal window
npx @soleri/cli install
npx @soleri/cli install ernesto --target all
npx @soleri/cli install ./my-agent --target opencode

Remove the agent’s MCP server registration, or nuke everything with --full.

Terminal window
npx @soleri/cli uninstall [dir]

Arguments:

ArgumentDescription
[dir]Agent directory (defaults to cwd)

Options:

FlagDescription
--target <target>Registration target: claude, opencode, codex, both, all (default: all)
--fullRemove all agent artifacts (project, data, configs, permissions, launcher)
--dry-runShow what would be removed without making changes
--forceSkip confirmation prompt

Example:

Terminal window
npx @soleri/cli uninstall
npx @soleri/cli uninstall --target claude
npx @soleri/cli uninstall --full --dry-run
npx @soleri/cli uninstall ./my-agent --full --force

Agent lifecycle management.

Terminal window
npx @soleri/cli agent <subcommand>

Subcommands:

SubcommandDescription
statusShow agent health: version, packs, vault, and update availability
updateUpdate agent engine to latest compatible version
refreshRegenerate CLAUDE.md, _engine.md, and sync skills from latest templates
diffShow drift between agent templates and latest engine templates
capabilitiesList all capabilities declared by installed packs
validateValidate flow capability requirements against installed packs
migrateMove agent data from ~/.{agentId}/ to ~/.soleri/{agentId}/

agent status options:

FlagDescription
--jsonOutput as JSON

agent update options:

FlagDescription
--checkShow what would change without updating
--dry-runPreview migration steps

agent refresh options:

FlagDescription
--dry-runPreview what would change without writing
--skip-skillsSkip skill sync (only regenerate activation files)

agent migrate usage:

Terminal window
npx @soleri/cli agent migrate <agentId>
FlagDescription
--dry-runPreview what would be moved without executing

One command to manage hooks, skills, knowledge, and domain packs. See Creating Packs for how to build your own and Domain Packs for community packs.

Terminal window
npx @soleri/cli pack <subcommand> [options]

Subcommands:

SubcommandDescription
listList installed packs
installInstall a pack from local path or npm
removeRemove an installed pack
infoShow detailed info about an installed pack
outdatedCheck for packs with available updates on npm
updateUpdate installed packs to latest compatible version
searchSearch for packs on the npm registry
availableList available knowledge packs
registryList packs from the Soleri pack registry
addInstall a pack from the registry by name
createScaffold a new pack project (interactive wizard)
validateValidate a pack before publishing
publishPublish pack to npm registry

pack list options:

FlagDescription
--type <type>Filter by pack type: hooks, skills, knowledge, domain, bundle
--tier <tier>Filter by tier: default, community, premium

pack install options:

FlagDescription
--type <type>Expected pack type
--version <ver>Specific version to install
--frozenFail if pack is not in lockfile (CI mode)

pack update options:

FlagDescription
--checkShow outdated packs without updating (dry run)
--forceForce update even if version is incompatible

pack publish options:

FlagDescription
--dry-runShow what would be published without publishing

Example:

Terminal window
npx @soleri/cli pack list
npx @soleri/cli pack install react-patterns --version 2.0.0
npx @soleri/cli pack info react-patterns
npx @soleri/cli pack outdated
npx @soleri/cli pack update
npx @soleri/cli pack search react
npx @soleri/cli pack create
npx @soleri/cli pack validate ./my-pack
npx @soleri/cli pack publish ./my-pack --dry-run
npx @soleri/cli pack remove react-patterns

Convenience wrapper for pack --type skills. See Skills Catalog for what’s available.

Terminal window
npx @soleri/cli skills <subcommand>

Subcommands:

SubcommandDescription
listList installed skill packs
installInstall a skill pack
removeRemove a skill pack
infoShow info about a skill pack

skills list options:

FlagDescription
--trustShow trust level, source, and compatibility for each pack

skills install options:

FlagDescription
--version <ver>Specific version to install

Example:

Terminal window
npx @soleri/cli skills list --trust
npx @soleri/cli skills install my-skills --version 1.0.0
npx @soleri/cli skills info my-skills
npx @soleri/cli skills remove my-skills

Manage editor hooks, hook packs, and convert skills into hooks.

Terminal window
# Editor hooks
npx @soleri/cli hooks add <editor>
npx @soleri/cli hooks remove <editor>
npx @soleri/cli hooks list
# Hook packs
npx @soleri/cli hooks add-pack <pack>
npx @soleri/cli hooks remove-pack <pack>
npx @soleri/cli hooks upgrade-pack <pack>
npx @soleri/cli hooks list-packs
# Skill-to-hook conversion
npx @soleri/cli hooks convert <name> --event <event> --message <text> [options]
npx @soleri/cli hooks test <pack>
npx @soleri/cli hooks promote <pack>
npx @soleri/cli hooks demote <pack>

Editors: claude-code, cursor, vscode, neovim

Hook Packs:

PackDescription
safetyAnti-deletion staging: backs up files before rm, blocks force push/reset
flock-guardParallel agent lock, prevents lockfile corruption in worktrees
clean-commitsNo AI attribution in git commits
typescript-safetyBlock any types and console.log
css-disciplineNo !important, no inline styles
a11yAccessibility: semantic HTML, focus rings, touch targets
rtkRTK token compression: rewrites shell commands through RTK to cut LLM token usage by 60-90%
yolo-safetySafety guardrails for YOLO mode, composes from safety
oxlintRuns oxlint on edited TS/JS files after every Edit/Write
terse-autoAuto-activates terse mode on session start for token-efficient output
worktree-cleanupCleans stale worktree dirs on session start, orphaned branches after subagent completion
marketing-researchExample: auto-research for marketing files
fullAll quality + safety hooks combined

Convert Options:

FlagDescriptionRequired
--event <event>Hook event: PreToolUse, PostToolUse, PreCompact, Notification, StopYes
--message <text>Context message when hook firesYes
--matcher <tools>Tool name matcher (e.g., “Write|Edit”)No
--pattern <globs...>File glob patterns to matchNo
--action <level>Action level: remind (default), warn, blockNo
--projectOutput to project dir instead of built-inNo

Hooks start at remind and graduate to warn, then block once you’ve confirmed zero false positives.


View or set vault governance policies.

Terminal window
npx @soleri/cli governance [options]

Options:

FlagDescription
--preset <name>Apply a preset: strict, moderate, permissive
--showDisplay current governance settings

Shows quotas (max entries total, per category, per type), retention settings, auto-capture policy, and current quota usage.


Launch Claude Code in YOLO mode with safety guardrails. See YOLO Mode for the full guide.

Terminal window
npx @soleri/cli yolo [options]

Installs the yolo-safety hook pack if needed, then launches Claude Code with --dangerously-skip-permissions. The safety hooks intercept destructive commands like rm, git push --force, git reset --hard, drop table, and docker rm.

Options:

FlagDescription
--dry-runShow what would happen without launching Claude
--projectInstall safety hooks to project .claude/ instead of global ~/.claude/

Example:

Terminal window
npx @soleri/cli yolo
npx @soleri/cli yolo --dry-run
npx @soleri/cli yolo --project

Manage Telegram transport for the current agent. See Telegram Integration for full guide.

Terminal window
npx @soleri/cli telegram <subcommand>

Subcommands:

SubcommandDescription
enableAdd Telegram transport files to the current agent
disableRemove Telegram transport from the current agent
setupInteractive configuration wizard (bot token, API key, model)
statusCheck Telegram configuration status

Typical workflow:

  1. soleri telegram enable generates source files, adds the grammy dependency, and wires up npm scripts
  2. soleri telegram setup walks you through bot token, LLM provider/key, passphrase, and model
  3. npm run telegram:start or npm run telegram:dev to run the bot

Example:

Terminal window
npx @soleri/cli telegram enable
npx @soleri/cli telegram setup
npx @soleri/cli telegram status
npx @soleri/cli telegram disable

Vault management from the command line.

Terminal window
npx @soleri/cli vault <subcommand>

Subcommands:

SubcommandDescription
exportExport vault entries as browsable markdown files

vault export options:

FlagDescription
--path <dir>Output directory (default: ./knowledge/)
--domain <name>Filter by domain

Example:

Terminal window
npx @soleri/cli vault export
npx @soleri/cli vault export --path ~/obsidian
npx @soleri/cli vault export --domain architecture

Manage the anti-deletion staging folder where the safety hook pack backs up files before destructive operations.

Terminal window
npx @soleri/cli staging <subcommand>

Subcommands:

SubcommandDescription
listShow staged files with timestamps
restoreRestore files from a staging snapshot to their original locations
cleanRemove staging backups older than 7 days (or --all)
cleanupCheck for and remove stale staging backups

staging restore usage:

Terminal window
npx @soleri/cli staging restore <id>

staging clean options:

FlagDescription
--older-than <duration>Only remove snapshots older than duration (default: 7d)
--allRemove all snapshots regardless of age
--dry-runShow what would be removed without deleting

staging cleanup options:

FlagDescription
--older-than <duration>Max age for stale entries (default: 7d)
--yesSkip confirmation prompt

Duration format: 7d (days), 24h (hours), 30m (minutes).

Example:

Terminal window
npx @soleri/cli staging list
npx @soleri/cli staging restore 1711900000000
npx @soleri/cli staging clean --older-than 3d
npx @soleri/cli staging clean --all --dry-run
npx @soleri/cli staging cleanup --yes


Check for and perform CLI upgrades.

Terminal window
npx @soleri/cli upgrade [options]

Options:

FlagDescription
--checkCheck for updates without installing

Clean up orphaned brain sessions that were started but never completed.

Terminal window
npx @soleri/cli brain <subcommand>

Subcommands:

SubcommandDescription
close-orphansClose orphaned brain sessions that were never completed

brain close-orphans options:

FlagDescription
--max-age <duration>Close sessions older than this age (default: 1h). Format: 1h, 30m, 90s

Example:

Terminal window
npx @soleri/cli brain close-orphans
npx @soleri/cli brain close-orphans --max-age 2h

Vault memory consolidation: deduplication, stale entry archival, and contradiction detection.

Terminal window
npx @soleri/cli dream [subcommand]

Running soleri dream with no subcommand triggers an immediate pass.

Subcommands:

SubcommandDescription
runRun a dream pass immediately (default)
scheduleSchedule a daily dream cron job
unscheduleRemove the dream cron entry
statusShow dream status and cron info

dream schedule options:

FlagDescription
--time <HH:MM>Time to run in 24h format (default: 22:00)

Example:

Terminal window
npx @soleri/cli dream
npx @soleri/cli dream schedule --time 03:00
npx @soleri/cli dream unschedule
npx @soleri/cli dream status

Start an interactive terminal chat with your agent. Spawns the MCP server, connects via stdio, and runs a REPL using the Claude API.

Terminal window
npx @soleri/cli chat [options]

Requires ANTHROPIC_API_KEY environment variable or a key stored in ~/.soleri/<agentId>/keys.json.

Options:

FlagDescription
--model <model>Claude model to use (default: claude-sonnet-4-20250514)
--no-toolsDisable MCP tools (plain conversation)

Example:

Terminal window
npx @soleri/cli chat
npx @soleri/cli chat --model claude-sonnet-4-20250514
npx @soleri/cli chat --no-tools

Manage scheduled agent tasks. Each task runs on a cron schedule and executes a prompt via claude -p when it fires.

Terminal window
npx @soleri/cli schedule <subcommand>

Subcommands:

SubcommandDescription
createCreate a new scheduled task
listList all scheduled tasks
deleteDelete a scheduled task
pausePause a scheduled task without deleting it
resumeResume a paused scheduled task

schedule create options:

FlagDescriptionRequired
--name <name>Task name (unique per agent)Yes
--cron <expr>Cron expression (5-field, minimum 1-hour interval)Yes
--prompt <text>Prompt passed to claude -p when task firesYes
--project-dir <path>Agent project directory (default: current directory)No

schedule delete / pause / resume options:

FlagDescriptionRequired
--id <id>Task IDYes

Example:

Terminal window
npx @soleri/cli schedule create --name nightly-dream --cron "0 2 * * *" --prompt "run dream"
npx @soleri/cli schedule list
npx @soleri/cli schedule pause --id abc123
npx @soleri/cli schedule resume --id abc123
npx @soleri/cli schedule delete --id abc123

Export vault entries as portable knowledge bundle JSON.

Terminal window
npx @soleri/cli knowledge <subcommand>

Subcommands:

SubcommandDescription
exportExport vault entries to knowledge bundle JSON files

knowledge export options:

FlagDescription
--domain <name>Export a specific domain
--allExport all domains
--min-score <number>Minimum quality score threshold, 0-1 (default: 0)
--output <dir>Output directory (default: ./knowledge/)

Either --domain or --all is required.

Example:

Terminal window
npx @soleri/cli knowledge export --domain architecture
npx @soleri/cli knowledge export --all
npx @soleri/cli knowledge export --all --min-score 0.5 --output ~/bundles

Validate SKILL.md op-call examples against the engine’s Zod schemas. Scans skill files, extracts inline op-call examples, and checks params against facade schemas. Exits with code 1 on mismatches.

Terminal window
npx @soleri/cli validate-skills [options]

Options:

FlagDescription
--skills-dir <path>Path to skills directory (default: ~/.claude/skills)

Example:

Terminal window
npx @soleri/cli validate-skills
npx @soleri/cli validate-skills --skills-dir ./my-skills


Update the Soleri CLI to the latest version from npm.

Terminal window
npx @soleri/cli update

Compares your installed version against the latest on npm and runs npm install -g @soleri/cli@latest if an update is available.


See also: Customizing Your Agent, API Reference, Capabilities, Troubleshooting.