Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 15 additions & 2 deletions docs/CLI-REFERENCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ Type `/` mid-chat to open the picker. Aliases shown in parentheses. Code-mode-on
| `/retry` | Truncate and resend your last message — fresh sample |
| `/compact` | Fold older turns into a summary (cache-safe). Auto-fires at 50% ctx; this is the manual trigger |
| `/stop` | Abort the current model turn (typed alternative to Esc) |
| `/btw <question>` | Ask a side question without changing the main conversation |
| `/copy` | Open vim/tmux-style copy mode — `j`/`k` navigate, `v` select, `y` yank to clipboard. The right answer for SSH / mosh / tmux where drag-select can't extend past the viewport |

### Setup
Expand All @@ -67,6 +68,8 @@ Type `/` mid-chat to open the picker. Aliases shown in parentheses. Code-mode-on
| `/model <id>` | Switch DeepSeek model id. Bare opens picker |
| `/language <EN\|zh-CN>` (`/lang`) | Switch the runtime language |
| `/theme <name>` | Show or persist terminal theme. Bare opens picker |
| `/config` | Open configuration guidance and current config paths |
| `/vim [on\|off]` | Toggle vim-style input editing |

### Info

Expand All @@ -77,6 +80,9 @@ Type `/` mid-chat to open the picker. Aliases shown in parentheses. Code-mode-on
| `/context` | Context-window breakdown (system / tools / log / input) |
| `/stats` | Cross-session cost dashboard (today / week / month / all-time) |
| `/doctor` | Health check (api / config / api-reach / index / hooks / project) |
| `/terminal-setup` | Show terminal integration setup help |
| `/output-style [default\|explanatory\|learning]` | Switch response style |
| `/statusline [minimal\|default\|full]` | Switch status line density |
| `/keys` | Keyboard + mouse + copy/paste reference |
| `/feedback` | Open a GitHub issue with diagnostic info copied to clipboard |

Expand All @@ -87,19 +93,25 @@ Type `/` mid-chat to open the picker. Aliases shown in parentheses. Code-mode-on
| `/mcp` | Open the MCP hub (live + marketplace tabs) |
| `/resource [uri]` | Browse / read MCP resources |
| `/prompt [name]` | Browse / fetch MCP prompts |
| `/memory [list\|show\|forget\|clear]` | Manage pinned memory (AGENTS.md / CARBON.md + `~/.carboncode/memory`) |
| `/skill [list\|show\|new\|<name>]` | List / run / scaffold user skills |
| `/memory [for <path>\|list\|show\|forget\|clear]` | Manage pinned memory (AGENTS.md / CARBON.md + `~/.carboncode/memory`) |
| `/skill [list\|paths\|show\|new\|<name>]` | List / run / scaffold user skills |
| `/agents [list\|show\|new]` (`/agent`) | Manage project agents |
| `/qq <connect\|status\|disconnect>` | Connect, inspect, or disconnect the QQ channel |

### Session

| Command | What it does |
|---|---|
| `/sessions` | List saved sessions (current marked with ▸) |
| `/resume` | Resume a saved session |
| `/export [json]` | Export the current conversation |
| `/title` (`/retitle`) | Rename the current session |

### Code mode

| Command | What it does |
|---|---|
| `/review [ref]` | Review the working tree or a git ref |
| `/init [force]` | Scan project, synthesize a baseline `CARBON.md` |
| `/apply [N\|N,M\|N-M]` | Commit pending edit blocks to disk (subset selection supported) |
| `/discard [N\|N,M\|N-M]` | Drop pending edits without writing |
Expand All @@ -113,6 +125,7 @@ Type `/` mid-chat to open the picker. Aliases shown in parentheses. Code-mode-on
| `/checkpoint [name\|list\|forget]` | Snapshot every file the session has touched |
| `/restore <name\|id>` | Roll back to a named checkpoint |
| `/cwd <path>` (`/sandbox`) | Switch the workspace root mid-session |
| `/add-dir [path]` | Add another directory to the current workspace |

### Jobs (code mode)

Expand Down
56 changes: 54 additions & 2 deletions docs/cli-reference.html
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,10 @@ <h3 data-i18n="sl.h.chatops">Chat ops</h3>
<td><code>/stop</code></td>
<td>Abort the current model turn (typed alternative to Esc)</td>
</tr>
<tr>
<td><code>/btw &lt;question&gt;</code></td>
<td>Ask a side question without changing the main conversation</td>
</tr>
<tr>
<td><code>/copy</code></td>
<td>Open vim/tmux-style copy mode — <code>j</code>/<code>k</code> navigate, <code>v</code> select, <code>y</code> yank to clipboard. The right answer for SSH / mosh / tmux where drag-select can't extend past the viewport</td>
Expand All @@ -371,6 +375,14 @@ <h3 data-i18n="sl.h.setup">Setup</h3>
<td><code>/theme &lt;name&gt;</code></td>
<td>Show or persist terminal theme. Bare opens picker</td>
</tr>
<tr>
<td><code>/config</code></td>
<td>Open configuration guidance and current config paths</td>
</tr>
<tr>
<td><code>/vim [on|off]</code></td>
<td>Toggle vim-style input editing</td>
</tr>
</tbody>
</table>

