Browse documentation
Reference
On this page

CLI

The wisp executable selects an interface from its arguments and terminal state. Run wisp --help or any command with --help for the installed version’s generated help.

Invocation modes

CommandBehavior
wispLaunch the automatically selected TUI when stdin and stdout are interactive
wisp tuiLaunch the Rust TUI from a native wheel or source binary override
wisp -p "PROMPT"Run one prompt and print assistant text
wisp -p "PROMPT" --mode jsonEmit one typed WispEvent JSON object per line
wisp --mode rpcStart the long-lived JSONL RPC command host
wisp --mode tuiLaunch the Rust TUI with the top-level options

A prompt is invalid with --mode rpc or --mode tui. A non-interactive invocation with neither a prompt nor an explicit RPC/TUI mode prints help and exits.

Top-level options

These options configure bare TUI, print, JSON, RPC, and compatibility TUI invocations. Options for the dedicated wisp tui command are listed separately below.

OptionMeaningEnvironment equivalent
--versionPrint wisp VERSION and exit—
-p, --prompt TEXTRun one prompt and exit—
--provider NAMESelect a provider such as openai-codex, deepseek, anthropic, or fakeWISP_PROVIDER
--model NAMEOverride the selected provider’s modelWISP_MODEL
--session-dir PATHStore and resolve JSONL sessions in this directoryWISP_SESSION_DIR
--auth-file PATHUse this private provider credential fileWISP_AUTH_FILE
--mode text|json|rpc|tuiSelect the output/interface modeWISP_MODE (only without --prompt)
--all-tools, --no-all-toolsExpose or withhold the full tool registry; TUI modes default on, other modes off—
--allow-read-tools, --no-allow-read-toolsExpose sandboxed read-only tools—
--allow-tool NAMEExpose one named tool; repeat for multiple tools—
--resume SESSIONContinue by JSONL path, filename, session id, or unique id prefix—
--continueContinue the newest session in the selected session directory—
--yes, --allow-unsafe-tool-executionPre-approve mutating and command tools—
--auto-command-read-dir PATHGrant one absolute directory for read-only /bin/ls and /bin/cat in macOS Auto commands (TUI and RPC only; may be passed once)—
--max-tool-iterations NCap model/tool rounds; omitted means uncapped—
--timeout SECONDSStop a -p run after this many seconds; see Exit status—
--helpShow generated help and exit—

WISP_MODE supplies a default only when the invocation has neither an explicit --mode nor -p/--prompt. Prompt invocations keep text mode unless --mode json is passed explicitly; for example, WISP_MODE=json wisp -p "hello" does not select JSON output.

Explicit command-line values override their environment and settings-file equivalents. --resume and --continue are mutually exclusive, and --max-tool-iterations must be zero or greater. --timeout must be positive and applies only to -p runs.

Tool exposure and tool approval are separate. Exposing a mutating or command tool does not approve it; without --yes, Wisp asks in interactive modes and blocks unsafe execution in non-interactive modes. See Tools & safety.

wisp tui

wisp tui launches Rust and enables the full tool registry by default.

OptionMeaning
--session-dir PATHOverride the JSONL session directory
--auth-file PATHOverride the provider auth file
--all-tools, --no-all-toolsExpose or withhold the full tool registry
--allow-read-tools, --no-allow-read-toolsExpose sandboxed read-only tools
--allow-tool NAMEExpose one named tool; repeatable
--resume SESSIONContinue a selected session
--continueContinue the newest session
--yes, --allow-unsafe-tool-executionPre-approve mutating and command tools
--auto-command-read-dir PATHGrant one absolute directory for read-only /bin/ls and /bin/cat in macOS Auto commands (may be passed once)
--max-tool-iterations NCap model/tool rounds

Provider and model defaults for the dedicated command come from configuration and WISP_PROVIDER/WISP_MODEL. Use the --mode tui form when you need top-level --provider or --model flags.

Native wheels for macOS arm64 and Linux glibc 2.28+ x86_64 include the Rust executable. Pure-wheel installs retain print, JSON, RPC, and SDK use, but interactive TUI commands fail with guidance to install on a supported native target or build a matching binary from source. For source development, set WISP_RUST_TUI_BINARY to the absolute path of that binary. Missing, damaged, incompatible, or failed Rust launches report an error rather than starting another interface.

Maintenance and inspection commands

Updates

wisp update [--check] [--yes|-y]

Without --check, Wisp offers to install the latest compatible release. --check reports status without installing; --yes accepts installation without confirmation. Installation is supported only for persistent uv tool installs. Check and installation failures exit with status 1.

