> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qredence.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# CLI

> Run Fleet Prime Agent from the command line. Modes, flags, and examples.

The CLI is the fastest way to script the agent or run one-shot tasks. It shares the same runtime as the TUI and web app.

## Modes

Pass a mode with the first positional argument or `--mode`:

* **`text`** (default) — interactive text mode.
* **`json`** — emit one JSON `ChatStreamEvent` per line on stdout. Good for pipelines.
* **`rpc`** — JSON-RPC framing over stdio. For building your own client.
* **`daemon`** — start the background daemon.
* **`acp`** — Agent Communication Protocol mode.

## Key flags

| Flag                      | Purpose                                                                    |
| ------------------------- | -------------------------------------------------------------------------- |
| `--provider`              | Provider id, e.g. `openai`, `anthropic`.                                   |
| `--model`                 | Model id from the provider.                                                |
| `--api-key`               | Inline API key, kept in memory only (not persisted).                       |
| `--thinking`              | Thinking level: `off`, `minimal`, `low`, `medium`, `high`, `xhigh`, `max`. |
| `--autonomous`            | Run without pausing for interactive questions.                             |
| `--resume <id>`           | Resume a session by id.                                                    |
| `--fork <id>`             | Fork a session by id.                                                      |
| `--extension <pkg>`       | Load an extension package.                                                 |
| `--skill <path>`          | Load a skill package from a path.                                          |
| `--theme <name>`          | Set the terminal theme.                                                    |
| `--no-tools`              | Disable all tools for this run.                                            |
| `--no-extensions`         | Disable all extensions for this run.                                       |
| `--no-env`                | Ignore ambient environment variables (`OPENAI_API_KEY`, etc.).             |
| `--goal <text>`           | Set an explicit goal for the run.                                          |
| `--goal-token-budget <n>` | Cap tokens spent on the goal.                                              |

`--list-models` was removed. Use `prime-agent model list` instead.

## Examples

One-shot summarization piped from stdin:

```bash theme={null}
cat report.md | prime-agent --provider anthropic --model claude-sonnet-4 --autonomous "Summarize this report in five bullets"
```

Resume and pipe events to `jq`:

```bash theme={null}
prime-agent --resume abc123 --mode json | jq -rc 'select(.type=="delta") | .text'
```

Run without any tools (pure chat):

```bash theme={null}
prime-agent --no-tools --provider openai --model gpt-4o "..."
```

See the source of truth for flags: `packages/coding-agent/src/cli/args.ts`.
