command-code 1.3.1 → 1.4.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 +12 -0
- package/dist/bundled/command-code-knowledge/reference/headless.md +42 -1
- package/dist/bundled/command-code-knowledge/reference/mcp.md +14 -4
- package/dist/bundled/command-code-knowledge/reference/models.md +4 -3
- package/dist/bundled/command-code-knowledge/reference/plan-mode.md +3 -1
- package/dist/bundled/command-code-knowledge/reference/product-help.md +1 -0
- package/dist/cli.mjs +3 -3
- package/package.json +5 -5
- package/vsix/commandcode-vscode.vsix +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -70,7 +70,47 @@ Only use `--yolo` in trusted environments. It allows Command Code to modify file
|
|
|
70
70
|
|
|
71
71
|
Headless mode supports multi-turn tool execution. Command Code can read files, search code, and (with permissions) edit files and run commands, just like [interactive mode](https://commandcode.ai/docs/core-concepts/interactive-mode).
|
|
72
72
|
|
|
73
|
-
The conversation loop runs for up to **
|
|
73
|
+
The conversation loop runs for up to **100 turns** by default. Raise or lower it with `--max-turns`. If the limit is reached, a warning is printed to stderr and the partial response is returned.
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## JSON output
|
|
78
|
+
|
|
79
|
+
`--output-format json` turns print mode into a machine-readable stream. Use it when a script needs to react to the run, not just read the final answer.
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
cmd -p "summarize the auth module" --output-format json
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
The stream is **newline-delimited JSON** (NDJSON), one object per line, in two shapes.
|
|
86
|
+
|
|
87
|
+
**Event frames**, one per `AgentEvent` as the run progresses:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{"type": "event", "event": {"type": "tool_running", "toolCallId": "…", "toolName": "read_file", "description": "…"}}
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
**One final result line**, always last:
|
|
94
|
+
|
|
95
|
+
```json
|
|
96
|
+
{"type": "result", "subtype": "success", "sessionId": "…", "stopReason": "end_turn", "usage": {…}, "durationMs": 8421, "finalText": "…"}
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
| **Field** | **Always present?** | **Notes** |
|
|
100
|
+
| --------- | ------------------- | --------- |
|
|
101
|
+
| `subtype` | yes | `success`, `error`, or `max_turns` - comes first so a consumer can peek the outcome cheaply |
|
|
102
|
+
| `usage` | yes | Token usage totals for the run |
|
|
103
|
+
| `durationMs` | yes | Wall-clock duration |
|
|
104
|
+
| `finalText` | yes | The assistant's final answer, same text `--output-format text` would print. Empty string on an error result |
|
|
105
|
+
| `sessionId` | **optional** | Omitted when the run fails before a session is resolved (bad input, auth failure) |
|
|
106
|
+
| `stopReason` | **optional** | Why the loop ended (`end_turn`, `max_turns`, …). Omitted entirely on an error result |
|
|
107
|
+
| `error` | **optional** | Present only when `subtype` is `error` - stderr keeps the human-readable copy |
|
|
108
|
+
|
|
109
|
+
Treat `sessionId` and `stopReason` as optional. A run that fails early (auth, invalid input, session setup) emits `subtype: "error"` with neither field, so a script that indexes them unconditionally will break on exactly the cases it most needs to handle.
|
|
110
|
+
|
|
111
|
+
`--output-format text` (the default) keeps the classic behavior: just the final answer on stdout.
|
|
112
|
+
|
|
113
|
+
Parse line by line rather than buffering the whole stream. The event list grows over time, so treat unknown `event.type` values as forward-compatible and ignore them.
|
|
74
114
|
|
|
75
115
|
---
|
|
76
116
|
|
|
@@ -180,6 +220,7 @@ Flags useful for headless and automated workflows:
|
|
|
180
220
|
| **Flag** | **Description** |
|
|
181
221
|
| -------- | --------------- |
|
|
182
222
|
| `-p, --print [query]` | Run in headless mode |
|
|
223
|
+
| `--output-format <format>` | Print-mode output: `text` (default) or `json` - see [JSON output](#json-output) |
|
|
183
224
|
| `-c, --continue` | Resume the most recent headless session in this directory |
|
|
184
225
|
| `-r, --resume <id>` | Resume a specific headless session by id (no bare picker in print mode) |
|
|
185
226
|
| `--verbose` | Print the resolved session id to stderr (for chaining `--resume`) |
|
|
@@ -140,15 +140,25 @@ For copying configs between machines or scripting:
|
|
|
140
140
|
- The JSON accepts `type` as an alias for `transport`.
|
|
141
141
|
- Environment variables in config values (like `${API_KEY}`) are resolved at runtime.
|
|
142
142
|
|
|
143
|
-
**Optional: Import from
|
|
143
|
+
**Optional: Import from another agent**
|
|
144
144
|
|
|
145
|
-
If you already configured MCP servers in
|
|
145
|
+
If you already configured MCP servers in another coding agent, bring them over with the `/import` slash command inside a session. With no argument it pulls from every detected source:
|
|
146
146
|
|
|
147
147
|
```bash
|
|
148
|
-
|
|
148
|
+
/import
|
|
149
149
|
```
|
|
150
150
|
|
|
151
|
-
|
|
151
|
+
To target one source, name it. Each argument maps to that agent only, so pick the one your MCP config actually lives in:
|
|
152
|
+
|
|
153
|
+
```bash
|
|
154
|
+
/import claude # Claude Code
|
|
155
|
+
/import codex # Codex
|
|
156
|
+
/import cursor # Cursor
|
|
157
|
+
/import opencode # OpenCode
|
|
158
|
+
/import gemini # Gemini CLI
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
It imports MCP servers alongside skills, agents, custom commands, and memory. See [Import](https://commandcode.ai/docs/core-concepts/import).
|
|
152
162
|
|
|
153
163
|
---
|
|
154
164
|
|
|
@@ -26,7 +26,7 @@ The model catalog — every id `/model`, `--model`, `model:effort` shorthand, an
|
|
|
26
26
|
| `xiaomi/mimo-v2.5` | MiMo V2.5 | 1M | — | $0.14/$0.28 | efficient long-context agentic coding |
|
|
27
27
|
| `Qwen/Qwen3.6-Max-Preview` | Qwen 3.6 Max Preview | — | — | $1.3/$7.8 | vibe coding & efficient agent execution |
|
|
28
28
|
| `Qwen/Qwen3.6-Plus` | Qwen 3.6 Plus | — | — | $0.5/$3 | agentic coding & reasoning |
|
|
29
|
-
| `Qwen/Qwen3.7-Max` | Qwen 3.7 Max | 1M | — | $
|
|
29
|
+
| `Qwen/Qwen3.7-Max` | Qwen 3.7 Max | 1M | — | $2.5/$7.5 | frontier coding & long-horizon agent execution |
|
|
30
30
|
| `Qwen/Qwen3.7-Plus` | Qwen 3.7 Plus | 1M | — | $0.4/$1.6 | agentic coding & reasoning at lower cost |
|
|
31
31
|
| `stepfun/Step-3.7-Flash` | Step 3.7 Flash | 256K | — | $0.2/$1.15 | multimodal sparse-MoE reasoning |
|
|
32
32
|
| `stepfun/Step-3.5-Flash` | Step 3.5 Flash | 1M | — | $0.1/$0.3 | fast sparse-MoE agentic reasoning |
|
|
@@ -42,8 +42,9 @@ The model catalog — every id `/model`, `--model`, `model:effort` shorthand, an
|
|
|
42
42
|
| `claude-sonnet-5` | Claude Sonnet 5 | 1M | low, medium, high, xhigh, max | $2/$10 | best combo of speed & intelligence (recommended) |
|
|
43
43
|
| `claude-sonnet-4-6` | Claude Sonnet 4.6 | 1M | low, medium, high, xhigh, max | $3/$15 | prev Sonnet, still fast & capable |
|
|
44
44
|
| `claude-fable-5` | Claude Fable 5 | 1M | low, medium, high, xhigh, max | $10/$50 | most capable for demanding reasoning & long-horizon agents |
|
|
45
|
-
| `claude-opus-
|
|
46
|
-
| `claude-opus-4-
|
|
45
|
+
| `claude-opus-5` | Claude Opus 5 | 1M | low, medium, high, xhigh, max | $5/$25 | most intelligent Opus for agents and coding |
|
|
46
|
+
| `claude-opus-4-8` | Claude Opus 4.8 | 1M | low, medium, high, xhigh, max | $5/$25 | prev flagship, still strong for agents and coding |
|
|
47
|
+
| `claude-opus-4-7` | Claude Opus 4.7 | 1M | low, medium, high, xhigh, max | $5/$25 | older Opus, still strong for agents and coding |
|
|
47
48
|
| `claude-haiku-4-5-20251001` | Claude Haiku 4.5 | 200K | — | $1/$5 | fastest & most compact, great for quick tasks |
|
|
48
49
|
## OpenAI
|
|
49
50
|
|
|
@@ -7,7 +7,9 @@ Command Code separates reasoning from execution using permission modes:
|
|
|
7
7
|
- **Plan Mode**: Explore and plan without executing file changes
|
|
8
8
|
- **Auto-Accept Mode**: Implement changes without confirmation prompts
|
|
9
9
|
|
|
10
|
-
`Shift + Tab`
|
|
10
|
+
`Shift + Tab` cycles permission modes rather than toggling between two: `default` to `auto-accept` to `plan` and back to `default`. Launched with `--yolo`, `bypass` joins as a fourth rung (`plan` to `bypass` to `default`).
|
|
11
|
+
|
|
12
|
+
Two modes sit off that cycle. `dont-ask` is selected from settings or `--permission-mode dont-ask`, and pressing `Shift + Tab` from it moves to `auto-accept` and rejoins the normal cycle. `bypass` is only reachable by launching with `--yolo`. To jump straight to a mode without cycling, use `/mode` or its shorthands (`/mode:default`, `/mode:auto-accept`, `/mode:plan`).
|
|
11
13
|
|
|
12
14
|
Once a plan is written, [Plan Review](./plan-review.md) is where you read, comment on, revise, and approve it.
|
|
13
15
|
|