command-code 1.0.1 → 1.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +26 -1
- package/dist/bundled/command-code-knowledge/SKILL.md +2 -1
- package/dist/bundled/command-code-knowledge/reference/custom-agents.md +7 -7
- package/dist/bundled/command-code-knowledge/reference/custom-slash-commands.md +5 -5
- package/dist/bundled/command-code-knowledge/reference/headless.md +7 -7
- package/dist/bundled/command-code-knowledge/reference/hooks.md +7 -7
- package/dist/bundled/command-code-knowledge/reference/mcp.md +8 -8
- package/dist/bundled/command-code-knowledge/reference/permissions.md +75 -75
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +2 -0
- package/dist/bundled/command-code-knowledge/reference/plan-review.md +226 -0
- package/dist/bundled/command-code-knowledge/reference/skills.md +27 -27
- package/dist/bundled/mod-builder/reference/api.md +21 -21
- package/dist/bundled/mod-builder/reference/hooks-and-events.md +48 -48
- package/dist/bundled/mod-builder/reference/overview.md +87 -18
- package/dist/bundled/mod-builder/reference/packaging.md +6 -6
- package/dist/bundled/mod-builder/reference/ui.md +12 -14
- package/dist/bundled/mod-builder/reference/verify.md +11 -11
- package/dist/cli.mjs +5 -5
- package/package.json +4 -4
- package/vsix/commandcode-vscode.vsix +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,10 +1,35 @@
|
|
|
1
1
|
# command-code
|
|
2
2
|
|
|
3
|
+
## 1.1.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- fix: capture the real cause when a self-update fails (#3047)
|
|
8
|
+
- 11e7eb1: fix: mods calling `cmd.ui.setStatus` / `cmd.ui.widget` / `cmd.ui.refreshWidgets` no longer crash
|
|
9
|
+
|
|
10
|
+
These methods are documented in the mod-builder UI reference but were never present on the `ModUi` runtime, so any mod written against the docs threw `cmd.ui.setStatus is not a function` (surfaced as a `mod_error`). They are now safe, inert no-ops (rendering into the TUI is still pending) and the docs say so.
|
|
11
|
+
|
|
12
|
+
- cd3452a: fix: capture the real cause when a self-update fails
|
|
13
|
+
|
|
14
|
+
`executeUpdate` swallowed the underlying `exec` error and returned a bare
|
|
15
|
+
`false`, so every update failure was tracked as a generic `Update failed:
|
|
16
|
+
<from> -> <to>` with no way to tell a permission denial from a network drop
|
|
17
|
+
from a timeout. The install error (exit code, signal, and stderr tail) is now
|
|
18
|
+
threaded through `performAutoUpdate` → `UpdateFailureReport` into the failure
|
|
19
|
+
telemetry (`cmd.update.failure_reason` / `update.failure_reason` and the error
|
|
20
|
+
message) for the CLI, TUI, and `cmd update` paths.
|
|
21
|
+
|
|
22
|
+
## 1.1.0
|
|
23
|
+
|
|
24
|
+
### Minor Changes
|
|
25
|
+
|
|
26
|
+
- feat: improve mods and cmd knowledge internal docs
|
|
27
|
+
|
|
3
28
|
## 1.0.1
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
6
31
|
|
|
7
|
-
- fix
|
|
32
|
+
- fix: /reload header
|
|
8
33
|
|
|
9
34
|
## 1.0.0
|
|
10
35
|
|
|
@@ -36,7 +36,8 @@ the matching reference file.
|
|
|
36
36
|
- `reference/memory.md` — Memory
|
|
37
37
|
- `reference/headless.md` — Headless Mode
|
|
38
38
|
- `reference/plan-mode.md` — Plan Mode and Auto-Accept Mode
|
|
39
|
-
- `reference/
|
|
39
|
+
- `reference/plan-review.md` — Plan Review
|
|
40
|
+
- `reference/checkpoints.md` — Sessions & Checkpoints
|
|
40
41
|
- `reference/models.md` — Command Code Models
|
|
41
42
|
- `reference/product-help.md` — Product help (slash commands, CLI, taste, FAQ, pricing)
|
|
42
43
|
<!-- generated:reference-index:end -->
|
|
@@ -58,10 +58,10 @@ After generation, you’ll confirm tools and save. Manual creation follows the s
|
|
|
58
58
|
|
|
59
59
|
Each agent is a **Markdown file** with YAML front matter and a body that becomes the **system prompt**.
|
|
60
60
|
|
|
61
|
-
- **`name`**
|
|
62
|
-
- **`description`**
|
|
63
|
-
- **`tools`**
|
|
64
|
-
- **`model`**
|
|
61
|
+
- **`name`** - Identifier and filename (e.g. `security-review.md` → agent `security-review`).
|
|
62
|
+
- **`description`** - Tells Command Code **when** to use this agent.
|
|
63
|
+
- **`tools`** - Comma-separated tool list, **`"*"`** for all tools, or a restriction such as read-only style lists.
|
|
64
|
+
- **`model`** - Optional model this agent always runs on (any `/model` id, e.g. `deepseek/deepseek-v4-pro` or `claude-sonnet-5`). Omit it or set `model: inherit` to follow the session's current model. Per-agent models let you pin deep-reasoning models to architect/planner agents while implementation or docs agents ride faster, cheaper ones - each keeps its own prompt cache.
|
|
65
65
|
|
|
66
66
|
Do not use reserved names for custom agents: `explore`, `plan`, `review`, and `general`. Those names are reserved for built-in or internal behavior; custom files with those names are ignored.
|
|
67
67
|
|
|
@@ -86,6 +86,6 @@ You can edit files directly in `.commandcode/agents/` or `~/.commandcode/agents/
|
|
|
86
86
|
|
|
87
87
|
## Next steps
|
|
88
88
|
|
|
89
|
-
- [Interactive mode](https://commandcode.ai/docs/core-concepts/interactive-mode)
|
|
90
|
-
- [Memory](./memory.md)
|
|
91
|
-
- [Skills](./skills.md)
|
|
89
|
+
- [Interactive mode](https://commandcode.ai/docs/core-concepts/interactive-mode) - slash commands and session controls
|
|
90
|
+
- [Memory](./memory.md) - project and user instructions in `AGENTS.md`
|
|
91
|
+
- [Skills](./skills.md) - reusable skill packages vs. full subagents
|
|
@@ -8,7 +8,7 @@ Command Code includes built-in slash commands for interactive workflows, and als
|
|
|
8
8
|
|
|
9
9
|
## Built-in Slash Commands
|
|
10
10
|
|
|
11
|
-
For the full list of built-in slash commands, see [Interactive Mode
|
|
11
|
+
For the full list of built-in slash commands, see [Interactive Mode - Slash Commands](https://commandcode.ai/docs/reference/cli#cli-slash-commands).
|
|
12
12
|
|
|
13
13
|
---
|
|
14
14
|
|
|
@@ -171,15 +171,15 @@ Summarize the current state in ${1:-7} bullet points.
|
|
|
171
171
|
/summarize 3 # → "Summarize the current state in 3 bullet points."
|
|
172
172
|
```
|
|
173
173
|
|
|
174
|
-
Defaults work with `$@`/`$ARGUMENTS` as well
|
|
174
|
+
Defaults work with `$@`/`$ARGUMENTS` as well - `${@:-the current diff}` uses all
|
|
175
175
|
arguments when provided, otherwise the literal text `the current diff`.
|
|
176
176
|
|
|
177
177
|
### Argument Slices with `${@:N}` and `${@:N:L}`
|
|
178
178
|
|
|
179
179
|
Select a range of positional arguments (1-indexed) and join them with spaces:
|
|
180
180
|
|
|
181
|
-
- `${@:N}`
|
|
182
|
-
- `${@:N:L}`
|
|
181
|
+
- `${@:N}` - every argument from the Nth position to the end
|
|
182
|
+
- `${@:N:L}` - `L` arguments starting at the Nth position
|
|
183
183
|
|
|
184
184
|
**Command definition** (`.commandcode/commands/commit.md`):
|
|
185
185
|
|
|
@@ -303,7 +303,7 @@ Include:
|
|
|
303
303
|
| `$ARGUMENTS` / `$@` | All arguments as string | `unit Jest async` | `unit Jest async` |
|
|
304
304
|
| `$1` | First argument | `unit Jest` | `unit` |
|
|
305
305
|
| `$2` | Second argument | `unit Jest` | `Jest` |
|
|
306
|
-
| `$N` | Nth argument |
|
|
306
|
+
| `$N` | Nth argument | - | - |
|
|
307
307
|
| `${N}` | Braced Nth argument (safe next to other text) | `unit Jest` | `unit` |
|
|
308
308
|
| `${N:-default}` | Nth argument, or `default` when missing/empty | `` (none) | `default` |
|
|
309
309
|
| `${@:N}` | Arguments from the Nth position to the end | `a b c` | `b c` (N=2) |
|
|
@@ -46,7 +46,7 @@ Command Code auto-detects piped input when no query argument is provided. If std
|
|
|
46
46
|
|
|
47
47
|
## Permissions
|
|
48
48
|
|
|
49
|
-
By default, headless mode **blocks tools that modify your system**
|
|
49
|
+
By default, headless mode **blocks tools that modify your system** - file writes, file edits, and shell commands are denied. This keeps automated runs safe.
|
|
50
50
|
|
|
51
51
|
To enable all tools, pass `--yolo`:
|
|
52
52
|
|
|
@@ -76,7 +76,7 @@ The conversation loop runs for up to **10 turns**. If the limit is reached, a wa
|
|
|
76
76
|
|
|
77
77
|
## Sessions & Resuming
|
|
78
78
|
|
|
79
|
-
Each headless run persists its transcript to disk, so you can chain follow-up queries that keep prior context. Headless sessions are tagged separately and stay **hidden** from the interactive `/resume` menu and from interactive `--continue`
|
|
79
|
+
Each headless run persists its transcript to disk, so you can chain follow-up queries that keep prior context. Headless sessions are tagged separately and stay **hidden** from the interactive `/resume` menu and from interactive `--continue` - automation never pollutes your interactive history.
|
|
80
80
|
|
|
81
81
|
### Continue the most recent run
|
|
82
82
|
|
|
@@ -87,7 +87,7 @@ cmd -p "find the slowest test"
|
|
|
87
87
|
cmd -p --continue "now suggest a fix" # carries the previous turn's context
|
|
88
88
|
```
|
|
89
89
|
|
|
90
|
-
If no headless session exists yet, `--continue` starts a fresh one
|
|
90
|
+
If no headless session exists yet, `--continue` starts a fresh one - so a `-p --continue` loop works from the first iteration.
|
|
91
91
|
|
|
92
92
|
### Resume a specific session
|
|
93
93
|
|
|
@@ -103,7 +103,7 @@ Then resume that exact session by id:
|
|
|
103
103
|
cmd -p --resume 9f4e1c0a-... "continue the review"
|
|
104
104
|
```
|
|
105
105
|
|
|
106
|
-
A bare `--resume` with no id errors in headless mode
|
|
106
|
+
A bare `--resume` with no id errors in headless mode - there is no interactive picker. Use `--continue` to pick up the latest run instead.
|
|
107
107
|
|
|
108
108
|
### Open a headless session in interactive mode
|
|
109
109
|
|
|
@@ -187,7 +187,7 @@ Flags useful for headless and automated workflows:
|
|
|
187
187
|
| `-m, --model <model>` | Run on a specific model this session |
|
|
188
188
|
| `--effort <level>` | Set reasoning effort (`low`, `medium`, `high`, …) |
|
|
189
189
|
| `--theme <theme>` | Set the color theme (`dark` or `light`) |
|
|
190
|
-
| `--config <key=value>` | Set any setting headlessly (repeatable)
|
|
190
|
+
| `--config <key=value>` | Set any setting headlessly (repeatable) - see below |
|
|
191
191
|
| `--yolo` | Allow file writes and shell commands |
|
|
192
192
|
| `--auto-accept` | Start in auto-accept mode (alias for `--permission-mode auto-accept`) |
|
|
193
193
|
| `--skip-onboarding` | Skip taste onboarding (for CI/automated runs) |
|
|
@@ -199,7 +199,7 @@ Flags useful for headless and automated workflows:
|
|
|
199
199
|
|
|
200
200
|
## Configuring settings
|
|
201
201
|
|
|
202
|
-
Slash commands are interactive-only, but the settings behind them are available as **flags**
|
|
202
|
+
Slash commands are interactive-only, but the settings behind them are available as **flags** -
|
|
203
203
|
never as a `/slash` string on the command line. The common ones have dedicated flags
|
|
204
204
|
(`--model`, `--effort`, `--theme`), and `--config key=value` reaches any setting the `/config`
|
|
205
205
|
UI can change:
|
|
@@ -221,7 +221,7 @@ scriptable automatically. Confirmations print to stderr, keeping `-p` stdout cle
|
|
|
221
221
|
|
|
222
222
|
| **Limitation** | **Details** |
|
|
223
223
|
| -------------- | ----------- |
|
|
224
|
-
| **No interactive prompts** | No keyboard shortcuts or interactive UI. Slash commands aren't typed here
|
|
224
|
+
| **No interactive prompts** | No keyboard shortcuts or interactive UI. Slash commands aren't typed here - use flags instead (see [Configuring settings](#configuring-settings)); session-lifecycle commands like `/clear` and `/reload` have no meaning in one-shot mode |
|
|
225
225
|
| **No resume picker** | A bare `--resume` errors in print mode; resume by explicit id or use `--continue` |
|
|
226
226
|
| **Stdin timeout** | Piped stdin times out after 30 seconds if no data is received |
|
|
227
227
|
|
|
@@ -92,7 +92,7 @@ The `command` field is what Command Code runs when the hook fires. Here it print
|
|
|
92
92
|
|
|
93
93
|
Hooks initialize on startup. Restart Command Code with `cmd`, then run a prompt such as `Use the shell tool to list the files in the current directory`. The message `PreToolUse: hook fired` should appear before the shell command executes.
|
|
94
94
|
|
|
95
|
-
The quickstart hook emits a static message. Real hooks parse the JSON payload on stdin and return results, halt sessions, or inject context for the next turn
|
|
95
|
+
The quickstart hook emits a static message. Real hooks parse the JSON payload on stdin and return results, halt sessions, or inject context for the next turn - read on for configuration, the full schema, examples, and best practices.
|
|
96
96
|
|
|
97
97
|
---
|
|
98
98
|
|
|
@@ -158,7 +158,7 @@ Chooses which tools this group of handlers applies to.
|
|
|
158
158
|
|
|
159
159
|
| **Field** | **Required** | **Type** | **Description** |
|
|
160
160
|
| --------- | ------------ | -------- | --------------- |
|
|
161
|
-
| `matcher` | Optional | `string` | Omit to match every tool. Examples: `"shell"`, `"write\|edit"`. Only meaningful for the tool events (`PreToolUse`, `PostToolUse`). `Stop` and `SessionStart` carry no tool, so a `matcher` there never matches and the hook **will not fire**
|
|
161
|
+
| `matcher` | Optional | `string` | Omit to match every tool. Examples: `"shell"`, `"write\|edit"`. Only meaningful for the tool events (`PreToolUse`, `PostToolUse`). `Stop` and `SessionStart` carry no tool, so a `matcher` there never matches and the hook **will not fire** - omit it for those events. |
|
|
162
162
|
| `hooks` | Required | `array` | One or more handlers. Runs in the order listed |
|
|
163
163
|
|
|
164
164
|
### HookEntry fields (inner)
|
|
@@ -256,7 +256,7 @@ An event may add its own fields on top of the common and tool-call sets. New eve
|
|
|
256
256
|
|
|
257
257
|
#### Stop
|
|
258
258
|
|
|
259
|
-
`Stop` fires when the assistant produces its final response with no remaining tool calls (end of turn). It carries no tool fields
|
|
259
|
+
`Stop` fires when the assistant produces its final response with no remaining tool calls (end of turn). It carries no tool fields - omit `matcher` on `Stop` hooks (a `matcher` here prevents the hook from firing). It provides only the common fields plus:
|
|
260
260
|
|
|
261
261
|
| **Field** | **Type** | **Description** |
|
|
262
262
|
| --------- | -------- | --------------- |
|
|
@@ -264,7 +264,7 @@ An event may add its own fields on top of the common and tool-call sets. New eve
|
|
|
264
264
|
|
|
265
265
|
#### SessionStart
|
|
266
266
|
|
|
267
|
-
`SessionStart` fires once when a session begins. It carries no tool fields
|
|
267
|
+
`SessionStart` fires once when a session begins. It carries no tool fields - omit `matcher` on `SessionStart` hooks (a `matcher` here prevents the hook from firing). It provides only the common fields plus:
|
|
268
268
|
|
|
269
269
|
| **Field** | **Type** | **Description** |
|
|
270
270
|
| --------- | -------- | --------------- |
|
|
@@ -438,11 +438,11 @@ Use this to pick the right field for the audience you want to reach.
|
|
|
438
438
|
|
|
439
439
|
| **Field** | **User (TUI)** | **Model** |
|
|
440
440
|
| --------- | :------------: | :-------: |
|
|
441
|
-
| `stopReason` | ✓ |
|
|
442
|
-
| `systemMessage` | ✓ |
|
|
441
|
+
| `stopReason` | ✓ | - |
|
|
442
|
+
| `systemMessage` | ✓ | - |
|
|
443
443
|
| `permissionDecisionReason` (Pre) | ✓ | ✓ (when denying) |
|
|
444
444
|
| `reason` (Post / Stop) | ✓ | ✓ (Post & Stop when `decision: "block"`; an `exit 2` retry feeds stderr instead) |
|
|
445
|
-
| `additionalContext` |
|
|
445
|
+
| `additionalContext` | - | ✓ (appended before next turn) |
|
|
446
446
|
| `stderr` (exit 2) | ✓ first line | ✓ (full text fed to model on retry, all events) |
|
|
447
447
|
|
|
448
448
|
Rule of thumb: for machine-style detail the model should act on verbatim, use `exit 2` + stderr. For natural-language revision guidance, use Stop's `reason`. For a user-only notice, use `systemMessage` or `stopReason`.
|
|
@@ -2,13 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
# MCP Servers
|
|
4
4
|
|
|
5
|
-
Connect Command Code to external tools and data sources through MCP servers. MCP is an open protocol that lets Command Code interact with external services
|
|
5
|
+
Connect Command Code to external tools and data sources through MCP servers. MCP is an open protocol that lets Command Code interact with external services - databases, APIs, issue trackers, and more.
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## What is MCP?
|
|
10
10
|
|
|
11
|
-
MCP (Model Context Protocol) is an open protocol that lets AI agents connect to external tools and services. With MCP, Command Code can interact with databases, APIs, dev tools, and more
|
|
11
|
+
MCP (Model Context Protocol) is an open protocol that lets AI agents connect to external tools and services. With MCP, Command Code can interact with databases, APIs, dev tools, and more - all through a standardized interface.
|
|
12
12
|
|
|
13
13
|
Instead of building custom integrations, you connect MCP servers and Command Code automatically discovers and uses their tools.
|
|
14
14
|
|
|
@@ -196,8 +196,8 @@ All flags (`--transport`, `--scope`, `--env`, `--header`) must come **before** t
|
|
|
196
196
|
| --------------------------- | -------------------------------------------- | ----------- |
|
|
197
197
|
| `-t, --transport <type>` | Transport type: `stdio` or `http` | `stdio` |
|
|
198
198
|
| `-s, --scope <scope>` | Where to store: `local`, `project`, or `user`| `local` |
|
|
199
|
-
| `-e, --env <KEY=value>` | Environment variable (repeatable) |
|
|
200
|
-
| `-H, --header <Header: value>` | HTTP header (repeatable, http only) |
|
|
199
|
+
| `-e, --env <KEY=value>` | Environment variable (repeatable) | - |
|
|
200
|
+
| `-H, --header <Header: value>` | HTTP header (repeatable, http only) | - |
|
|
201
201
|
|
|
202
202
|
---
|
|
203
203
|
|
|
@@ -260,7 +260,7 @@ cmd mcp add --transport http stripe --scope local https://mcp.stripe.com
|
|
|
260
260
|
|
|
261
261
|
### Project scope
|
|
262
262
|
|
|
263
|
-
Stored in `.mcp.json` at your project root. Checked into version control
|
|
263
|
+
Stored in `.mcp.json` at your project root. Checked into version control - shared with your team.
|
|
264
264
|
|
|
265
265
|
```bash
|
|
266
266
|
cmd mcp add --transport http stripe --scope project https://mcp.stripe.com
|
|
@@ -484,9 +484,9 @@ After adding, authenticate via the `/mcp` menu inside a Command Code session.
|
|
|
484
484
|
|
|
485
485
|
### GitHub
|
|
486
486
|
|
|
487
|
-
Manage GitHub beyond what git supports
|
|
487
|
+
Manage GitHub beyond what git supports - issues, PRs, code search, and more. It requires your GitHub Personal Access Token (PAT).
|
|
488
488
|
|
|
489
|
-
**Fine-grained token (recommended)**
|
|
489
|
+
**Fine-grained token (recommended)** - scoped to specific repos, minimal permissions:
|
|
490
490
|
|
|
491
491
|
1. Go to [GitHub > Settings > Developer settings > Personal access tokens > Fine-grained tokens](https://github.com/settings/personal-access-tokens)
|
|
492
492
|
2. Click **Generate new token**
|
|
@@ -499,7 +499,7 @@ Manage GitHub beyond what git supports — issues, PRs, code search, and more. I
|
|
|
499
499
|
- **Metadata**: Read-only (automatically included)
|
|
500
500
|
6. Generate token and copy it
|
|
501
501
|
|
|
502
|
-
**Classic token**
|
|
502
|
+
**Classic token** - broader access, simpler setup:
|
|
503
503
|
|
|
504
504
|
1. Go to [GitHub > Settings > Developer settings > Personal access tokens > Tokens (classic)](https://github.com/settings/tokens/new)
|
|
505
505
|
2. Name it `commandcode-mcp`, set expiration as needed
|