Skip to content

Command reference ​

The CLI is the local-agent command (see Install; from a checkout, bun run dev takes the same flags). It has one command surface: startup flags. There are no subcommands. Run local-agent --help for the authoritative short list.

CLI flags ​

FlagSemantics
-h, --helpPrint help and exit
--versionPrint the CLI version and exit
--model MODELOllama model. Default qwen3.5:4b-q4_K_M or LOCAL_AGENT_MODEL; the flag overrides the environment. The default is the smallest model that passed the agent battery reliably
--think on|offForce thinking on or off; LOCAL_AGENT_THINK=1|0 is equivalent. Unset means the model default
--context NContext tokens for local Ollama, or LOCAL_AGENT_CONTEXT; 32768 and 32k both work. Cannot exceed the model's native context. Default: planned from the model and the machine's memory, at most 32768 (see Ollama models). Chalupa negotiates its own context
-p, --prompt PROMPTRun one prompt; implies headless mode
--mode fullscreen|inline|headlessRun mode; default fullscreen
--ui vue|tuimarkClient. tuimark is the default on macOS/Linux, vue on Windows; tuimark is rejected on Windows
--theme NAMEdark, light, auto, or a named theme such as midnight, catppuccin-mocha, tokyo-night, nord or dracula (all themes). Tuimark client only
--jsonEmit NDJSON events on stdout in headless mode; implies headless
--workspace PATHWorkspace directory; default is the current working directory
--intent plan|build|chatStarting intent; default build, which asks before each edit or command. plan refuses edits, writes, commands and MCP calls; chat refuses edits, writes and commands but keeps MCP calls, each behind its approval (Modes)
--approve-editsHeadless only: allow file edits and writes
--approve-commandsHeadless only: allow command execution with your permissions
--sandbox-commandsmacOS: run commands in the sandbox without asking: no network, writes only in the workspace, no reads in the home folder beyond toolchains (see Sandboxed commands). Headless, no command runs outside it: deny and ask rules refuse, allow rules run confined; a command that names a path the workspace treats as secret is refused. In the Tuimark client, starts with /sandbox on
--sandbox-loopbackWith --sandbox-commands: confined commands may also use TCP to this machine, in and out, so a test can start its own server and reach a local service. It opens every local port (Ollama and any other local server included), and a server a command starts may be reachable from your network; connecting to another host is refused, measured against the router and the internet (see Loopback). In the Tuimark client, starts with /sandbox loopback
--approve-mcpHeadless only: allow configured MCP tool calls
--receipt FILEHeadless, Chalupa profile only: write the turn's receipt to FILE for chalupa inference report, whether the turn succeeds or not (see Turn receipts)
--run-id IDWith --receipt: the run ID the receipt names, 1–128 letters, digits, ., _, : or -. Default: a new UUID
--mcp-config PATHTrusted JSON array of MCP servers, instead of your own ~/.config/local-agent/mcp.json (loaded by default when it exists). At most 1 MB and 16 servers; server names must be unique
--no-mcpStart without your own mcp.json
--session-db PATHOpt into experimental durable sessions in a separate database
--resume HANDLEResume a completed session from --session-db by its public id. Calls the session stopped before they ran, or that only read, are closed first (stderr: note: closed N tool call(s) …). A session with a call of unknown outcome is refused headless and in the Vue client until it is recorded (see --recover); the Tuimark client opens it
--sessionsList sessions in the workspace without contacting the model; prints {id, revision, messages} JSON
--session-info IDInspect saved state and recovery hazards; runs no tools
--recovery-info IDInspect recovery review tokens; shows no transcript or raw receipts. Returns the first 100 hazards and the total
--recover HANDLEList, as JSON, the session's calls whose outcome is unknown. See Interrupted work
--resolve EXECUTION=OUTCOMEWith --recover: OUTCOME is applied, not-applied or undone. Shows what would be recorded (a dry run); nothing runs again
--note TEXTWith --resolve: a note of at most 1000 characters kept with the record
--applyWith --resolve: record it beside the session's ledger, which is never rewritten
--mcp-statusChecks your own mcp.json, or the --mcp-config file. Connects and lists tools per server as JSON; exits 1 if any server is unavailable
--trust-rulesLists the workspace's untrusted allow rules and trusts them after you type yes at a terminal; exits 1 without a terminal or a yes

