Перейти до вмісту
← На сайт
Soleri | Docs

CLI Reference

Цей контент ще не доступний вашою мовою.

The Soleri CLI (@soleri/cli) manages agent creation, development, and maintenance.

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

Interactive wizard prompts for: agent name, role, domains, persona voice, hook packs, 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 displays ID, domains, and build status.


Run agent locally in development mode with auto-rebuild.

Terminal window
npx @soleri/cli dev

Starts the MCP server via stdio transport. Watches for file changes and restarts automatically.


Run agent test suite.

Terminal window
npx @soleri/cli test [options]

Options:

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

Runs vitest under the hood. For the monorepo-level E2E test suite, use npm run test:e2e from the project root. See Testing for full details.


Add a knowledge domain to your agent.

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

Creates a new domain facade with 5 ops (get_patterns, search, get_entry, capture, remove) and regenerates the agent’s 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>

Accepts a local path, directory, or npm package name. Resolves npm packages 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

Reports:

  • Node.js version compatibility
  • npm status
  • Agent context (detected project)
  • Vault health
  • CLAUDE.md status
  • Recommendations for fixes

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)

Also creates a global launcher script so the agent can be invoked 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 your agent’s MCP server registration.

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: opencode)

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

Unified pack manager for hooks, skills, knowledge, and domains. See Creating Packs for authoring guide and Domain Packs for built-in packs.

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

Subcommands:

SubcommandDescription
listList installed packs
installInstall a pack from local path, built-in, 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 (built-in and community)
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

Manage skill packs (convenience wrapper for pack --type skills). See Skills Catalog for all available skills.

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 skill-to-hook conversion.

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 reduce LLM token usage by 60-90%
yolo-safetySafety guardrails for YOLO mode (composes from safety)
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

Graduation: Hooks start at remind, graduate to warn then block after validation proves 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 (archive/delete thresholds), auto-capture policy, and current quota usage.


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

Terminal window
npx @soleri/cli yolo [options]

Automatically installs the yolo-safety hook pack (if not already installed), then launches Claude Code with --dangerously-skip-permissions. Safety hooks intercept destructive commands (rm, git push —force, git reset —hard, drop table, 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

Workflow:

  1. soleri telegram enable — generates 4 source files, adds grammy dependency, adds npm scripts
  2. soleri telegram setup — interactive wizard for bot token, LLM provider/key, passphrase, model
  3. npm run telegram:start or npm run telegram:dev — 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 knowledge management.

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. The safety hook pack backs up files here 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

See Customizing Your Agent for detailed configuration guides. For API operations, see API Reference and Capabilities. If something isn’t working, check Troubleshooting.