v0.36.2

CLI Reference

Usage

cast [options] [prompt]
cast run [options] <message>    Non-interactive mode
cast run --interactive [options]      Persistent JSONL session
cast web [start|stop|status]          Browser-based control room
cast server [start|stop|status]       Alias for cast web
cast upgrade [version] [--force]      Self-update

TUI mode (Ink-based, multiline paste, image attachments) is the default. Non-TTY contexts (pipes, CI) are not supported — use cast run for scripting.

Subcommands

cast (default)

Launch the interactive TUI. Any text after the flags is sent as the first prompt.

cast                          # Launch interactively
cast "explain this project"   # Launch with an initial prompt

cast run

Non-interactive mode: send one prompt, stream the response to stdout, exit. Designed for CI/CD, scripting, and piping.

cast run "what changed in the last commit"
cast run --format json "list all TODO comments"
cast run -c "continue the refactoring"

See Non-Interactive Mode for output formats and JSON event types.

cast run --interactive keeps one real session open over JSONL. It is suited to eval runners and programmatic clients that must react to question and plan-review state between agent turns.

cast upgrade

Re-run the installer to update cast. Only works for release installs (not npm link / dev mode).

cast upgrade              # Upgrade to latest
cast upgrade 0.3.0        # Upgrade to specific version
cast upgrade --force      # Reinstall even if same version

cast web

Web UI mode: launches a browser-based control room for managing background agents. The internal cast server daemon is the single writer for every session — both the browser and the TUI are thin clients of it over HTTP + SSE, so a session opened in either surface streams live (tokens, tool calls, status) to both. The TUI auto-spawns this daemon on launch unless one is already running or CAST_NO_DAEMON=1 is set. cast server is a supported alias for scripts and integrations.

cast web                 # Start in background (daemon)
cast web start           # Same as above
cast web stop            # Stop the background server (SIGTERM → SIGKILL after 3s)
cast web status          # Check if running (auto-heals stale state)
cast web --foreground    # Run inline (for dev/debug)
cast web --port 8080     # Custom port (default: 1337, or set CAST_SERVER_PORT)
cast web --host 0.0.0.0  # Bind to all interfaces (reachable from network)
cast web --public        # Alias for --host 0.0.0.0

For local development, npm run dev:web runs the Web UI in the foreground. Pass server options after --, for example npm run dev:web -- --port 8080.

First run generates a password, printed to the terminal and saved in ~/.cast/settings.json. Username is always cast.

Binding to a non-loopback address (--host 0.0.0.0 or --public) exposes plain HTTP. Use it only on a trusted LAN: without HTTPS, a network observer can read the password and session. For remote access without a domain, keep the default loopback binding and use ssh -L 1337:127.0.0.1:1337 user@host.

Starting when another instance is already running prints an error and exits. stop gracefully shuts down open sessions (SIGTERM), escalating to SIGKILL after 3 seconds if the process doesn't exit. If the recorded process is already gone (crash, OOM, kill -9), status and stop detect the stale state, clean up, and report honestly.

Features:

On Windows, prints the install command to run in a new terminal (can't self-replace running process files).

Options

Model Selection

FlagShortDescription
--model <model>-mModel name (validated on startup against the provider)
--reasoning <level>-rReasoning level: off, low, medium, high, max
--persona <name>-pPersona to use (use /persona to choose)
cast -m qwen/qwen3-235b-a22b -r high "refactor this function"
cast -p senior "review this PR"

Session Management

FlagShortDescription
--continue-cResume the most recently updated session
--resumePick which session to resume (numbered list)
--resume=<id>Resume a specific session by id
--session <id>-sResume a specific session (alias for --resume=<id>)
--worktree <name>-wRun in an isolated git worktree created at .cast/worktrees/<name>
cast -c                           # Resume last session
cast --resume                     # Pick from a list
cast --resume=nd4k8f2x            # Resume by id
cast -s nd4k8f2x "keep working"   # Resume + initial prompt
cast -w feature-x                 # Run in an isolated git worktree

Permissions

FlagDescription
--bypass-permissionsSkip confirmation for dangerous bash commands this run only

See Tools for the list of patterns that trigger confirmation.

Skills and MCP

FlagDescription
--skill <directory>Load an extra skill package directory (repeatable)
--no-skillsSkip project/agents/global/builtin skill discovery
--mcp <path>Load an extra MCP server config file (repeatable)
--no-mcpSkip global/project MCP server discovery

--skill and --mcp paths work even with --no-skills / --no-mcp — they're explicit additions, not discovery.

cast --skill ./my-skill
cast --no-skills --skill ~/.cast/skills/arxiv
cast --mcp ./custom-mcp.json

General

FlagShortDescription
--version-vShow installed version
--help-hShow help text

cast run Flags

The run subcommand accepts a subset of the main flags:

FlagShortDescription
--continue-cContinue the most recent session
--session <id>-sContinue a specific session
--worktree <name>-wRun in an isolated git worktree
--model <model>-mModel to use
--reasoning <level>-rReasoning level
--persona <name>-pPersona to use
--format <default|json>Output format
--interactivePersistent JSONL session protocol; no positional message
--bypass-permissionsSkip bash confirmation prompts
--keep-backgroundLeave background tasks this run started running after it exits
--skill <directory>Load an extra skill package directory (repeatable) — not applied under the daemon, see below
--no-skillsSkip project/agents/global/builtin skill discovery
--mcp <path>Load extra MCP config (repeatable) — not applied under the daemon, see below
--no-mcpSkip MCP discovery

cast run executes inside the daemon, and --skill/--mcp load from a path there: the daemon does not receive them, so the run says so on stderr and continues without them. Install into ~/.cast/skills / ~/.cast/mcp.json, or run with CAST_NO_DAEMON=1. Every other flag above is applied to that run's own session only, so a second client on the same daemon is unaffected.

cast run --format json "list all test files"
cast run -m gpt-4o -r medium "explain the session module"