Skip to content

CLI

Install with npm install -g sparse-cli (Node 24 or later). cr is a short alias for sparse.

Command What it does
sparse Start the interactive REPL (same as sparse repl). --fullscreen uses a fixed-input full-screen renderer.
sparse run <prompt> Run one prompt non-interactively.
sparse agent [prompt] Run in Agent mode. Also plan, debug, review and orchestrate.
sparse route <prompt> Classify a prompt and show the chosen route without running it. --explain adds the difficulty, policy, value breakdown and runners-up.
sparse lead [model] Pin the Lead model. off clears it.
sparse workhorse [model] Pin the Workhorse model. off clears it.
sparse logs [runId] List recent runs, or show the full decision timeline for one. -n sets how many runs to list.
sparse loop [request] Describe an outcome; Sparse generates a verified loop. Previews the spec unless you pass --run.
sparse memory <action> Inspect or manage persistent memory: show, forget, reset, export, import.
sparse trust [action] Trust this repo’s instruction files. Actions: list, status, revoke.
sparse untrust Stop trusting this repo’s instruction files.
sparse mcp <action> Serve Sparse over MCP (serve) or manage the external MCP servers the agent connects to. See MCP.
sparse app Open the desktop app, starting the daemon if needed. --settings opens Settings.
sparse daemon Run the persistent app server that supervises loops and serves the app. -p sets the preferred port.
sparse init First-run onboarding: detect a host agent, install MCP, write config.
sparse telemetry [action] Opt-in routing telemetry for testers: status, on, off, preview, sync.
Option What it does
-m, --mode <mode> plan, agent, orchestrate, debug or review. run only; defaults to agent.
-e, --effort <effort> low, medium, high or max. Defaults to medium (high for orchestrate).
-r, --route <route> Force a route, as provider,model. run only.
--fast Skip the classifier, context gathering and validators.
--apply Apply the diff to the working tree on success.
--trust Trust this repo so its instruction files load. Headless runs are untrusted by default.
--json Print the report as JSON.
-c, --cwd <path> Working directory. Most commands accept it.
Option What it does
--preset <preset> safe (default), aggressive, ci-repair or migration.
--run Execute the generated loop instead of only previewing it.
--apply Merge changes without pausing for approval.
--max-iterations <n> Override the iteration cap.