Skip to content

CLI

This page documents the shipped ox subcommands, flags, and session storage.

Model-backed commands (acp, chat, complete, and run) accept these flags:

Flag Description
--api-key <key> Override the API key when no credential is set in config
--base-url <url> Override the provider base URL
-c, --config <path> Path to a TOML configuration file (also read from OX_CONFIG)
-m, --model <name> Model key in the config file, or a wire model ID when no config file is loaded
--profile <name> Named profile from [profiles] in config (falls back to default_model)
--reasoning-effort <lvl> Reasoning effort: off, minimal, low, medium, high, xhigh, or max
-s, --system <text> Optional system instruction

When --config and OX_CONFIG are unset, ox checks $XDG_CONFIG_HOME/ox/config.toml and then ~/.config/ox/config.toml. If no configuration file is found, ox requires --model <id> and defaults to the google wire. An explicit --config or OX_CONFIG path that does not exist returns an error.

Agent-loop commands (acp, chat, and run) accept these flags:

Flag Description
-C, --cwd <path> Working directory for built-in tools (defaults to current)
--max-turns <count> Maximum number of model turns per prompt (defaults to 32)
--trust Trust the working directory (enables project-local skills, memory, models, and prompts)

Session-backed commands (chat and run) accept these flags:

Flag Description
--continue Resume the most recently updated session
--fork Fork the resumed or most recent session into a new session
--no-session Run without reading or persisting session state
--session <id> Resume an existing session by identifier
--session-db <path> Override the SQLite session database path

Launches the interactive terminal UI with built-in tools. Running ox with no subcommand is equivalent to ox chat. Accepts Provider, Workspace, and Session flags. See Commands for interactive slash commands and keybindings.

Serves Agent Client Protocol (ACP) clients over newline-delimited JSON-RPC 2.0 on stdin and stdout. Accepts Provider and Workspace flags. See the ACP reference for supported methods and streaming notifications.

Runs the multi-turn agent loop non-interactively with built-in tools and streams output to stdout. Accepts Provider, Workspace, and Session flags.

Flag Description
-p, --prompt <text> Prompt text to send to the model (required)
-a, --attach <path> File path to attach to the user prompt (repeatable)

Sends a single prompt directly to the configured provider without tools and streams the response. Accepts Provider flags.

Flag Description
-p, --prompt <text> Prompt text to send to the model (required)

Manages persisted SQLite conversation sessions. Accepts --session-db <path> globally.

  • ox sessions list: List persisted sessions ordered by last update time.
  • ox sessions delete <id>: Delete a persisted session and its messages.

Calls and inspects MCP tools exposed by ox-plugin-mcp --listen <path> over a local Unix domain socket. Accepts --socket <path> (also read from OX_MCP_SOCK) globally.

  • ox mcp list [--json]: List available MCP tools as tab-separated <name>\t<description> lines, or as formatted JSON with --json.
  • ox mcp call <tool> [json]: Call <server>__<tool> with a JSON object of arguments. When [json] is omitted or -, ox reads the JSON arguments from stdin (defaulting to {} when stdin is empty). Writes tool output to stdout and exits with a non-zero status on RPC or tool errors.

By default, ox chat, ox run, and ox sessions resolve the SQLite database path in this order:

  1. --session-db <path>
  2. $XDG_DATA_HOME/ox/sessions.db
  3. ~/.local/share/ox/sessions.db