Cross-flag rules ​

  • At most one session operation may be given per run (--sessions, --session-info, --recovery-info, --recover, --resume).
  • --resolve, --note and --apply go with --recover; --note and --apply need --resolve.
  • Session operations require --session-db.
  • --ui tuimark cannot be combined with headless mode.
  • Headless requires a non-empty prompt.
  • --approve-edits, --approve-commands, and --approve-mcp are headless-only.
  • --sandbox-commands needs headless mode or the Tuimark client, and cannot be combined with --approve-commands. Headless, it stops the run before it starts where the sandbox is unavailable (Linux, Windows, a workspace that contains your home folder).
  • --sandbox-loopback needs --sandbox-commands.
  • --receipt needs headless mode and a Chalupa profile; --run-id needs --receipt.
  • --mode fullscreen and --mode inline cannot be combined with --prompt or --json, which run headless.
  • Interactive modes require a TTY.
  • Interactive runs check the Ollama model, for at most 15 s, before its first turn. The Tuimark client opens at once and checks while it is up: the status says Checking model…, a prompt sent meanwhile waits for the check, and a model that is refused closes the client with the same message. The Vue client checks before it opens.
  • A run stopped by ctrl+c (SIGINT), SIGTERM, or a closed terminal (SIGHUP) exits 130, 143 or 129; any other failure exits 1.

Run modes ​

  • fullscreen (default): the tuimark client takes over the terminal. The vue client can also run fullscreen via --ui vue.
  • inline: vue by default. Tuimark runs inline only with --ui tuimark --mode inline; finished blocks print into the terminal's own scrollback.
  • headless: selected by --mode headless, --prompt, or --json.

The tuimark binary is taken from TUIMARK_BINARY if set; otherwise a pinned release (0.5.5) is downloaded and checksum-verified. With no --ui, the run falls back to vue with a note on stderr that says why when the binary is missing, or when TUIMARK_BINARY names one older than 0.5.1 or one whose --version names no version (it is asked for at most 5 seconds; the pinned release is not asked). --theme is then refused. An explicit --ui tuimark fails instead.

Headless output ​

