
## Run the CLI

From the repository root:

```bash
bun run dev:cli
```

The CLI:

1. Starts the Nakama server if it is not already running
2. Resolves your active organization (or prompts when multiple orgs exist)
3. Lets you pick a profile
4. Opens an interactive chat session

If the server has no provider configured yet, chat runs in offline mode until you finish [First-time setup](/first-time-setup).

## Flags

| Flag | Description |
|---|---|
| `--org`, `-o <id>` | Organization ID or slug |
| `--profile`, `-p <id>` | Profile ID or name |
| `--theme light\|dark` | Terminal theme (also `NAKAMA_THEME`) |

Set `NAKAMA_ORG_ID` to skip org selection when you belong to multiple organizations.

Examples:

```bash
bun run dev:cli -- --org docs-demo --profile default
bun run dev:cli -- --theme light
```

## Slash commands

Inside chat, type `/` for autocomplete:

| Command | Description |
|---|---|
| `/help` | Show commands |
| `/profile` | Show or switch bot profile |
| `/model` | Show or switch model |
| `/models` | Choose a model interactively |
| `/thinking` | Show or change extended thinking |
| `/compact` | Compact conversation history |
| `/clear` | Clear history |
| `/status` | Show server and model status |
| `/soul` | Show or initialize profile soul files |
| `/user` | Show or initialize `USER.md` |
| `/create` | Draft an automation |
| `/learn` | Distill a reusable skill from sources |
| `/paste` | Attach image from clipboard |
| `/debug` | Toggle layout debug overlay |
| `/exit` | Quit |

Switch models with `/model providerId::modelId` when the same model ID exists on multiple providers.

## Attach images

Paste an image path or use clipboard attach:

```text
@/path/to/screenshot.png What changed in this UI?
/paste
```

When your terminal supports it, paste with an empty prompt (`Ctrl+V` / `Cmd+V`) to attach from the clipboard.

## Rotate local auth token

Platform workers and local bridges read the Nakama local auth token from disk. To rotate it:

```bash
bun run dev:cli -- rotate-token
```

Workers reload from disk on the next request. Restart platform workers if anything stays disconnected.

## Next steps

- [Quickstart](/quickstart) — install and open the dashboard
- [Coding agent](/coding-agent) — Codex, Claude Code, OpenCode, pi, or Cursor Agent from chat
- [Telegram](/telegram) — add a messaging channel
