Skip to main content

Command Reference

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

Shell Commands

Run through Cargo while developing:

cargo run --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.
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.
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.
checkShow Python, platform, ProtoLink readiness, active provider status, and agent manifest.
agentsShow Architect/Explorer/Coder topology and tool isolation.
contextShow Context Loom status for the active project.
context QUERYBuild a source-cited Context Pack without running a model.
`context window [16kauto]`
context historyInspect saved ProtoLink per-agent conversation state.
`context compact [recenttokens
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 refreshRefresh or rebuild the Context Loom SQLite index.
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.
/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 agent topology panel.
/context, /loomShow Context Loom status.
/context QUERYPreview a Context Pack.
`/context window [16kauto]`
/context historyInspect saved ProtoLink histories.
`/context compact [recenttokens
/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.
/project, /openChoose the active project.
/project PATHOpen a project directly.
/project clearClear the active project.
/help, /menuShow help panel and Guide availability.
/help QUESTIONAsk Guide using the active model.
/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.

explain the runtime cancellation path

Use @ to insert tagged file context:

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.