Text streams to stdout; tool_result statuses go to stderr, as does a note when the history is compacted or a request leaves its oldest messages out. With --json, stdout carries NDJSON events, starting with an initial {"type":"session","id":...} event; a compaction is a compacted event carrying the shortened history, and a windowed request is a windowed event carrying counts only (left, sent). A run emits it at its first windowed request and again whenever the window's start moves. A task subagent's model calls appear only as subagent_usage events (token counts and Ollama's durations), never as done, which stays the parent's own request.

Approval in headless is fail-closed by default. Without --approve-edits, --approve-commands, or --approve-mcp, the matching request class is denied: there is no approval dialog to answer. A call that matches an ask rule in .local-agent/permissions.json is refused whatever the flags say, and stderr names the rule. On macOS, --sandbox-commands runs commands confined instead. See Safety.

Slash commands ​

CommandPurpose
/mode plan|build|chatSwitch intent. plan reads only; build can edit; chat is the conversational research profile
/theme dark|light|autoSet the session theme
/mouse on|offToggle mouse reporting; fullscreen only. OSC 8 links: ⌘/Ctrl+click may require /mouse off (the terminal app owns the mouse while reporting is on)
/permissionsShow session grants and the workspace file rules, each with its origin; allow rules you have not trusted are marked (untrusted)
/permissions clearClear session approval grants
/permissions clear rulesEmpty the rules in .local-agent/permissions.json and forget their trust
/permissions trustList the allow rules in the workspace's .local-agent/permissions.json that you have not trusted on this machine
/permissions trust confirmTrust exactly the rules the last /permissions trust listed, if the file still holds them
/sandbox on|loopback|offTuimark client, macOS: run commands in the sandbox without a card (loopback also opens TCP to this machine, see Loopback) (an ask rule still shows one, and its y runs that command outside; so does a command that names a secret path). /sandbox alone says whether it is on. Where it is unavailable it stays off and says why
/details [N]Tuimark client: show tool output N in full (the number a cut card names), or the last one. Outputs are kept up to 2,000,000 characters and 500 outputs in all, each capped at 64,000 characters; one let go, or from an earlier conversation, says so
/copyTuimark client: put the last reply's markdown on the clipboard (also ctrl+y). During a turn it copies the last finished reply. With no clipboard tool, the status says how to select text by hand
/copy codeTuimark client: copy the last code block of the last reply
/statusShow the effective config panel (model, workspace, session)
/providerAsk the model's endpoint, read-only: answer time, Ollama's version, whether the model is loaded and how much of it is in GPU memory
/sessionsOpen the session picker; needs --session-db. Loading a session closes the calls it stopped before they ran, or that only read, and tells the model; a call of unknown outcome loads but blocks the next prompt until /recover
/sessions newStart over: a new saved session with --session-db, otherwise a new temporary conversation
/new, /clearTuimark client: the same as /sessions new
/diffTuimark client: list the files this session's edits and writes changed, with their diffs and +N −M counts. Changes made by commands are not listed
/compactTuimark client: shorten the conversation now, the way the automatic compaction does past 6 MiB, as far as it can go; refused while a turn runs
/recoverTuimark client, needs --session-db: list the session's calls whose outcome is unknown, numbered
/recover N applied|not-applied|undone [note]Tuimark client: record what you found in the workspace for the Nth call. Nothing runs again. Earlier calls are answered first. While one remains, a prompt waits and the status names /recover
/model [NAME]Show the current model, or switch to another installed Ollama model mid-session
/context [SIZE|auto]Tuimark client, local Ollama: show the context size and how it was chosen; set one (64k), checked and costed as --context is; or plan it again (auto). Ollama reloads the model at the new size on the next turn and reads the conversation again. Refused while a turn or the startup model check runs, and under Chalupa or an OpenAI-compatible server
/goal OBJECTIVE [--turns N]Tuimark client, build mode: run turns toward an objective until the model reports done or blocked, or a limit stops it (8 turns by default, 1 to 50)
/goalShow the running goal: its objective, turn, time and tokens left, and last status
/goal stopEnd the running goal; esc ends it too, and so does ctrl+c between its turns
/exportWrite the transcript to a markdown file in the workspace root; it may hold tool output, so keep it out of commits
/export jsonWrite the raw messages array as JSON
/find TEXTSearch saved sessions for text; needs --session-db
/search [TEXT]Tuimark client: search this conversation: your messages, the replies and the tool cards, not the client's own notices. Fullscreen opens a search box (also ctrl+f); inline prints the matches into the scrollback. Refused while a turn runs
/mcpShow an MCP panel: server and tool counts, or a hint to use --mcp-config
/helpShow the command and key overlay

An unknown command answers Unknown command: X. Use /help; it is never sent to the model. In the Tuimark client names match in any case, and a line whose first word holds a second slash, such as /tmp/x.log is empty, is a message, not a command. While a turn is busy, commands report a busy status instead of running; in the Tuimark client /copy and /goal still run.

Keymap ​

In the Tuimark client the hint row names only the keys that do something at that moment: esc cancel while a turn runs, and between a /goal's turns or before a queued message; ^O earlier (fullscreen only) only when earlier messages are hidden.

KeyAction
ctrl+pOpen the command palette
escCancel the current turn, and a running /goal with it; a queued message comes back to the composer
ctrl+cTuimark client: clears the draft first, then cancels a running turn, or stops a /goal between its turns; the next press quits. Vue client: quits at once
up, downBrowse input history; up in an empty composer takes a queued message back to edit (Tuimark client)
ctrl+oLoad earlier messages
pgup, pgdnScroll the log
ctrl+lJump to the latest output
ctrl+yTuimark client: copy the last reply, as /copy
ctrl+fTuimark client, fullscreen: search this conversation, as /search
shift+tabNext intent: build → plan → chat → build
enterSend the draft; while a turn runs, queue it for when the turn ends (Tuimark client)
shift+enter, alt+enterInsert a newline without sending

Context-sensitive keys:

ContextKeys
Slash popupup/down choose, tab completes, esc closes
Approval dialog (Tuimark)y allows once; a grants for the session (not for commands while the sandbox is on, a command that names a secret path, or a preview too long to show whole); ! saves an always rule (not for those last two); n or esc denies; arrows, pgup/pgdn, home/end scroll the diff
Approval (Vue client)y allows; n, enter or esc denies
Question (Tuimark)up/down choose, enter answers; or type the row's number, its label, or y/n; esc skips
Panels and detailsq or esc closes; arrows scroll
Search box (Tuimark)Type to search, in any case; up/down (or ctrl+n/ctrl+p) choose a match; enter opens it in the viewer, where n/p step through the matches and esc goes back to the box; esc closes
Sessions pickerup/down choose, enter loads

The command palette mirrors the slash commands plus ctrl+o load-earlier (fullscreen) and ctrl+c quit.

Local-first by default. Approval-gated by design.