Credentials

wisp auth status [PROVIDER] [--auth-file PATH]
wisp auth logout PROVIDER [--auth-file PATH]

status never prints secrets. logout removes the selected stored credential.

Project trust

wisp trust status [PROJECT]
wisp trust allow [PROJECT]
wisp trust revoke [PROJECT]
wisp trust forget [PROJECT]

The project defaults to the current directory. allow and revoke persist a decision; forget returns it to undecided. allow and revoke exit with status 1 for the home folder or a folder above it, where Wisp asks each session instead; status reports such a folder as asked each session. WISP_TRUST=1 or 0 overrides the decision for one process without persisting it.

MCP servers

wisp mcp list
wisp mcp add NAME [--env NAME]... [--env-from NAME]... [--replace] [--yes|-y] -- COMMAND [ARGS]...
wisp mcp add NAME --url URL [--header NAME]... [--header-from NAME=VAR]... [--replace] [--yes|-y]
wisp mcp import FILE|- [--replace] [--yes|-y]
wisp mcp remove NAME [--yes|-y]
wisp mcp enable NAME [--yes|-y]
wisp mcp disable NAME
wisp mcp login NAME
wisp mcp logout NAME

These commands edit mcp_servers in ~/.wisp/settings.json and keep every other setting. Changes apply the next time Wisp starts. See the MCP guide for setup examples, TUI controls, authentication, and codemode.

  • Everything after -- is the server’s command, passed unchanged, so its own flags (such as npx -y) are never read as Wisp options.
  • add, import, and enable show what a server runs and ask before saving; without a terminal they require --yes.
  • --env prompts for each value with masked input, after showing the command, so it also needs a terminal. --header does the same for an HTTP header.
  • --header-from NAME=VAR builds an HTTP header from an environment variable when Wisp connects; 'Authorization=Bearer LINEAR_API_KEY' sends Bearer and the variable’s value. add names the variable and the host that receives it before saving.
  • import saves every server in the snippet or none of them. import - reads the snippet from stdin and requires --yes, which keeps the snippet’s env values as written.
  • --replace writes the whole new entry, so an existing server’s tool_safety overrides and "enabled": false are not kept.
  • login signs in to an HTTP server with OAuth in your browser and saves the tokens in ~/.wisp/mcp-auth.json; logout forgets them. See Signing in with OAuth.
  • list never prints environment or header values.
  • If the settings file is already invalid, the commands refuse to change it and name the field to fix.

Browser

wisp browser clear [--yes|-y]

Clears saved live browser data, including site sign-ins and cookies. Close the live browser before clearing it. The command asks for confirmation in a terminal and accepts --yes for non-interactive use. See Saved live browser profile.

Skills

wisp skills [PROJECT]

Lists valid Agent Skills and isolated discovery diagnostics. Project skills are skipped unless the project is trusted; bundled and user skills remain discoverable.

Output streams

Modestdoutstderr
Text/printFinal assistant textLifecycle events, trust prompts, diagnostics, and errors
JSONOne WispEvent JSON object per lineTrust prompts and process-level diagnostics
RPCJSONL commands are read from stdin; typed events and command results are written to stdoutProcess-level diagnostics
TUITerminal UIStartup failures before the UI takes control

Do not parse text-mode stderr as a stable protocol. Use JSON mode, RPC, or the SDK for typed integration contracts.

Exit status

StatusMeaning
0Normal completion, help/version output, user-declined update, or graceful TUI/RPC shutdown
1Configuration, provider, session, tool, update, or runtime failure
2Command-line syntax or type error reported by Typer/Click
124A -p run reached its --timeout, as coreutils timeout reports it

External termination may produce a shell-specific signal status; that is not a versioned Wisp exit code. JSON mode emits an error event before status 1 when its typed output contract can still be honored.

At its --timeout, a run is asked to stop the way a cancellation does: running tools and commands are stopped, and the run saves its session and still emits agent.completed with outcome cancelled and its totals. It first reports Run stopped: it reached its N s time limit (--timeout). (an error event in JSON mode, a line on stderr in text mode), and Wisp exits with status 124. A run that is already finishing after its last turn completes normally instead. A run that neither stops nor finishes 10 seconds after the deadline is stopped outright, without agent.completed, and also exits with status 124. If cleanup still holds it open 10 seconds after that, Wisp reports Run did not stop after it was cancelled; exiting. and exits at once with status 124; commands it started may then outlive it. The limit counts from when the run starts, after Wisp’s own startup; MCP servers have their own connection limit.