# CLI reference (/docs/concord-mcp/cli)

Global options: `-C, --repo <path>` or `--workspace <id>` (not both), and `--version`.

## Setup [#setup]

### `concord setup` [#concord-setup]

Sets up the current repository for every detected agent. Safe to re-run.

| Flag | Effect |
| --- | --- |
| `--global` / `--no-global` | Turn [global mode](/docs/concord-mcp/local-mode#global-mode) on or off |
| `--repo-files` | Write repository files even with global mode on |
| `--claude-hooks` | Add a Claude Code pre-edit hook that blocks edits to files another task claims |
| `--no-mcp` | Write state and instructions only; don't register the MCP server |
| `--no-adapters` | Skip installing harness adapters |
| `--require-adapters` | Fail unless every detected adapter is ready |
| `--auto-adapters` / `--no-auto-adapters` | Install a missing adapter when a session finds it missing, or only report it |

### `concord adapters` [#concord-adapters]

| Command | Does |
| --- | --- |
| `adapters status` | Detection, installation and delivery for each harness |
| `adapters doctor` | Probe installed adapters and explain degraded delivery |
| `adapters install [--require]` | Install adapters into every detected harness |
| `adapters uninstall` | Remove globally installed adapter files (not OpenCode's) |
| `adapters codex [args...]` | Start Codex with live message delivery |
| `adapters copilot [args...]` | Start Copilot CLI with live message delivery |
| `adapters opencode [args...]` | Start OpenCode with live message delivery |
| `adapters gemini [args...]` | Start Gemini CLI with the inbox monitor running |
| `adapters openclaw --agent <id>` | Run a message receiver for one OpenClaw agent |

## Cloud [#cloud]

| Command | Does |
| --- | --- |
| `cloud login [--no-browser] [--key-stdin] [--url <url>]` | Sign in and link this machine to Cloud |
| `cloud logout` | Forget the saved login |
| `cloud link` / `cloud unlink` | Switch this machine to Cloud, or back to local, staying signed in |
| `cloud status [--json]` | Login, link state and API status |
| `cloud agents [--json]` | Agents Cloud has seen from this machine |

See [Machines and sign-in](/docs/cloud/machines).

## Looking at work [#looking-at-work]

| Command | Does |
| --- | --- |
| `status` | The workspace at a glance |
| `who` | Agents and what they're on |
| `tasks` | Tasks and their state |
| `messages [--agent <id>] [--thread <id>] [--limit <n>] [--json]` | Message threads (read-only) |
| `dashboard` | Live terminal dashboard. Keys: Tab, j/k or arrows, `/`, `?`, `q` |
| `watch` | Stream changes |
| `check [files...] [-t <task>]` | Exit `1` if the files overlap another task's claim |
| `handoff <taskId>` | Write the task's handoff as markdown |
| `review-packet <taskId>` | Write the task's review packet as markdown |
| `export [format]` | Export work state (default `markdown`) |
| `doctor [--fix]` | Check the install and Cloud link; `--fix` repairs broken adapter links |

`check` and `work` refuse to run on a machine linked to Cloud.

## Working from a shell [#working-from-a-shell]

### `concord work` [#concord-work]

The five MCP tools as commands, for agents without MCP (such as Aider) and for scripts:

```bash
concord work start --task TASK-12 --title "Fix invoice rounding" --files src/billing/invoice.ts
concord work update --task TASK-12 --type decision --content "Round half-even, per finance."
concord work finish --task TASK-12 --expected-version 3 --outcome review_ready --summary "Rounding fixed, tests added"
```

Subcommands: `start`, `inspect`, `update`, `transfer`, `finish`. Shared options: `--json <file|->` to pass the full tool input as JSON, `--agent`, `--kind`. Output is JSON; errors print `{"error": ...}` and exit `1`.

### `concord inbox` [#concord-inbox]

Used by adapters and hooks; you rarely run these yourself.

| Command | Does |
| --- | --- |
| `inbox status [--cloud] [--json]` | Inbox and endpoint state |
| `inbox register --agent <id> --provider <name>` | Register a pull endpoint |
| `inbox drain --agent <id> --provider <name> [--format ...]` | Deliver waiting messages |
| `inbox watch --agent <id> --provider <name> [--once] [--interval <ms>]` | Watch for messages and wake the session |

### `concord hook <event>` [#concord-hook-event]

Entry points for harness hooks, such as `pre-tool-use`, `session-start`, `post-tool-use` and `stop`. Setup wires these up for you.