Skip to main content

Command Reference

This page documents the current command surface in cli/src/main.rs and cli/src/terminal_ui.rs.

See Verify & Recover for command approvals and file recovery.

TUI recovery commands are /checkpoints and /undo [id]. Enter submits a prompt; Ctrl-J adds a newline, Tab completes slash commands, and Ctrl-R searches history. Ctrl-L redraws the screen. Scrolling and resize work during replies. Esc/Ctrl-C cancels a run or dismisses background model discovery and runtime checks. Static help and setup controls work without a running model; Guide questions and coding requests require one. See Fullscreen TUI for offline errors and rendering behavior.

Shell Commands​

Run through Cargo while developing:

shell
cargo run --locked --manifest-path cli/Cargo.toml -- <command>

Installed examples use proto-cli <command>.

CommandMeaning
startStart the fullscreen terminal UI. This is also the default when no command is passed.
tuiAlias for fullscreen terminal UI.
cliAlias for fullscreen terminal UI.
terminalAlias for fullscreen terminal UI.
uiAlias for fullscreen terminal UI.
checkpointsList up to 50 native changes with their recovery states, plus up to 50 inspection-only legacy snapshots.
undo [id]Preview and approve restoring one checkpoint; defaults to latest and needs no model.
run "task"Run one task outside fullscreen mode. Requires an active project.
dashboard, dash, statusShow cockpit status, provider strip, agent graph, and hotkeys.
modelsShow detected local/API models and validate API keys.
modelPick the active provider/model interactively.
key [provider]Store an API key for a supported API provider, then optionally choose a model.
configShow redacted provider config.
version, versions, --version, -VShow CLI, Python core, and planned ACP component versions.
projectShow active project and recent projects.
project set PATHSet the active project folder.
project clearClear the active project folder.
project choosePrompt for a project folder.
ls [PATH]List a project directory, including hidden entries; no model.
browse [PATH], files [PATH]Interactive folder navigation and read-only file viewing.
open [FILE]Scrollable text viewer; no path opens the browser.
cat FILEPrint a bounded project text preview; works without a model.
checkShow Python, platform, ProtoLink readiness, active provider status, and agent manifest.
agentsShow the runtime kernel, RunContract, stateful Architect, stateless workers, optional Tester/Scout/MCP state, and tool isolation.
agents profile [auto|small|medium|large|api]Show or set the prompt profile used by Architect, Explorer, and Coder.
agents small, agents medium, agents large, agents apiShorthand for setting the deck prompt profile.
agents scout [on|off]Show, enable, or disable optional Scout. Changes apply to the next run.
eval profiles [--plan|--live] [--profile MODE] [--task ID] [--limit N] [--json]Run the built-in prompt-profile quality eval harness.
eval tasksList built-in quality eval tasks.
eval harness [--json]Run offline native engine-contract cases with scripted actions; no live model.
contextShow Context Loom status for the active project.
context QUERYBuild a source-cited Context Pack without running a model.
context window [16k|auto]Show, set, or clear the Ollama context window override.
context historyInspect saved ProtoLink Architect conversation state.
context compact [recent|tokens|summary] [limit]Compact saved ProtoLink histories and trim the Rust session index.
context resetClear ProtoLink histories for the project session and trim Rust UI turns to zero.
context onEnable persistent project conversation memory.
context offUse task-local ProtoLink sessions until memory is turned on again.
index refreshRun an incremental Context Loom SQLite index refresh.
sessionsShow saved project sessions and recent turns.
helpShow static CLI help.
help "question"Ask the isolated Guide agent about ProtoAgent usage.

Fullscreen Slash Commands​

Slash commands are handled inside cli/src/terminal_ui.rs.