Expand All @@ -397,6 +409,18 @@ <h3 data-i18n="sl.h.info">Info</h3>
<td><code>/doctor</code></td>
<td>Health check (api / config / api-reach / index / hooks / project)</td>
</tr>
<tr>
<td><code>/terminal-setup</code></td>
<td>Show terminal integration setup help</td>
</tr>
<tr>
<td><code>/output-style [default|explanatory|learning]</code></td>
<td>Switch response style</td>
</tr>
<tr>
<td><code>/statusline [minimal|default|full]</code></td>
<td>Switch status line density</td>
</tr>
<tr>
<td><code>/keys</code></td>
<td>Keyboard + mouse + copy/paste reference</td>
Expand Down Expand Up @@ -424,13 +448,21 @@ <h3 data-i18n="sl.h.extend">Extend</h3>
<td>Browse / fetch MCP prompts</td>
</tr>
<tr>
<td><code>/memory [list|show|forget|clear]</code></td>
<td><code>/memory [for &lt;path&gt;|list|show|forget|clear]</code></td>
<td>Manage pinned memory (AGENTS.md / CARBON.md + <code>~/.carboncode/memory</code>)</td>
</tr>
<tr>
<td><code>/skill [list|show|new|&lt;name&gt;]</code></td>
<td><code>/skill [list|paths|show|new|&lt;name&gt;]</code></td>
<td>List / run / scaffold user skills</td>
</tr>
<tr>
<td><code>/agents [list|show|new]</code> (<code>/agent</code>)</td>
<td>Manage project agents</td>
</tr>
<tr>
<td><code>/qq &lt;connect|status|disconnect&gt;</code></td>
<td>Connect, inspect, or disconnect the QQ channel</td>
</tr>
</tbody>
</table>

Expand All @@ -441,12 +473,28 @@ <h3 data-i18n="sl.h.session">Session</h3>
<td><code>/sessions</code></td>
<td>List saved sessions (current marked with ▸)</td>
</tr>
<tr>
<td><code>/resume</code></td>
<td>Resume a saved session</td>
</tr>
<tr>
<td><code>/export [json]</code></td>
<td>Export the current conversation</td>
</tr>
<tr>
<td><code>/title</code> (<code>/retitle</code>)</td>
<td>Rename the current session</td>
</tr>
</tbody>
</table>

<h3 data-i18n="sl.h.code">Code mode</h3>
<table class="cmd-table">
<tbody>
<tr>
<td><code>/review [ref]</code></td>
<td>Review the working tree or a git ref</td>
</tr>
<tr>
<td><code>/init [force]</code></td>
<td>Scan project, synthesize a baseline <code>CARBON.md</code></td>
Expand Down Expand Up @@ -499,6 +547,10 @@ <h3 data-i18n="sl.h.code">Code mode</h3>
<td><code>/cwd &lt;path&gt;</code> (<code>/sandbox</code>)</td>
<td>Switch the workspace root mid-session</td>
</tr>
<tr>
<td><code>/add-dir [path]</code></td>
<td>Add another directory to the current workspace</td>
</tr>
</tbody>
</table>

Expand Down
11 changes: 11 additions & 0 deletions tests/carbon-productization.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { existsSync, readFileSync } from "node:fs";
import { resolve } from "node:path";
import { afterAll, describe, expect, test } from "vitest";
import { SLASH_COMMANDS } from "../src/cli/ui/slash/commands.js";
import { codeSystemBase } from "../src/code/prompt.js";
import { getLanguage, setLanguageRuntime, t } from "../src/i18n/index.js";

Expand Down Expand Up @@ -251,6 +252,16 @@ describe("Carbon broad Reasonix import", () => {
}
});

test("CLI reference documents every registered slash command", () => {
const markdown = readFileSync(resolve("docs/CLI-REFERENCE.md"), "utf8");
const html = readFileSync(resolve("docs/cli-reference.html"), "utf8");

for (const { cmd } of SLASH_COMMANDS) {
expect(markdown, `docs/CLI-REFERENCE.md missing /${cmd}`).toContain(`/${cmd}`);
expect(html, `docs/cli-reference.html missing /${cmd}`).toContain(`/${cmd}`);
}
});

test("published static docs site uses Carbon Code identity", () => {
const docs = [
"docs/index.html",
Expand Down
Loading