Skip to content

CLI and slash commands

Two surfaces: what you type in a shell before fox-agent starts, and what you type
at the prompt once it is running. --help is generated from the same tables this
page documents, so the two cannot drift.

fox with no arguments

Opens the TUI in a new session bound to your current directory. On a first visit
it asks whether the directory is trusted — see the
security model.

Launch flags

FlagDoes
-c, --continue [n\|id]Continue a session: latest, a fox ls index, or an id. No argument plus a real terminal opens the picker
--no-tuiPlain streaming mode (same as fox mini)
--trustMark this directory trusted and skip the prompt
-p, --print [prompt]Run one prompt headless, print the answer, exit. Reads stdin when no prompt is given or stdin is piped
--jsonWith -p: emit NDJSON agent events instead of text
--acpServe the Agent Client Protocol on stdio
-h, --helpUsage overview, or one subcommand's help when it follows a subcommand
-v, --versionPrint the version and exit without evaluating the application

--version and --help are answered before the store, the turn loop or any
tool is loaded, so they work in a broken checkout — and stay fast enough to call
from a shell prompt.

Overrides

Each overrides the same config key for this run only. None of them are written
back to a file.

FlagConfig key
--model <id>model
--provider <p>provider
--base-url <u>baseUrl
--max-steps <n>maxSteps
--retry-limit <n>retryLimit
--compact-warn-at <f>compactWarnAt
--compact-ctx-only-at <f>compactCtxOnlyAt
--request-timeout-ms <n>requestTimeoutMs
--config <path>which config file to read

An unknown flag is a hard error naming the flag, the command that rejected it,
and where the full list lives — never a silent ignore.

Subcommands

CommandDoes
fox lsList sessions, most recently worked-in first, across all directories. Pass an index to resume it: fox -c 2
fox plugin [on\|off\|add\|rm\|info <name>]List plugins and switch them without the TUI. Names accept pty, bundled:pty, a plugin's own name, or its path
fox export <id\|current> [file]Pack a session's database into a .zip to move to another device
fox import <file.zip>Install a session exported elsewhere; it lands under its own id
fox share [file]Render a session as one self-contained offline HTML file
fox upgrade [beta\|<version>]Self-update from GitHub releases. --beta takes the newest prerelease
fox miniPlain streaming REPL — no TUI, no markdown
fox jsonSame as --json: NDJSON events
fox acpSame as --acp
fox gatewayWeb chat UI at TUI parity, bound local-only

export, import and share also exist as slash commands inside a session, and
both spellings go through the same implementation.

Slash commands

/help lists these, and the hint popup derives from the same table, so the list
in a session and the list on this page cannot disagree.

Session

CommandDoes
/newStart a fresh session
/sessions, /lsBrowse sessions — switch, fork, delete. Accepts [id\|n] to jump straight there
/fork [N\|id]Fork this session at row N, or another session by id
/delete <id\|n> yesDelete another session for good. Refuses the one you are in
/export [file], /import <file>Move a session as a .zip
/share [file]One offline HTML file — the one to use for showing someone a transcript
/exit, /quitQuit

Context

CommandDoes
/opsShow what surgery ctx has done
/undoRevert the last view op
/viewPreview the visible nodes with role and preview text
/prune [compact] [yes]Reclaim the disk hidden context leaves behind
/todo, /todosThe agent's current task list
/usage, /costToken totals and spend

Configuration

CommandDoes
/model [profile/][name]Show or switch model. The picker lists every logged-in provider's models
/loginProvider credentials — a wizard in the TUI, key=value pairs elsewhere
/thinking [off\|minimal\|low\|medium\|high\|xhigh\|default]Reasoning effort
/theme [name]Color theme; bare opens a searchable chooser
/settings [key[=value]]Scalar config knobs — see below
/plugin [on\|off\|add\|rm\|info]Manage plugins
/reloadRe-read config and re-apply model, theme, caps and plugins
/upgrade [beta\|<version>]Self-update
/init [focus]Analyze the repo and write or update AGENTS.md

/model, /theme and /thinking have their own commands rather than being
/settings keys because each opens a chooser, and each saves globally.

/settings keys

/settings with no argument lists every key with its current value and default.

KeyDefaultRange
maxSteps0>= 0; 0 = unlimited
retryLimit30–20
compactWarnAt0.8(0, 1]
compactCtxOnlyAt0.9(0, 1]
requestTimeoutMs120000>= 0; 0 = never
toolOutputCap30000>= 1000
readCap50000>= 1000
toolPresentationCap60000>= 0; 0 = never truncate
searchLimit500>= 1
searchHiddenfalsebool
sessionListLimit0>= 0; 0 = every session
tuiCollapsedChars240>= 40
tuiKeptChars4000>= 200
tuiScrollStep21–40
tuiScrollbartruebool
tuiFrameMs168–250
statusBarcwd provider model ctxspace-separated segment names
contextMarkerstruebool
diagnosticstruebool
acpHistoryfullfull, last, or a positive integer
/settings                     # list everything
/settings compactWarnAt=0.7   # validated, saved globally, applied live
/settings compactWarnAt=      # reset to the default

statusBar actually accepts cwd provider model ctx readOnly plus any segment a
plugin registers through statusSegments. The cost segment comes from the
bundled cost plugin.

Exit codes

CodeMeaning
0Success — including a headless run that answered
1A usage error (unknown flag or subcommand), a config that fails to parse, or -c in a directory with no history
non-zeroA provider or tool failure surfaced in a headless run