CommandMeaning
/quit, /exitLeave the TUI.
/clearClear the visible transcript.
/ls [PATH]List one project directory, including hidden files.
/browse [PATH], /files [PATH]Navigate folders, filter entries and open text files.
/open [FILE]Open the read-only viewer; no path opens the browser. Use /project to choose a workspace.
/cat FILEDisplay a bounded text preview directly in the transcript. Quote paths with spaces.
/dashboard, /dash, /statusPin the dashboard panel.
/modelsPin the model inventory panel and refresh model status.
/models choose, /models set, /models selectOpen model selection.
/model, /providerOpen provider/model selection.
/key [provider]Store an API key through a masked modal.
/agentsPin the Agents panel; shows required roles, prompt profile, all optional-worker ON/OFF states and their toggle commands.
/agents profile [auto|small|medium|large|api]Show or set the deck prompt profile.
/agents small, /agents medium, /agents large, /agents apiShorthand for changing prompt profile.
/agents scout [on|off]Show or change optional Scout for subsequent runs.
/context, /loomShow Context Loom status.
/context QUERYPreview a Context Pack.
/context window [16k|auto]Show or change context window settings.
/context historyInspect saved ProtoLink histories.
/context compact [recent|tokens|summary] [limit]Compact saved model-facing histories.
/context resetReset saved ProtoLink histories for the active project session.
/context onEnable persistent conversation memory.
/context offUse task-local memory.
/context memoryShow current memory mode.
/index refreshRefresh Context Loom index.
/sessions, /sessionShow saved sessions.
/sessions choose, /session resumeReopen a saved session's workspace.
/session rename NAMERename the current saved UI session.
/timeline, /flowShow the structured path of the latest agent run.
/traceShow the latest normalized ProtoLink trace.
/diffReopen the latest proposed diff or approval preview in the styled review modal.
/diff rawPrint a truncated raw diff into the transcript.
/configPin provider config panel.
/debug [on|off]Show the current debug display mode, reveal response metadata with a /trace hint, or hide it. Defaults off for each TUI session.
/version, /versionsShow CLI, Python core, and planned ACP component versions.
/projectChoose the active project.
/project PATHOpen a project directly.
/project clearClear the active project.
/help, /menuShow help panel and Guide availability.
/help QUESTIONStream a Guide answer using the active model and bundled command reference, without needing a project. Esc/Ctrl-C cancels.
/checkRefresh runtime diagnostics.
/lastReplay the last response in the current TUI process.
/run TASKRun a task from a slash command.

Non-Slash Input​

Any non-empty input that does not start with / runs as a task. The TUI requires an active project before dispatching the request.

terminal
explain the runtime cancellation path

Use @ to insert tagged file context:

terminal
explain @core/protoagent_core/runtime.py and @cli/src/progress.rs

Tagged context is loaded before Context Loom and is treated as bounded read-only evidence unless the user explicitly asks for modifications.

Compaction Syntax​

/context compact defaults to token compaction. Supported forms:

FormEffect
/context compactCompact each agent history to the default token budget.
/context compact tokens 4000Keep each agent history under roughly 4000 estimated tokens.
/context compact recent 8Keep a recent-message boundary.
/context compact summary 6Use ProtoLink summary strategy preserving recent messages.
/context compact 3Legacy shorthand: keep about three recent UI turns in the Rust ledger and use recent-history compaction.

Exit And Cancellation​

KeyContextEffect
EscTUI idleOpens the exit confirmation modal.
Ctrl-CTUI idleExits the TUI.
EscTask runningWrites a cancellation request for the Python bridge.
Ctrl-CTask runningSame as Esc: requests cancellation.
Ctrl-DInput emptyExits the TUI.

Task cancellation is best-effort and uses ProtoLink's task control path. If a task is already terminal, the runtime reports that cancellation arrived too late.

Coding evaluation​

proto-cli eval coding prints a planned comparison by default. Add --live to run disposable coding exercises with the current model and an independent oracle:

shell
proto-cli eval coding --plan --json
proto-cli eval coding --live --profile small --task empty-average --json

Each exercise runs both the normal deck and a single-agent baseline. Live mode approves only fixture edits and the exact fixture check; generated code runs on the host. See Quality Evals for scoring and limits.

Optional workers and MCP setup​

Shell commandTUI equivalentPurpose
proto-cli agents tester on/off/agents tester on/offTest design on by default; off removes the model worker without skipping required checks.
proto-cli agents mcp on/off/agents mcp on/offModel-free broker, off by default.
proto-cli mcp/mcpStatus/setup guidance without connecting.
proto-cli mcp add NAME FILE.json/mcp add NAME FILE.jsonImport a named server and exact tool allowlist; does not connect or enable.
proto-cli mcp test NAME/mcp test NAMEExplicit connection/discovery, never server tool invocation.
proto-cli mcp tools NAME TOOL/mcp tools NAME TOOLInspect one original input schema.
proto-cli mcp on/off/mcp on/offSame toggle as agents mcp.
proto-cli mcp remove NAME/mcp remove NAMERemove one saved server.

Use on or off as separate commands, not the literal string on/off. Changes are user-wide and apply to the next run. Architect, Explorer, Coder and Verifier cannot be disabled. Quote paths containing spaces. See MCP Broker for config examples, authentication and runtime approval/effect boundaries.