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

# Complete Command Reference

> Cheatsheet for all commands, flags, and options available in ChatCLI.

Quick reference for all **ChatCLI** commands and flags.

***

## Internal Commands (`/`)

| Command                              | Description                                                                                                                                                                                                                                                        |
| ------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| `/help`                              | Show help                                                                                                                                                                                                                                                          |
| `/menu` (or `/`)                     | Opens the interactive **command palette** — a navigable list of every command (see [Command Palette](#interactive-command-palette))                                                                                                                                |
| `/exit` or `/quit`                   | Exit ChatCLI                                                                                                                                                                                                                                                       |
| `/newsession`                        | Start a new conversation session                                                                                                                                                                                                                                   |
| `/config`, `/status` or `/settings`  | Configuration panorama (accepts subsections — see below); bare opens the palette with the sections                                                                                                                                                                 |
| `/reload` (alias `/config --reload`) | Reload settings from `.env` — covers every provider variable (keys, models, endpoint overrides, `BEDROCK_PROVIDER`) and the embeddings provider (`CHATCLI_EMBED_*`); values removed from `.env` are cleared without restarting                                     |
| `/switch`                            | Switch LLM provider or model (with dynamic autocomplete); bare opens the providers/flags palette                                                                                                                                                                   |
| `/provider` (or `/providers`)        | Switch the active LLM provider by name; bare opens the palette with the active providers (same UX as `/model`)                                                                                                                                                     |
| `/model <name>`                      | Shorthand for `/switch --model <name>`; bare opens the palette with the available models                                                                                                                                                                           |
| `/max-tokens <num>`                  | Shorthand for `/switch --max-tokens <num>`; with no argument, shows the current value                                                                                                                                                                              |
| `/agent` or `/run`                   | Start agent mode                                                                                                                                                                                                                                                   |
| `/coder`                             | Start coder mode (code engineering)                                                                                                                                                                                                                                |
| `/auth`                              | Manage OAuth credentials                                                                                                                                                                                                                                           |
| `/clear`                             | Redraw/clear screen                                                                                                                                                                                                                                                |
| `/connect`                           | Connect to remote server (gRPC)                                                                                                                                                                                                                                    |
| `/disconnect`                        | Disconnect from remote server                                                                                                                                                                                                                                      |
| `/context`                           | Manage persistent contexts                                                                                                                                                                                                                                         |
| `/plugin`                            | Manage plugins                                                                                                                                                                                                                                                     |
| `/skill`                             | Manage skills from registries                                                                                                                                                                                                                                      |
| `/session`                           | Manage sessions (`save`, `load`, `list`, `delete`, `new`, `fork`, `search`)                                                                                                                                                                                        |
| `/nextchunk`                         | Load next file chunk                                                                                                                                                                                                                                               |
| `/retry`                             | Retry last failed chunk                                                                                                                                                                                                                                            |
| `/retryall`                          | Retry all failed chunks                                                                                                                                                                                                                                            |
| `/skipchunk`                         | Skip a file chunk                                                                                                                                                                                                                                                  |
| `/version`                           | Version card: installed build, install channel, latest release and what's new when an update exists                                                                                                                                                                |
| `/update`                            | Update ChatCLI through the same channel it was installed with (Homebrew, go install or release binary); `/update check` only checks                                                                                                                                |
| `/compact`                           | Compact conversation history (auto or guided)                                                                                                                                                                                                                      |
| `/rewind`                            | Rewind to a previous conversation checkpoint                                                                                                                                                                                                                       |
| `/memory`                            | View/load/edit memory (today, yesterday, week, load, longterm, list, profile, `profile set <field>=<value>`, `remember <fact>`, `forget <substring>`, topics, projects, stats, facts, `timeline [q]`, compact)                                                     |
| `/graph`                             | Renders the knowledge graph to an image (PNG, via embedded go-graphviz). `/graph` = full graph; `/graph <subject>` = a node's local graph                                                                                                                          |
| `/watch`                             | K8s watcher status                                                                                                                                                                                                                                                 |
| `/mcp`                               | Manage MCP servers (`status`, `tools`, `restart`)                                                                                                                                                                                                                  |
| `/hooks`                             | List configured lifecycle hooks                                                                                                                                                                                                                                    |
| `/cost`                              | Show estimated session cost                                                                                                                                                                                                                                        |
| `/worktree`                          | Manage git worktrees (`create`, `list`, `remove`, `status`)                                                                                                                                                                                                        |
| `/channel`                           | MCP channels inbox + trigger engine — see [`/channel` subcommands](#channel-mcp-channels-inbox-and-triggers)                                                                                                                                                       |
| `/websearch`                         | Manage web search provider (`status`, `list`, `provider`, `reset`)                                                                                                                                                                                                 |
| `/thinking`                          | Cross-provider reasoning/thinking override (`on\|off\|auto\|low\|medium\|high\|max\|budget=N`) — see [#7 Reasoning Backbone](/features/quality/reasoning-backbone)                                                                                                 |
| `/plan`                              | Force Plan-and-Solve / ReWOO on next `/agent` or `/coder` — see [#2 Plan-and-Solve](/features/quality/plan-and-solve)                                                                                                                                              |
| `/refine`                            | Toggle Self-Refine for the session (`on\|off\|once\|auto`) — see [#5 Self-Refine](/features/quality/self-refine)                                                                                                                                                   |
| `/verify`                            | Toggle Chain-of-Verification for the session (`on\|off\|once\|auto`) — see [#6 CoVe](/features/quality/cove)                                                                                                                                                       |
| `/reflect`                           | Durable lesson queue (status, list, failed, retry, purge, drain) — see [#3 Reflexion](/features/quality/reflexion)                                                                                                                                                 |
| `/schedule`                          | Schedule a durable job (cron / relative / interval / wait-until) — see [Scheduler](/features/scheduler)                                                                                                                                                            |
| `/wait`                              | Wait for a condition and optionally run an action — see [Scheduler](/features/scheduler)                                                                                                                                                                           |
| `/jobs`                              | Manage scheduled jobs (`list`, `show`, `tree`, `cancel`, `pause`, `resume`, `logs`, `history`, `daemon`, `gc`)                                                                                                                                                     |
| `/parked`                            | List agents parked via `@park` — `prune` removes terminals, `gc <dur>` removes old ones — see [Agent Park & Resume](/features/agent-park)                                                                                                                          |
| `/resume`                            | `/resume <token>` forces immediate resume of a park (idempotent against auto-resume)                                                                                                                                                                               |
| `/cancel-park`                       | `/cancel-park <token>` aborts a park: deletes snapshot + cancels scheduler job                                                                                                                                                                                     |
| `/park-note`                         | `/park-note <message>` sends a directive to the parked agent — delivered as an instruction when it resumes                                                                                                                                                         |
| `/ratelimit` or `/limits`            | Show the current provider's rate limits, parsed from the last response's `x-ratelimit-*` headers (remaining requests/tokens and reset)                                                                                                                             |
| `/export`                            | Export the current session's agent trajectory as ShareGPT-format JSONL (fine-tuning / analysis)                                                                                                                                                                    |
| `/moa`                               | Mixture-of-Agents: several models propose in parallel and an aggregator synthesizes; every participant gets a chat turn's briefing + read-only tools (knowledge, CCR recall, memory) (`CHATCLI_MOA_MODELS`) — see [Mixture-of-Agents](/features/mixture-of-agents) |
| `/gateway`                           | Run ChatCLI as a detached messaging daemon (`start`, `status`, `stop`): each message runs through the agent loop and progress is streamed over Telegram/Slack/Discord/WhatsApp/webhook — see [Chat Gateway](/features/chat-gateway)                                |
| `/hub`                               | Inspect and manage the shared cross-channel conversation: `whoami` (principal + active conversation), `bind <platform> <userid> [principal]`, `bindings [principal]` — see [Conversation Hub](/features/conversation-hub)                                          |
| `/lsp <file>`                        | Code diagnostics (errors/warnings) for a file via the Language Server Protocol — see [LSP Diagnostics](/features/lsp-diagnostics)                                                                                                                                  |

## Interactive Command Palette

Commands that have subcommands, flags or values open a **navigable palette** when typed bare and confirmed with Enter — the same experience Claude Code users get. Instead of just printing a list, the palette lets you arrow through it and select.

| How to open                                                                          | Result                                                                 |
| ------------------------------------------------------------------------------------ | ---------------------------------------------------------------------- |
| `/` or `/menu` + Enter                                                               | **Root** palette: every command grouped by category                    |
| A bare "pickable" command (e.g. `/model`, `/config`, `/provider`, `/switch`) + Enter | **Scoped** palette for that command: its real subcommands/flags/values |

Items come **live from the same autocomplete engine** the prompt uses — models, sessions, config sections, providers, files — so the palette and `<TAB>` always show exactly the same set, with no drift.

**Palette navigation:**

| Key                                | Action                                              |
| ---------------------------------- | --------------------------------------------------- |
| `↑` / `↓` (or `Ctrl+P` / `Ctrl+N`) | Move the selection                                  |
| Type                               | Filter (fuzzy)                                      |
| `→` / `Enter`                      | Drill into a sublevel, or select (runs the command) |
| `Tab`                              | Insert the selection as text                        |
| `←` / `Esc` / `Backspace`          | Go back one level (or cancel at the root)           |
| `Ctrl+C`                           | Cancel                                              |

**"Run as-is" entry (`↵`):** every scoped picker leads with an entry that runs the command **with no arguments**, preserving the behavior of commands whose bare form already did something — e.g. `/config` shows the overview, `/switch` opens the provider picker. That entry's description summarizes what the command does, so it never looks "empty".

The palette is themed (it follows the active theme, see [`/config ui theme`](/features/ui-theme)) and runs only in the interactive REPL — headless runs (scheduler, gateway, one-shot) execute the command as typed.

### External subcommand `chatcli daemon`

`chatcli daemon {start|stop|status|ping|install} [--detach] [--socket <path>]` — controls the scheduler daemon in the background. Any interactive CLI detects the daemon and becomes a thin client over the UNIX socket. See [Scheduler → Daemon mode](/features/scheduler#daemon-mode).

### External subcommands `chatcli mcp-server` and `chatcli acp`

`chatcli mcp-server` (alias `mcp-serve`) — runs ChatCLI as an **MCP server** over stdio, with the full ChatCLI experience: chat through the complete pipeline (`ask_chatcli` — memory, contexts, skills, knowledge), the real agent/coder loops (`agent_task`, `coder_task`), session management (`manage_session`), every built-in tool, skills as prompts, local state as `chatcli://` resources and conversation-hub continuity. Use `LLM_PROVIDER`/`LLM_MODEL` to pick the backend. See [MCP Server (ChatCLI as a server)](/features/mcp-server).

`chatcli acp` — runs ChatCLI over the **Agent Client Protocol** (stdio): chat/agent/coder session modes, structured tool-call and plan updates, slash commands from the IDE prompt and native permission dialogs, for JetBrains IDEs, Zed and any ACP client. See [ACP — ChatCLI inside your IDE](/features/acp).

### `/config security` — mutable rules

`/config security` is now hierarchical: the bare form still shows the read-only panorama; the new subcommands mutate the `PolicyManager` live and persist to `~/.chatcli/coder_policy.json`. Used by both interactive `/coder` and the scheduler preflight.

| Subcommand                                    | Description                                            |
| --------------------------------------------- | ------------------------------------------------------ |
| `/config security`                            | Read-only dump (previous behavior)                     |
| `/config security rules`                      | List active rules grouped by action (deny, allow, ask) |
| `/config security allow "<pattern>" [--yes]`  | Add ALLOW rule; prompts if the pattern is broad        |
| `/config security deny "<pattern>" [--yes]`   | Add DENY rule; prompts `[y/N]`                         |
| `/config security forget "<pattern>" [--yes]` | Remove rule; prompts `[y/N]`                           |
| `/config security reload`                     | Force re-read of the JSON (after external file edit)   |

Patterns use prefix matching on `<toolName> <args>` as the PolicyManager normalizes (`@coder exec <cmd>`). Deny always beats allow.

### `/channel` — MCP channels inbox and triggers

Manages the [MCP Channels](/features/mcp-channels) inbox and the trigger engine (rules in `~/.chatcli/mcp/triggers.json`). All subcommands support autocomplete (Tab after `/channel `).

| Subcommand                    | Argument     | Description                                                                                                                                                                                     |
| :---------------------------- | :----------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/channel` or `/channel list` | —            | Lists up to 20 most recent ring messages with `seq`, timestamp, server, channel and preview. Shows total and unread counters, plus a warning when the engine is paused                          |
| `/channel <name>`             | channel name | Filters the listing to that channel                                                                                                                                                             |
| `/channel ack`                | —            | Marks every message as read, clears the pending notify banner. Returns how many entries were cleared                                                                                            |
| `/channel inject`             | —            | Injects the **last 10** messages into history as a `system message` (legacy behavior). Useful when you want to provide explicit context without waiting for auto-injection of the 5 most recent |
| `/channel pause`              | —            | Pauses the trigger engine. Messages keep entering the ring/persistence, but no `Action` is emitted (zero banners, confirms, autos) while paused                                                 |
| `/channel resume`             | —            | Reactivates the trigger engine                                                                                                                                                                  |
| `/channel rules`              | —            | Lists active rules with name, mode, filters (`server`/`channel`/`contentRegex`) and configs (`rate`, `dedup`, `tools`)                                                                          |
| `/channel rules reload`       | —            | Re-reads `~/.chatcli/mcp/triggers.json` without restarting ChatCLI. On schema error, keeps the previous rules active and shows the error                                                        |
| `/channel confirm <id>`       | id required  | Accepts a pending `confirm` action (default = yes); fires the agent with the rule template inside an `AUTO-AGENT envelope box`                                                                  |
| `/channel confirm <id> no`    | id required  | Refuses a pending `confirm` action without firing anything                                                                                                                                      |
| `/channel run <seq>`          | seq required | Fires the agent manually against a specific ring message (use the `seq` shown by `/channel list`) — useful for investigating a message that came in as `notify`                                 |

**Full rule schema and examples**: [MCP Config — Trigger rules](/reference/mcp-config#trigger-rules-chatcli-mcp-triggers-json).

***

## Harness/Quality Pipeline — At a Glance

ChatCLI ships seven LLM-agent patterns that can be toggled per session via slashes:

| Pattern           | Slash          | Default                                      | What it does          |
| ----------------- | -------------- | -------------------------------------------- | --------------------- |
| #1 ReAct          | —              | always on                                    | Base loop             |
| #2 Plan-and-Solve | `/plan`        | auto (complexity ≥ 6)                        | JSON plan + ReWOO     |
| #3 Reflexion      | `/reflect`     | on (on errors)                               | Persisted lessons     |
| #4 RAG + HyDE     | —              | off                                          | Semantic retrieval    |
| #5 Self-Refine    | `/refine on`   | off                                          | Critique + rewrite    |
| #6 CoVe           | `/verify on`   | off                                          | Chain-of-Verification |
| #7 Reasoning      | `/thinking on` | auto (planner, refiner, verifier, reflexion) | Cross-provider        |

**Full reference:** [Agent Harness/Quality Pipeline](/features/quality/overview) · [Configuration](/features/quality/configuration)

### `/reflect` — subcommands

The durable Reflexion queue exposes observability and DLQ triage operations. All have Tab autocomplete:

| Subcommand                | What it does                                                        |
| ------------------------- | ------------------------------------------------------------------- |
| `/reflect`                | Status: queue depth + DLQ size + subcommands hint                   |
| `/reflect <free text>`    | Persist manual lesson to `memory.Fact` (no LLM)                     |
| `/reflect list`           | List pending + DLQ with trigger, attempts, age, task preview        |
| `/reflect failed`         | DLQ only, with last error — ideal for triage                        |
| `/reflect retry <job-id>` | Re-queue a DLQ job (resets Attempts=0) — Tab autocompletes live IDs |
| `/reflect purge <job-id>` | Remove permanently from the DLQ — Tab autocompletes live IDs        |
| `/reflect drain`          | Force WAL replay (pending items from a previous session)            |

<Tip>Tab on `/reflect retry ` or `/reflect purge ` queries the live DLQ and shows IDs with task preview + last error.</Tip>

***

## `/config` — Panorama and Sections

`/config` (aliases: `/status`, `/settings`) has two modes: **short panorama** (no argument — default) and **drill-down by section**. `/config <TAB>` autocomplete lists the sections.

| Command                | Description                                                                                                                                                                               |
| ---------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/config`              | Short panorama: provider, model, session (messages, tokens, cost, duration), active persona, counters (plugins, MCP servers, hooks), websearch chain, remote connection if active         |
| `/config all`          | Full dump — all sections in sequence                                                                                                                                                      |
| `/config general`      | `.env` path, locale, logging, version check, history file                                                                                                                                 |
| `/config update`       | Auto-update policy (`CHATCLI_AUTO_UPDATE`), detected install channel, current vs. latest release                                                                                          |
| `/config providers`    | Env vars for each provider (OpenAI, Claude, Bedrock, Copilot, GitHub Models, OpenRouter, ZAI, MiniMax, Moonshot, StackSpot, Ollama) + API key presence (no value leaked)                  |
| `/config agent`        | Agent runtime: coder UI, workers, subagents, timeouts, tmpdir, denial caps, per-agent overrides, active persona                                                                           |
| `/config resilience`   | Payload caps, recovery ladder, stream timeout, global TLS trust (CA bundle, skip-verify), Bedrock proxy (CA bundle, IMDS), compaction                                                     |
| `/config session`      | Current session (name, messages, cost, budget), attached contexts, memory system                                                                                                          |
| `/config selfevolve`   | Skill self-evolution: mode (`CHATCLI_SELFEVOLVE_MODE` `auto`/`suggest`/`off`) + observability (skills authored by the engine vs. total). See [Skill Authoring](/features/skill-authoring) |
| `/config integrations` | MCP (servers + tool count), hooks, plugins, skill registries, websearch (active chain), worktrees (if in a git repo), K8s watcher, remote connection                                      |
| `/config auth`         | OAuth status per provider (`anthropic`, `openai-codex`, `github-copilot`, `github-models`) with token expiry, keychain backend                                                            |
| `/config security`     | Command policy (allow/denylist, sudo), workspace sandbox, Coder policy, TLS/proxy, redaction                                                                                              |
| `/config quality`      | Seven-pattern pipeline: Self-Refine, CoVe, Reflexion, Plan-First, HyDE (vectors + provider + count), Reasoning backbone — see [full overview](/features/quality/overview)                 |
| `/config compression`  | [Context Compression (CCR)](/features/context-compression): mode, threshold, CCR store, savings. **Mutable** — `off`/`lossless`/`lossy`/`stats`                                           |
| `/config output`       | Output-token reduction: verbosity steering + effort routing. **Mutable** — `full`/`concise`/`minimal`, `effort on\|off`                                                                   |
| `/config server`       | **Conditional** — only renders when any server-mode env is set (gRPC, JWT, rate limit, fallback chain, watcher, audit, operator)                                                          |
| `/config hub`          | Conversation Hub: the **effective** value of each setting (with its source — setting/env/default), bindings, and session state. **Mutable** — see below                                   |

<Tip>
  The panorama shows a numeric summary ("MCP servers: 2 (6 tools)", "Hooks: 3", "Web search chain: duckduckgo → searxng") and lists the available sections in the footer. Use `/config <section>` for full detail.
</Tip>

### `/config hub` — mutable settings

Unlike bare `/config hub` (a read-only panorama), the subcommands **change** hub settings at runtime — persisted in `hub.db` and read live by the gateway daemon (cross-process, no restart):

| Command                             | Effect                                                              |
| ----------------------------------- | ------------------------------------------------------------------- |
| `/config hub set enabled <on\|off>` | Turn the hub on/off                                                 |
| `/config hub set principal <name>`  | Set the shared conversation identity                                |
| `/config hub set isolate <on\|off>` | Isolate each channel (multi-user bot) vs. collapse to the principal |
| `/config hub set ttl_hours <n>`     | Hours before pruning an idle conversation (`0` disables)            |
| `/config hub reset <key>`           | Drop the override; back to env var/default                          |

Precedence: **setting (db) > env var > default**. `/config hub` reprints immediately after each `set`/`reset`, showing the new value and its source. Mutation requires local hub mode or `/connect`.

***

## `/websearch` — Web Search Provider

| Command                                                          | Description                                                                |
| ---------------------------------------------------------------- | -------------------------------------------------------------------------- |
| `/websearch` or `/websearch status`                              | Show current provider + active fallback chain                              |
| `/websearch list`                                                | List known providers and which are configured                              |
| `/websearch provider <searxng\|duckduckgo\|brave\|mojeek\|auto>` | Set preferred provider for the session (sets `CHATCLI_WEBSEARCH_PROVIDER`) |
| `/websearch reset`                                               | Remove override and return to auto mode                                    |

Supported providers are **keyless**: `duckduckgo` (default, HTML scraping), `searxng` (self-hosted via `SEARXNG_URL`), `brave` and `mojeek` (independent indexes, HTML scraping). Default chain: `duckduckgo → searxng → brave → mojeek`. See [Web Tools](/features/web-tools) for details.

***

## Provider and Model Switching (`/switch`)

| Command                      | Description                                                                                                 |
| ---------------------------- | ----------------------------------------------------------------------------------------------------------- |
| `/switch`                    | Bare opens the **palette** of providers/flags; also accepts the flags below                                 |
| `/switch --model <name>`     | Switch model for the active provider                                                                        |
| `/switch --model`            | List all available models (dynamic from API)                                                                |
| `/switch --max-tokens <num>` | Set max tokens for responses                                                                                |
| `/switch --realm <name>`     | Change realm/tenant (StackSpot only)                                                                        |
| `/switch --agent-id <id>`    | Change agent (StackSpot only)                                                                               |
| `/provider <name>`           | Switch the active provider by name (case-insensitive); bare opens the **palette** with the active providers |
| `/providers`                 | Alias of `/provider`                                                                                        |
| `/model <name>`              | **Shorthand** for `/switch --model <name>` (bare opens the palette with the models)                         |
| `/max-tokens <num>`          | **Shorthand** for `/switch --max-tokens <num>` (no argument shows the current value)                        |

The `/switch --model` (and `/model`) autocomplete fetches models **directly from the provider's API** using the active token/key. Each suggestion shows `[API]` (dynamic) or `[catalog]` (static). `/model` and `/max-tokens` delegate to `/switch`, so they share exactly the same validation and behavior.

`/provider` is the navigable counterpart to the provider picker: type `/provider` and Enter to open the **palette** with the active providers (the current one marked), pick one and the switch is applied — the same switch logic as `/switch`, just by name instead of a numeric index.

```bash theme={"system"}
# Examples
/switch                      # Providers/flags palette
/switch --model gpt-4o       # Switch to GPT-4o
/provider                    # Palette with the active providers
/provider OPENAI             # Switch straight to the OPENAI provider
/model gpt-4o-mini           # Same as /switch --model gpt-4o-mini
/model                       # Palette with the available models (source: API or catalog)
/max-tokens 4096             # Same as /switch --max-tokens 4096
/max-tokens                  # Show the current max-tokens limit
```

<Tip>
  The `/model`, `/provider` and `/max-tokens` shorthands appear in the command menu (`<TAB>` after `/`) and have their own autocomplete — `/model <TAB>` suggests the active provider's models, `/provider <TAB>` lists the providers and `/max-tokens <TAB>` offers presets (`0`, `1024`, `4096`, `8192`, `16384`, `32768`).
</Tip>

***

## Context Commands (`@`)

| Command               | Description                                            |
| --------------------- | ------------------------------------------------------ |
| `@file <path>`        | Attach file content or directory structure             |
| `@file --mode <mode>` | Mode: `full`, `summary`, `chunked`, `smart`            |
| `@command <cmd>`      | Execute command and attach output as context           |
| `@command --ai`       | Send output directly to AI for analysis                |
| `@command -i`         | Interactive mode (e.g., `ssh`, `vim`)                  |
| `@git`                | Inject Git repository status, diff, and log            |
| `@env`                | Inject environment variables (sensitive ones redacted) |
| `@history`            | Inject shell command history                           |

***

## LLM-callable plugins (`@<tool>`)

Tools the agent can invoke via `<tool_call>` (in `/agent`, `/coder` modes). Full catalog in [Plugin System](/features/plugin-system) and [Atomic Tools](/features/atomic-tools).

| Plugin       | Subcommands                                                                                                                                                     | Docs                                             |
| ------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------ |
| `@coder`     | `read`, `write`, `patch`, `multipatch`, `tree`, `search`, `exec`, `test`, `rollback`, `git-status`, `git-diff`, `git-log`, `git-changed`, `git-branch`, `clean` | [Plugin @coder](/features/coder-plugin)          |
| `@read`      | (flat) `file`, `from_line`, `to_line`, `head`, `tail`, `encoding`                                                                                               | [Atomic Tools](/features/atomic-tools)           |
| `@search`    | (flat) `term`, `dir`, `max_results`, `include`                                                                                                                  | [Atomic Tools](/features/atomic-tools)           |
| `@tree`      | (flat) `dir`, `depth`, `exclude`                                                                                                                                | [Atomic Tools](/features/atomic-tools)           |
| `@todo`      | `write`, `list`, `mark`                                                                                                                                         | [Atomic Tools](/features/atomic-tools)           |
| `@websearch` | `search`                                                                                                                                                        | [Web Tools](/features/web-tools)                 |
| `@webfetch`  | `fetch`                                                                                                                                                         | [Web Tools](/features/web-tools)                 |
| `@scheduler` | `schedule`, `wait`, `query`, `list`, `cancel`                                                                                                                   | [Scheduler](/features/scheduler)                 |
| `@park`      | `delay`, `until`, `for_url`, `for_cmd`, `list`, `note`                                                                                                          | [Agent Park](/features/agent-park)               |
| `@memory`    | `remember`, `recall`, `forget`, `profile`, `timeline` (dated episodes), `neighbors`, `map` (knowledge graph)                                                    | [Bootstrap & Memory](/features/bootstrap-memory) |
| `@skill`     | `create`, `update`, `list`, `show`, `remove`, `restore`, `stats`, `export`, `import`                                                                            | [Skill Authoring](/features/skill-authoring)     |
| `@knowledge` | `search`, `get`, `toc`                                                                                                                                          | [Knowledge Base](/features/knowledge-base)       |
| `@model`     | `list`, `use`, `reset`, `status`, `delegate`                                                                                                                    | [Model Routing](/features/model-routing)         |

> Partial list — the full catalog (32 native tools) is auto-generated: run `/plugin list` in ChatCLI, or ask an agent for `@tools list`. Curated highlights live in [Agentic Plugins](/features/agentic-plugins).

***

## Agent Mode -- Actions

| Action | Description                             |
| ------ | --------------------------------------- |
| `[N]`  | Execute command number `N`              |
| `a`    | Execute all pending commands            |
| `eN`   | Edit command `N`                        |
| `tN`   | Simulate (dry-run) command `N`          |
| `cN`   | Ask AI to continue with output from `N` |
| `pcN`  | Add pre-execution context               |
| `acN`  | Add post-execution context              |
| `vN`   | View full output in pager               |
| `wN`   | Save output to temporary file           |
| `p`    | Toggle compact/full view                |
| `r`    | Redraw the screen                       |
| `q`    | Exit agent mode                         |

***

## Sessions (`/session`)

| Command                  | Description                                                                        |
| ------------------------ | ---------------------------------------------------------------------------------- |
| `/session save <name>`   | Save the current conversation                                                      |
| `/session load <name>`   | Load a saved conversation                                                          |
| `/session list`          | List all sessions                                                                  |
| `/session delete <name>` | Delete a session                                                                   |
| `/session new`           | Start a clean session                                                              |
| `/session fork <name>`   | Fork current session into an independent copy                                      |
| `/session search <term>` | Full-text search across saved sessions, showing snippets with the term highlighted |

<Info>
  When connected to a remote server, sessions can be saved/loaded locally, remotely, or both.
</Info>

***

## Persistent Contexts (`/context`)

| Command                          | Description                                                                                                                                               |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/context create <name> ...`     | Create snapshot of files/directories (`--mode knowledge` indexes documentation **or code/infra** corpora as a [knowledge base](/features/knowledge-base)) |
| `/context update <name> ...`     | Update existing context                                                                                                                                   |
| `/context attach <name>`         | Attach context to current session                                                                                                                         |
| `/context detach <name>`         | Detach context                                                                                                                                            |
| `/context list`                  | List saved contexts                                                                                                                                       |
| `/context show <name>`           | Show details and files                                                                                                                                    |
| `/context inspect <name>`        | Detailed statistics                                                                                                                                       |
| `/context delete <name>`         | Delete permanently                                                                                                                                        |
| `/context merge <new> <c1> <c2>` | Combine contexts                                                                                                                                          |
| `/context attached`              | Show attached contexts with token estimates and cache hints                                                                                               |
| `/context export <name> <file>`  | Export to JSON                                                                                                                                            |
| `/context import <file>`         | Import from JSON                                                                                                                                          |
| `/context metrics`               | Usage statistics                                                                                                                                          |

***

## Skills (`/skill`)

| Command                                | Description                                                               |
| -------------------------------------- | ------------------------------------------------------------------------- |
| `/skill search <query>`                | Search across all registries (parallel fan-out)                           |
| `/skill install <name> [--from <reg>]` | Install skill from a registry (specific or auto-detect)                   |
| `/skill uninstall <name>`              | Remove installed skill (disambiguates if multiple sources)                |
| `/skill list`                          | List installed skills with source and version                             |
| `/skill info <name> [--from <reg>]`    | Full metadata (installs, security audits)                                 |
| `/skill registries`                    | Show configured registries and status                                     |
| `/skill registry enable <name>`        | Enable a registry (immediate hot-reload)                                  |
| `/skill registry disable <name>`       | Disable a registry (immediate hot-reload)                                 |
| `/skill prefer [name] [source]`        | Set/show preferred source for conflicting skills                          |
| `/skill prefer <name> --reset`         | Remove preference (revert to default: local wins)                         |
| `/skill pin <name>`                    | Pin a skill for the session — injected on every turn until `/skill unpin` |
| `/skill unpin <name>`                  | Remove a skill from the pinned set                                        |
| `/skill pinned`                        | List skills pinned for the current session                                |
| `/skill help`                          | Help for the `/skill` command                                             |

***

## Command-Line Flags (One-Shot)

| Flag                   | Description                                       |
| ---------------------- | ------------------------------------------------- |
| `-p`, `--prompt`       | Execute a prompt and exit                         |
| `--provider <name>`    | Override provider (e.g., `CLAUDEAI`)              |
| `--model <name>`       | Override model                                    |
| `--timeout <duration>` | Time limit (e.g., `10s`, `1m`)                    |
| `--max-tokens <num>`   | Limit tokens in response                          |
| `--agent-auto-exec`    | Execute first safe command in agent mode          |
| `--no-anim`            | Disable animations (useful in scripts)            |
| `-v`, `--version`      | Show the version card (same output as `/version`) |
| `-h`, `--help`         | Show help                                         |

***

## Subcommands

<Tabs>
  <Tab title="chatcli server">
    Starts as a gRPC server for remote access.

    | Flag                        | Description               | Default     |
    | --------------------------- | ------------------------- | ----------- |
    | `--port <int>`              | gRPC port                 | `50051`     |
    | `--token <string>`          | Authentication token      | `""`        |
    | `--tls-cert <path>`         | TLS certificate           | `""`        |
    | `--tls-key <path>`          | TLS key                   | `""`        |
    | `--provider <name>`         | Default LLM provider      | Auto        |
    | `--model <name>`            | Default model             | Auto        |
    | `--watch-deployment <name>` | K8s deployment to monitor | `""`        |
    | `--watch-namespace <ns>`    | Namespace                 | `"default"` |
    | `--watch-interval <dur>`    | Collection interval       | `30s`       |
    | `--watch-window <dur>`      | Observation window        | `2h`        |
    | `--watch-max-log-lines <n>` | Max log lines per pod     | `100`       |
    | `--watch-kubeconfig <path>` | Kubeconfig                | Auto        |
  </Tab>

  <Tab title="chatcli connect">
    Connects to a remote server via gRPC.

    | Flag                 | Description                     | Default |
    | -------------------- | ------------------------------- | ------- |
    | `<address>`          | Address (positional)            |         |
    | `--addr <host:port>` | Address (flag)                  | `""`    |
    | `--token <string>`   | Authentication token            | `""`    |
    | `--provider <name>`  | Override provider               | `""`    |
    | `--model <name>`     | Override model                  | `""`    |
    | `--llm-key <string>` | Your API key                    | `""`    |
    | `--use-local-auth`   | Use OAuth from local auth store | `false` |
    | `--tls`              | Enable TLS                      | `false` |
    | `--ca-cert <path>`   | CA certificate                  | `""`    |
    | `-p <prompt>`        | Remote one-shot                 | `""`    |
    | `--raw`              | Unformatted output              | `false` |
    | `--max-tokens <int>` | Max tokens                      | `0`     |
  </Tab>

  <Tab title="chatcli watch">
    Monitors K8s deployment with AI.

    | Flag                  | Description               | Default     |
    | --------------------- | ------------------------- | ----------- |
    | `--deployment <name>` | Deployment (required)     | `""`        |
    | `--namespace <ns>`    | Namespace                 | `"default"` |
    | `--interval <dur>`    | Collection interval       | `30s`       |
    | `--window <dur>`      | Observation window        | `2h`        |
    | `--max-log-lines <n>` | Max log lines per pod     | `100`       |
    | `--kubeconfig <path>` | Kubeconfig                | Auto        |
    | `--provider <name>`   | LLM provider              | `.env`      |
    | `--model <name>`      | LLM model                 | `.env`      |
    | `-p <prompt>`         | One-shot with K8s context | `""`        |
    | `--max-tokens <int>`  | Max tokens                | `0`         |
  </Tab>
</Tabs>

***

## Memory

| Command                               | Description                                                                                                                                                                                                                                                                                       |
| ------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `/memory` or `/memory today`          | Show today's notes                                                                                                                                                                                                                                                                                |
| `/memory yesterday`                   | Show yesterday's notes                                                                                                                                                                                                                                                                            |
| `/memory <date>`                      | Show notes from a date (YYYY-MM-DD, YYYYMMDD, DD/MM/YYYY)                                                                                                                                                                                                                                         |
| `/memory week`                        | Notes from the last 7 days                                                                                                                                                                                                                                                                        |
| `/memory longterm`                    | MEMORY.md content (long-term facts)                                                                                                                                                                                                                                                               |
| `/memory list`                        | List all memory files (includes structured JSONs)                                                                                                                                                                                                                                                 |
| `/memory load <date>`                 | Load notes into conversation context                                                                                                                                                                                                                                                              |
| `/memory profile`                     | User profile (name, role, company, location, skills, certifications, goals, interests, directives, stances, milestones, environment; 🔒 marks sensitive fields)                                                                                                                                   |
| `/memory profile set <field>=<value>` | Set/update a profile field. Lists upsert (restating supersedes the old entry); suffixes rewrite: `goals_replace=` overwrites all, `goals_done=`/`goals_remove=` delete. New keys: `stance=position :: reason`, `milestone=`, `env_<key>=`, `directives=[scope:<project>] rule`, `sensitive_mark=` |
| `/memory remember <fact>`             | Explicitly add a long-term fact (accepts a `[category]` prefix)                                                                                                                                                                                                                                   |
| `/memory forget <substring>`          | Remove long-term facts containing the given substring                                                                                                                                                                                                                                             |
| `/memory topics`                      | Tracked recurring topics                                                                                                                                                                                                                                                                          |
| `/memory projects`                    | Tracked projects with status                                                                                                                                                                                                                                                                      |
| `/memory stats`                       | Usage statistics (sessions, peak hours, errors, features)                                                                                                                                                                                                                                         |
| `/memory facts [category]`            | Facts with scores (filter: architecture, pattern, preference, gotcha, project, personal)                                                                                                                                                                                                          |
| `/memory timeline [q]`                | Dated episode history; `q` filters by time ("3 meses atrás", "april", "2026-04") and/or content                                                                                                                                                                                                   |
| `/memory compact`                     | Force memory compaction (LLM + old note cleanup)                                                                                                                                                                                                                                                  |

***

## Compaction and Rewind

| Command                  | Description                                                                  |
| ------------------------ | ---------------------------------------------------------------------------- |
| `/compact`               | Automatic compaction (3-level pipeline)                                      |
| `/compact <instruction>` | Guided compaction — preserves specific information                           |
| `/rewind`                | Display checkpoint menu for restoration                                      |
| **Esc+Esc**              | Quick shortcut for `/rewind` (2x Esc within 500ms, only when input is empty) |

<Info>
  `/compact` accepts a natural language instruction. Example: `/compact preserve file paths and decisions`.
</Info>

***

## Keyboard Shortcuts

<Tabs>
  <Tab title="Navigation">
    | Shortcut                        | Action                                                                        |
    | ------------------------------- | ----------------------------------------------------------------------------- |
    | **Alt/Option + arrows**         | Move cursor by word                                                           |
    | **Ctrl + arrows**               | Move cursor by word                                                           |
    | **Cmd + arrows** / **Home/End** | Beginning/end of line                                                         |
    | **Esc+Esc**                     | Open rewind menu (double Esc within 500ms, only when input is empty)          |
    | **`/` or `/menu` + Enter**      | Open the [command palette](#interactive-command-palette) (arrows to navigate) |
  </Tab>

  <Tab title="Editing">
    | Shortcut            | Action                            |
    | ------------------- | --------------------------------- |
    | **Alt + Backspace** | Delete word to the left           |
    | **Ctrl + W**        | Delete word to the left           |
    | **Ctrl + K**        | Delete from cursor to end of line |
  </Tab>

  <Tab title="Paste">
    Automatic detection via *Bracketed Paste Mode*:

    * Small pastes (150 chars or less): rendered normally
    * Large pastes (more than 150 chars): placeholder `«N chars | M lines»`

    The actual content is preserved and sent when pressing Enter.
  </Tab>
</Tabs>
