codemini-cli 0.5.5 → 0.5.6
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/README.md +274 -472
- package/codemini-web/codemini_logo.png +0 -0
- package/codemini-web/dist/assets/{highlighted-body-OFNGDK62-DC-rSI65.js → highlighted-body-OFNGDK62-Cc6TA1Qw.js} +1 -1
- package/codemini-web/dist/assets/{index-cYRgZ3WI.js → index-BqNKEgHB.js} +93 -91
- package/codemini-web/dist/assets/index-dYs_njBc.css +2 -0
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-JDxagHq_.js +1 -0
- package/codemini-web/dist/index.html +2 -2
- package/codemini-web/lib/runtime-bridge.js +15 -0
- package/codemini-web/server.js +117 -55
- package/package.json +6 -2
- package/src/cli.js +1 -3
- package/src/commands/chat.js +2 -2
- package/src/core/chat-runtime.js +69 -18
- package/src/core/context-compact.js +158 -6
- package/src/core/fff-adapter.js +2 -5
- package/src/core/version.js +11 -0
- package/codemini-web/dist/assets/index-DErltUwI.css +0 -2
- package/codemini-web/dist/assets/mermaid-GHXKKRXX-DdvTRIYD.js +0 -1
package/README.md
CHANGED
|
@@ -1,10 +1,32 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="./codemini-web/codemini_logo.png" alt="Codemini logo" width="132" height="132" />
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
<h1 align="center">Codemini CLI</h1>
|
|
6
|
+
|
|
7
|
+
<p align="center">
|
|
8
|
+
A sharp, controllable coding agent for teams that want the power of modern AI coding without the chaos of an oversized tool surface.
|
|
9
|
+
</p>
|
|
10
|
+
|
|
11
|
+
<p align="center">
|
|
12
|
+
<a href="https://www.npmjs.com/package/codemini-cli"><img alt="npm version" height="24" src="https://img.shields.io/npm/v/codemini-cli?style=flat&logo=npm&logoColor=white&label=npm&labelColor=0f172a&color=cb3837"></a>
|
|
13
|
+
<a href="https://nodejs.org"><img alt="node version" height="24" src="https://img.shields.io/badge/node-%3E%3D22-339933?style=flat&logo=nodedotjs&logoColor=white&labelColor=0f172a"></a>
|
|
14
|
+
<a href="./LICENSE"><img alt="license" height="24" src="https://img.shields.io/badge/license-MIT-2563eb?style=flat&labelColor=0f172a"></a>
|
|
15
|
+
<a href="#web-ui"><img alt="web ui included" height="24" src="https://img.shields.io/badge/Web%20UI-included-7c3aed?style=flat&logo=googlechrome&logoColor=white&labelColor=0f172a"></a>
|
|
16
|
+
<a href="#quick-start"><img alt="quick start" height="24" src="https://img.shields.io/badge/quick%20start-3%20commands-f97316?style=flat&logo=rocket&logoColor=white&labelColor=0f172a"></a>
|
|
17
|
+
</p>
|
|
18
|
+
|
|
19
|
+
<p align="center">
|
|
20
|
+
<a href="#english">English</a>
|
|
21
|
+
·
|
|
22
|
+
<a href="#简体中文">简体中文</a>
|
|
23
|
+
·
|
|
24
|
+
<a href="#web-ui">Web UI</a>
|
|
25
|
+
·
|
|
26
|
+
<a href="./OPERATIONS.md">Operator Guide</a>
|
|
27
|
+
·
|
|
28
|
+
<a href="./deployment.md">Deployment</a>
|
|
29
|
+
</p>
|
|
8
30
|
|
|
9
31
|
---
|
|
10
32
|
|
|
@@ -12,74 +34,66 @@
|
|
|
12
34
|
|
|
13
35
|
## English
|
|
14
36
|
|
|
15
|
-
Codemini
|
|
16
|
-
|
|
17
|
-
It is designed around a deliberate idea: most coding workflows do not need a huge default tool surface or unrestricted shell behavior. Instead, Codemini starts with a compact core, loads advanced tools on demand, and keeps the agent grounded in structured code operations, session todos, lightweight project indexing, and shell-aware safety rules.
|
|
37
|
+
Codemini is a local-first coding assistant with a CLI, a polished browser UI, compact context management, project indexing, skills, personalities, planning, memory, approvals, and Windows-first shell ergonomics.
|
|
18
38
|
|
|
19
|
-
|
|
39
|
+
It is built around a simple product bet: coding agents get better when their default surface is smaller, their context is cleaner, and their actions are easier to audit.
|
|
20
40
|
|
|
21
|
-
### Why
|
|
41
|
+
### Why It Feels Different
|
|
22
42
|
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
-
|
|
27
|
-
|
|
43
|
+
| What you get | Why it matters |
|
|
44
|
+
| --- | --- |
|
|
45
|
+
| **Small default tool surface** | Models spend less time choosing tools and more time doing the next useful thing. |
|
|
46
|
+
| **Model-agnostic gateway config** | Works with OpenAI-compatible gateways and internal model providers. |
|
|
47
|
+
| **Web UI included** | Sessions, projects, approvals, skills, souls, CodeWiki reports, and runtime status in one local browser app. |
|
|
48
|
+
| **Compact context pipeline** | Micro-compact clears stale tool output; macro compact creates continuation summaries before context gets noisy. |
|
|
49
|
+
| **Windows and PowerShell first** | Designed for real Windows developer machines, not just Unix demos. |
|
|
50
|
+
| **Skills and souls** | Reusable workflows and response personalities without changing core execution policy. |
|
|
51
|
+
| **Project index** | Keeps a lightweight `.codemini/` map so the agent can orient quickly. |
|
|
52
|
+
| **Built-in safety rails** | Approvals, command policy, safe mode, todo tracking, and reviewable plans. |
|
|
28
53
|
|
|
29
|
-
###
|
|
54
|
+
### Quick Start
|
|
30
55
|
|
|
31
|
-
Requires **Node.js
|
|
56
|
+
Requires **Node.js 22 or newer**.
|
|
32
57
|
|
|
33
58
|
```bash
|
|
34
|
-
# Install globally
|
|
35
59
|
npm install -g codemini-cli
|
|
36
|
-
|
|
37
|
-
# Or run without installing
|
|
38
|
-
npx codemini-cli
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
### Quick Start
|
|
42
|
-
|
|
43
|
-
```bash
|
|
44
|
-
# 1. Configure your gateway and model
|
|
45
|
-
codemini config set gateway.base_url http://your-internal-gateway/v1
|
|
60
|
+
codemini config set gateway.base_url http://your-gateway/v1
|
|
46
61
|
codemini config set gateway.api_key your_token
|
|
47
|
-
codemini config set model.name your-
|
|
48
|
-
|
|
49
|
-
# 2. Set shell (PowerShell for Windows, bash for macOS/Linux)
|
|
50
|
-
codemini config set shell.default powershell # Windows
|
|
51
|
-
codemini config set shell.default bash # macOS / Linux
|
|
52
|
-
|
|
53
|
-
# 3. Optional: set reply language and run diagnostics
|
|
54
|
-
codemini config set ui.reply_language zh
|
|
55
|
-
codemini doctor
|
|
56
|
-
|
|
57
|
-
# 4. Start an interactive coding session
|
|
62
|
+
codemini config set model.name your-model
|
|
58
63
|
codemini
|
|
59
64
|
```
|
|
60
65
|
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
Codemini also includes a local Web UI under `codemini-web/`. It runs the same Codemini runtime behind a browser interface, so you can keep the agent workflow visible while managing sessions, projects, approvals, skills, souls, and CodeWiki reports from one place.
|
|
64
|
-
|
|
65
|
-
After installing the npm package, open it directly from any project:
|
|
66
|
+
Open the Web UI:
|
|
66
67
|
|
|
67
68
|
```bash
|
|
68
69
|
codemini --web
|
|
69
|
-
|
|
70
|
-
# Equivalent forms
|
|
71
|
-
codemini web
|
|
72
|
-
codemini -web
|
|
73
70
|
```
|
|
74
71
|
|
|
75
|
-
|
|
72
|
+
On a new machine, the Web UI opens first and lets you configure the gateway from Settings, so a missing or wrong default endpoint does not block startup.
|
|
73
|
+
|
|
74
|
+
### Web UI
|
|
75
|
+
|
|
76
|
+
The Web UI is bundled with the npm package and runs locally.
|
|
76
77
|
|
|
77
78
|
```bash
|
|
79
|
+
codemini --web
|
|
78
80
|
codemini --web --port 3210 --project /path/to/project
|
|
79
81
|
codemini --web --session <session-id> --model <model-name> --no-open
|
|
80
82
|
```
|
|
81
83
|
|
|
82
|
-
|
|
84
|
+
Highlights:
|
|
85
|
+
|
|
86
|
+
| Area | What it does |
|
|
87
|
+
| --- | --- |
|
|
88
|
+
| Chat runtime | Uses the same sessions and config as the CLI. |
|
|
89
|
+
| Project switcher | Move between repositories and general chat without restarting. |
|
|
90
|
+
| Approvals | Review tool calls and plans in focused dialogs/cards. |
|
|
91
|
+
| Skills | Create, inspect, install, enable, and disable reusable workflows. |
|
|
92
|
+
| Souls | Switch response tone without changing execution logic. |
|
|
93
|
+
| CodeWiki | Generate project-requirements reports and ask read-only questions over them. |
|
|
94
|
+
| Runtime status | See active mode, git branch, version state, live progress, and context usage. |
|
|
95
|
+
|
|
96
|
+
Local Web UI development:
|
|
83
97
|
|
|
84
98
|
```bash
|
|
85
99
|
cd codemini-web
|
|
@@ -87,12 +101,7 @@ bun install
|
|
|
87
101
|
bun run dev
|
|
88
102
|
```
|
|
89
103
|
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
- Web app: `http://127.0.0.1:5178` by default, or the next free port
|
|
93
|
-
- API server: `http://127.0.0.1:5000` by default, or the next free port
|
|
94
|
-
|
|
95
|
-
For a single built/served process:
|
|
104
|
+
Single built server:
|
|
96
105
|
|
|
97
106
|
```bash
|
|
98
107
|
cd codemini-web
|
|
@@ -100,237 +109,139 @@ npm run build
|
|
|
100
109
|
npm run start -- --port 3210
|
|
101
110
|
```
|
|
102
111
|
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
- Chat with the Codemini runtime using the same sessions and configuration as the CLI
|
|
106
|
-
- Switch projects and sessions without restarting the process
|
|
107
|
-
- Review tool approvals and plan approvals in focused dialogs/cards
|
|
108
|
-
- Manage config, skills, and soul presets from the browser
|
|
109
|
-
- Browse CodeWiki / project-requirements reports, generate new reports, ask questions about them, and delete stale reports
|
|
110
|
-
- See runtime status, active mode, git branch, version/update state, and live execution progress
|
|
111
|
-
|
|
112
|
-
### Optional: FFF Search Acceleration
|
|
113
|
-
|
|
114
|
-
Codemini CLI can optionally use `fff-mcp` as a faster backend for `grep`, `glob`, and part of `list`.
|
|
115
|
-
|
|
116
|
-
- If `fff-mcp` is installed and available in `PATH`, Codemini will reuse it automatically within the current session.
|
|
117
|
-
- If `fff-mcp` is missing or fails to start, Codemini falls back to its built-in search implementation automatically.
|
|
118
|
-
- This means `fff-mcp` is an enhancement, not a hard dependency.
|
|
119
|
-
- `codemini doctor` now reports `FFF MCP availability` so you can verify whether it is active.
|
|
120
|
-
|
|
121
|
-
### Optional: Playwright Web Rendering
|
|
122
|
-
|
|
123
|
-
`web_fetch` uses a lightweight `fetch` + HTML parser path by default, so Playwright is not installed as a default dependency.
|
|
124
|
-
|
|
125
|
-
For JavaScript-rendered pages, install Playwright separately to enable richer browser-rendered fallback:
|
|
126
|
-
|
|
127
|
-
```bash
|
|
128
|
-
npm install -g playwright
|
|
129
|
-
playwright install chromium
|
|
130
|
-
```
|
|
131
|
-
|
|
132
|
-
### Commands
|
|
112
|
+
### Command Surface
|
|
133
113
|
|
|
134
114
|
| Command | Description |
|
|
135
|
-
|
|
136
|
-
| `codemini [prompt]` | Start an interactive coding session
|
|
137
|
-
| `codemini chat [prompt]` | Chat mode
|
|
138
|
-
| `codemini run <task>` | Run a task non-interactively
|
|
139
|
-
| `codemini run --harness <role> <task>` | Run
|
|
140
|
-
| `codemini run --pipeline <task>` | Run
|
|
141
|
-
| `codemini
|
|
142
|
-
| `codemini
|
|
143
|
-
| `codemini
|
|
144
|
-
| `codemini
|
|
145
|
-
| `codemini doctor` | Run environment diagnostics and validate configuration |
|
|
146
|
-
| `codemini skill list\|install\|enable\|disable\|inspect\|reindex` | Manage skills — list, install, toggle, or inspect bundled/third-party skills |
|
|
115
|
+
| --- | --- |
|
|
116
|
+
| `codemini [prompt]` | Start an interactive coding session. |
|
|
117
|
+
| `codemini chat [prompt]` | Chat mode for single-turn or multi-turn use. |
|
|
118
|
+
| `codemini run <task>` | Run a coding task non-interactively. |
|
|
119
|
+
| `codemini run --harness <role> <task>` | Run with a specific sub-agent role such as `coder`, `planner`, or `reviewer`. |
|
|
120
|
+
| `codemini run --pipeline <task>` | Run planning, implementation, and review as a pipeline. |
|
|
121
|
+
| `codemini --web` | Launch the local Web UI. |
|
|
122
|
+
| `codemini config set|get|list <key> [value]` | Manage gateway, model, shell, UI, context, memory, and soul settings. |
|
|
123
|
+
| `codemini doctor` | Run environment diagnostics. |
|
|
124
|
+
| `codemini skill list|install|enable|disable|inspect|reindex` | Manage builtin, project, and global skills. |
|
|
147
125
|
|
|
148
|
-
###
|
|
126
|
+
### Context Compacting
|
|
149
127
|
|
|
150
|
-
Codemini
|
|
128
|
+
Codemini keeps long sessions usable with a two-phase compact pipeline:
|
|
151
129
|
|
|
152
|
-
|
|
130
|
+
1. **Micro compact** replaces old tool result bodies with a lightweight marker while preserving message order.
|
|
131
|
+
2. **Macro compact** summarizes older context and keeps a legal recent message window for model APIs.
|
|
153
132
|
|
|
154
|
-
|
|
155
|
-
codemini config set soul.preset playful
|
|
156
|
-
```
|
|
133
|
+
The compact view is stored with the session, so follow-up prompts continue from the compressed context while the full transcript remains available in history.
|
|
157
134
|
|
|
158
|
-
###
|
|
135
|
+
### Skills
|
|
159
136
|
|
|
160
|
-
Skills are reusable workflow
|
|
137
|
+
Skills are reusable workflow instructions that can be triggered explicitly or injected automatically when relevant.
|
|
161
138
|
|
|
162
|
-
|
|
163
|
-
|-------|---------|-------------|
|
|
164
|
-
| **superpowers-lite** | Default for all coding work | Lightweight operating style: prefer structured tools, keep context tight, use sub-agents, verify before claiming success; asks 1-3 sharp questions only for high-risk decisions |
|
|
165
|
-
| **grill-me** | Explicit pressure-test requests | Optional scrutiny mode for plans, PRs, launches, and ideas; challenges assumptions without changing the default workflow |
|
|
166
|
-
| **brainstorm** | Multiple reasonable approaches exist | Explores options and tradeoffs before coding; asks one question at a time to resolve uncertainty |
|
|
167
|
-
| **writing-plans** | Non-trivial implementation task | Creates a step-by-step plan with exact file paths, code, and verification steps before touching code |
|
|
139
|
+
Bundled skills:
|
|
168
140
|
|
|
169
|
-
|
|
141
|
+
| Skill | Use case |
|
|
142
|
+
| --- | --- |
|
|
143
|
+
| `superpowers-lite` | Default coding workflow: inspect, plan only when useful, edit narrowly, verify. |
|
|
144
|
+
| `grill-me` | Pressure-test plans, PRs, launches, or ideas. |
|
|
145
|
+
| `brainstorm` | Explore several reasonable approaches before coding. |
|
|
146
|
+
| `writing-plans` | Produce implementation plans with exact files and checks. |
|
|
170
147
|
|
|
171
148
|
```bash
|
|
172
|
-
codemini skill list
|
|
173
|
-
codemini skill install <path>
|
|
174
|
-
codemini skill install --scope=global <path>
|
|
175
|
-
codemini skill inspect <name>
|
|
149
|
+
codemini skill list
|
|
150
|
+
codemini skill install <path>
|
|
151
|
+
codemini skill install --scope=global <path>
|
|
152
|
+
codemini skill inspect <name>
|
|
176
153
|
```
|
|
177
154
|
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
### How The Tool Model Works
|
|
181
|
-
|
|
182
|
-
Codemini CLI intentionally separates tools into two layers:
|
|
183
|
-
|
|
184
|
-
- **Default tools** — always visible, optimized for the most common coding path
|
|
185
|
-
- **Deferred tools** — loaded only when needed through `tool_search`
|
|
186
|
-
|
|
187
|
-
This keeps the main interface smaller and makes the agent's first-choice behavior more predictable.
|
|
188
|
-
|
|
189
|
-
Typical flow:
|
|
190
|
-
|
|
191
|
-
1. `query_project_index` or `list` to orient
|
|
192
|
-
2. `read` and `grep` to inspect
|
|
193
|
-
3. `edit` or `write` to change code
|
|
194
|
-
4. `run` to verify
|
|
195
|
-
5. `update_todos` to keep complex work legible
|
|
196
|
-
6. `tool_search` only when a more specialized capability is needed
|
|
197
|
-
|
|
198
|
-
### Core Capabilities
|
|
155
|
+
### Souls
|
|
199
156
|
|
|
200
|
-
|
|
201
|
-
- `read`, `grep`, `glob`, `list`, `query_project_index`
|
|
202
|
-
- `edit`, `write`
|
|
203
|
-
- `read_plan`, `update_plan`, `update_todos`
|
|
204
|
-
- `run`, `tool_search`
|
|
205
|
-
- On-demand tools for advanced workflows:
|
|
206
|
-
- AST tools: `ast_query`, `read_ast_node`
|
|
207
|
-
- background task management tools
|
|
208
|
-
- persistent memory tools
|
|
209
|
-
- dream loop tools: `capture_memory`, `dream_consolidate`
|
|
210
|
-
- Session-level todo checklists via `update_todos`, rendered natively in the TUI
|
|
211
|
-
- Unified shell execution model:
|
|
212
|
-
- one-off commands via `run`
|
|
213
|
-
- long-running commands via `run` with `run_in_background=true`
|
|
214
|
-
- Lightweight project index under `.codemini/`
|
|
215
|
-
- Tree-sitter based structured editing for function, class, and method-level changes
|
|
216
|
-
- Reply language control via `ui.reply_language`
|
|
217
|
-
- Safe mode enabled by default
|
|
157
|
+
Souls change tone and expression style without changing tool policy or execution behavior.
|
|
218
158
|
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
`/reflect` turns a successful workflow from the current session into a reviewed, reusable `SKILL.md` draft.
|
|
222
|
-
|
|
223
|
-
It is separate from the dream loop: reflect creates a skill draft, waits for review, and writes only after approval. It does not write inbox memories or run dream consolidation.
|
|
224
|
-
|
|
225
|
-
Common forms:
|
|
159
|
+
Built-in presets:
|
|
226
160
|
|
|
227
161
|
```text
|
|
228
|
-
|
|
229
|
-
/reflect <what to preserve>
|
|
230
|
-
/reflect --scope=global <what to preserve>
|
|
162
|
+
default, professional, ceo, playful, anime, caveman, pirate
|
|
231
163
|
```
|
|
232
164
|
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
- The draft is previewed first. Use `/yes` to write it, `/edit <feedback>` to revise it, or `/no` to discard it.
|
|
237
|
-
|
|
238
|
-
Approved skills are written to the same locations used by third-party skill install:
|
|
239
|
-
|
|
240
|
-
- Project scope: `.codemini/skills/<skill-name>/SKILL.md`
|
|
241
|
-
- Global scope: `<base-config-dir>/skills/<skill-name>/SKILL.md`
|
|
242
|
-
|
|
243
|
-
### Dream Loop (Built-in Memory Evolution)
|
|
244
|
-
|
|
245
|
-
Dream loop is built into the runtime as native tools and slash commands (not a skill-only workflow).
|
|
246
|
-
|
|
247
|
-
What goes into inbox vs persistent memory:
|
|
165
|
+
```bash
|
|
166
|
+
codemini config set soul.preset professional
|
|
167
|
+
```
|
|
248
168
|
|
|
249
|
-
|
|
250
|
-
- Typical inbox entries: user corrections, repeated failures, stable preferences, workflow wins, capability gaps, and decisions.
|
|
251
|
-
- Inbox is intentionally noisy and temporary; entries are reviewed by consolidation before promotion.
|
|
252
|
-
- User memory stores user-specific stable preferences and habits that should follow the user across repos.
|
|
253
|
-
- Global memory stores stable cross-task learnings and generally reusable rules.
|
|
254
|
-
- Project memory stores repo-specific conventions, workflows, and constraints tied to one codebase.
|
|
255
|
-
- Archive (`memory/archive/...`) keeps rejected/superseded evidence instead of silently deleting it.
|
|
169
|
+
### Memory And Dream Loop
|
|
256
170
|
|
|
257
|
-
|
|
258
|
-
- Tool: `capture_memory`
|
|
259
|
-
- Slash: `/capture <summary> [--scope global|repo|thread] [--type observation|correction|failure|preference|pattern|win|gap|decision]`
|
|
260
|
-
- Inspect inbox:
|
|
261
|
-
- Slash: `/inbox [since-YYYY-MM-DD]`
|
|
262
|
-
- Consolidate inbox into long-term/project memory:
|
|
263
|
-
- Tool: `dream_consolidate`
|
|
264
|
-
- Slash: `/dream [--dry-run] [--scope=global|repo|thread]`
|
|
171
|
+
Codemini has native memory tools and slash commands:
|
|
265
172
|
|
|
266
|
-
|
|
173
|
+
| Command | Purpose |
|
|
174
|
+
| --- | --- |
|
|
175
|
+
| `/capture <summary>` | Capture a high-signal observation into inbox. |
|
|
176
|
+
| `/inbox` | Review pending memory evidence. |
|
|
177
|
+
| `/dream [--dry-run]` | Consolidate inbox entries into durable user/global/project memory. |
|
|
178
|
+
| `/reflect` | Turn a successful workflow into a reviewed `SKILL.md` draft. |
|
|
267
179
|
|
|
268
|
-
|
|
269
|
-
- `execution.mode=plan`: model-planned tool calls are not executed, but slash command `/dream` still executes directly in runtime.
|
|
180
|
+
Inbox is intentionally temporary and noisy. Dream consolidation decides what deserves promotion into longer-term memory.
|
|
270
181
|
|
|
271
182
|
### Project Index
|
|
272
183
|
|
|
273
|
-
Codemini
|
|
274
|
-
|
|
275
|
-
- `project-map.json` — high-level repository facts such as languages, source roots, test roots, and entry candidates
|
|
276
|
-
- `file-index.json` — per-file structure such as imports, exports, functions, classes, and lightweight symbol hints
|
|
277
|
-
|
|
278
|
-
The index is initialized when entering a project and refreshed incrementally after edits, writes, and patches. It is intended to be factual, compact, and inexpensive to keep current.
|
|
184
|
+
Codemini maintains a lightweight project map under `.codemini/`:
|
|
279
185
|
|
|
280
|
-
|
|
281
|
-
|
|
186
|
+
| File | Purpose |
|
|
187
|
+
| --- | --- |
|
|
188
|
+
| `.codemini/project-map.json` | Languages, roots, tests, entry candidates, and repo-level facts. |
|
|
189
|
+
| `.codemini/file-index.json` | Imports, exports, functions, classes, and symbol hints. |
|
|
282
190
|
|
|
283
|
-
|
|
284
|
-
- Project workspace state: `.codemini/`
|
|
285
|
-
- Lightweight project index: `.codemini/`
|
|
286
|
-
- Bundled repo skills: `skills/<name>/SKILL.md`
|
|
287
|
-
- Project-scoped skills: `.codemini/skills/<name>/SKILL.md`
|
|
288
|
-
- Global installed skills: `<base-config-dir>/skills/<name>/SKILL.md`
|
|
191
|
+
The index is initialized when entering a project and refreshed after edits/writes/patches.
|
|
289
192
|
|
|
290
|
-
|
|
193
|
+
### Optional Accelerators
|
|
291
194
|
|
|
292
|
-
|
|
293
|
-
|----------|------|
|
|
294
|
-
| `CODEMINI_GLOBAL_DIR` env | `$CODEMINI_GLOBAL_DIR` (highest priority) |
|
|
295
|
-
| Windows | `%APPDATA%\codemini-global\` |
|
|
296
|
-
| macOS | `~/Library/Preferences/codemini-global` |
|
|
297
|
-
| Linux / XDG | `$XDG_CONFIG_HOME/codemini-global` |
|
|
298
|
-
| Restricted fallback | `.codemini-global/` |
|
|
195
|
+
FFF search acceleration:
|
|
299
196
|
|
|
300
|
-
|
|
197
|
+
```bash
|
|
198
|
+
codemini doctor
|
|
199
|
+
```
|
|
301
200
|
|
|
302
|
-
|
|
201
|
+
If `fff-mcp` is present in `PATH`, Codemini can use it for faster `grep`, `glob`, and selected `list` paths. If it is missing, built-in search is used.
|
|
303
202
|
|
|
304
|
-
|
|
203
|
+
Playwright rendering for JavaScript-heavy pages:
|
|
305
204
|
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
- a code assistant that prefers structured operations over shell noise
|
|
205
|
+
```bash
|
|
206
|
+
npm install -g playwright
|
|
207
|
+
playwright install chromium
|
|
208
|
+
```
|
|
311
209
|
|
|
312
|
-
###
|
|
210
|
+
### Data Paths
|
|
313
211
|
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
212
|
+
| Scope | Path |
|
|
213
|
+
| --- | --- |
|
|
214
|
+
| Global sessions | `<base-config-dir>/sessions/` |
|
|
215
|
+
| Project state | `.codemini/` |
|
|
216
|
+
| Project skills | `.codemini/skills/<name>/SKILL.md` |
|
|
217
|
+
| Global skills | `<base-config-dir>/skills/<name>/SKILL.md` |
|
|
218
|
+
| Windows config | `%APPDATA%\codemini-global\` |
|
|
219
|
+
| macOS config | `~/Library/Preferences/codemini-global` |
|
|
220
|
+
| Linux/XDG config | `$XDG_CONFIG_HOME/codemini-global` |
|
|
317
221
|
|
|
318
222
|
### Development
|
|
319
223
|
|
|
320
224
|
```bash
|
|
321
|
-
# Install dependencies
|
|
322
225
|
npm install
|
|
323
|
-
|
|
324
|
-
# Run tests
|
|
325
226
|
npm test
|
|
326
|
-
|
|
327
|
-
# Start locally
|
|
328
227
|
npm start
|
|
329
228
|
```
|
|
330
229
|
|
|
230
|
+
Build the bundled Web UI:
|
|
231
|
+
|
|
232
|
+
```bash
|
|
233
|
+
npm run build:web
|
|
234
|
+
```
|
|
235
|
+
|
|
236
|
+
### Documentation
|
|
237
|
+
|
|
238
|
+
- [OPERATIONS.md](./OPERATIONS.md) - day-to-day operator guide
|
|
239
|
+
- [deployment.md](./deployment.md) - packaging, installation, and deployment
|
|
240
|
+
- [Releases](https://github.com/havingautism/Codemini-CLI/releases) - changelog
|
|
241
|
+
|
|
331
242
|
### License
|
|
332
243
|
|
|
333
|
-
[MIT](LICENSE)
|
|
244
|
+
[MIT](./LICENSE)
|
|
334
245
|
|
|
335
246
|
---
|
|
336
247
|
|
|
@@ -338,72 +249,66 @@ npm start
|
|
|
338
249
|
|
|
339
250
|
## 简体中文
|
|
340
251
|
|
|
341
|
-
Codemini
|
|
252
|
+
Codemini 是一个本地优先的 coding agent:既有 CLI,也有精致的本地 Web UI;内置上下文压缩、项目索引、Skills、Souls、计划审批、记忆演化和 Windows / PowerShell 友好的执行体验。
|
|
342
253
|
|
|
343
|
-
|
|
254
|
+
它的核心判断很简单:coding agent 不应该默认暴露一堆工具、塞满上下文、让用户看不清它做了什么。Codemini 选择更小的默认工具面、更干净的上下文、更可审计的执行链路。
|
|
344
255
|
|
|
345
|
-
###
|
|
256
|
+
### 为什么看起来更像一个产品
|
|
346
257
|
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
258
|
+
| 你得到什么 | 为什么重要 |
|
|
259
|
+
| --- | --- |
|
|
260
|
+
| **精简默认工具面** | 模型少犹豫,少乱走,优先做下一件有用的事。 |
|
|
261
|
+
| **模型网关可配置** | 支持 OpenAI 兼容接口,也适合内部模型网关。 |
|
|
262
|
+
| **内置 Web UI** | 会话、项目、审批、技能、人格、CodeWiki、运行状态集中管理。 |
|
|
263
|
+
| **上下文压缩链路** | micro compact 清理旧工具输出,macro compact 生成可继续工作的摘要。 |
|
|
264
|
+
| **Windows / PowerShell 一等支持** | 面向真实 Windows 开发机,而不是只适配 Unix demo。 |
|
|
265
|
+
| **Skills 和 Souls** | 把稳定工作流沉淀成技能,把回复风格和执行逻辑分开。 |
|
|
266
|
+
| **轻量项目索引** | 在 `.codemini/` 里维护事实索引,让模型更快理解仓库。 |
|
|
267
|
+
| **安全和审计** | 审批、命令策略、safe mode、todo、计划卡片都内置。 |
|
|
352
268
|
|
|
353
|
-
###
|
|
269
|
+
### 快速开始
|
|
354
270
|
|
|
355
|
-
需要 **Node.js
|
|
271
|
+
需要 **Node.js 22 或更高版本**。
|
|
356
272
|
|
|
357
273
|
```bash
|
|
358
|
-
# 全局安装
|
|
359
274
|
npm install -g codemini-cli
|
|
360
|
-
|
|
361
|
-
# 或不安装直接运行
|
|
362
|
-
npx codemini-cli
|
|
363
|
-
```
|
|
364
|
-
|
|
365
|
-
### 快速开始
|
|
366
|
-
|
|
367
|
-
```bash
|
|
368
|
-
# 1. 配置网关和模型
|
|
369
|
-
codemini config set gateway.base_url http://your-internal-gateway/v1
|
|
275
|
+
codemini config set gateway.base_url http://your-gateway/v1
|
|
370
276
|
codemini config set gateway.api_key your_token
|
|
371
|
-
codemini config set model.name your-
|
|
372
|
-
|
|
373
|
-
# 2. 设置 shell(Windows 用 PowerShell,macOS/Linux 用 bash)
|
|
374
|
-
codemini config set shell.default powershell # Windows
|
|
375
|
-
codemini config set shell.default bash # macOS / Linux
|
|
376
|
-
|
|
377
|
-
# 3. 可选:设置回复语言,运行诊断
|
|
378
|
-
codemini config set ui.reply_language zh
|
|
379
|
-
codemini doctor
|
|
380
|
-
|
|
381
|
-
# 4. 启动交互式编码会话
|
|
277
|
+
codemini config set model.name your-model
|
|
382
278
|
codemini
|
|
383
279
|
```
|
|
384
280
|
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
Codemini 也内置了一个本地 Web UI,位于 `codemini-web/`。它复用同一套 Codemini runtime,只是把交互入口放到浏览器里,适合更直观地查看会话、项目、审批、技能、人格和 CodeWiki 报告。
|
|
388
|
-
|
|
389
|
-
npm 包安装后,可以在任意项目目录直接打开:
|
|
281
|
+
启动 Web UI:
|
|
390
282
|
|
|
391
283
|
```bash
|
|
392
284
|
codemini --web
|
|
393
|
-
|
|
394
|
-
# 等价写法
|
|
395
|
-
codemini web
|
|
396
|
-
codemini -web
|
|
397
285
|
```
|
|
398
286
|
|
|
399
|
-
|
|
287
|
+
新电脑上即使默认接口还没配置好,Web UI 也会先打开,然后在设置里配置 Base URL、API Key 和模型,不会因为默认接口 404 卡住启动。
|
|
288
|
+
|
|
289
|
+
### Web UI
|
|
290
|
+
|
|
291
|
+
Web UI 随 npm 包一起发布,本地运行:
|
|
400
292
|
|
|
401
293
|
```bash
|
|
294
|
+
codemini --web
|
|
402
295
|
codemini --web --port 3210 --project /path/to/project
|
|
403
296
|
codemini --web --session <session-id> --model <model-name> --no-open
|
|
404
297
|
```
|
|
405
298
|
|
|
406
|
-
|
|
299
|
+
能力概览:
|
|
300
|
+
|
|
301
|
+
| 区域 | 作用 |
|
|
302
|
+
| --- | --- |
|
|
303
|
+
| 对话运行时 | 复用 CLI 的会话和配置。 |
|
|
304
|
+
| 项目切换 | 不重启进程也能切换仓库和普通会话。 |
|
|
305
|
+
| 审批 | 用弹窗/卡片审阅工具调用和计划。 |
|
|
306
|
+
| Skills | 创建、查看、安装、启用、禁用可复用工作流。 |
|
|
307
|
+
| Souls | 切换表达风格,不影响执行策略。 |
|
|
308
|
+
| CodeWiki | 生成项目需求报告,并基于报告做只读问答。 |
|
|
309
|
+
| 运行状态 | 展示执行模式、git 分支、版本状态、实时进度和上下文占用。 |
|
|
310
|
+
|
|
311
|
+
本地开发:
|
|
407
312
|
|
|
408
313
|
```bash
|
|
409
314
|
cd codemini-web
|
|
@@ -411,12 +316,7 @@ bun install
|
|
|
411
316
|
bun run dev
|
|
412
317
|
```
|
|
413
318
|
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
- Web 应用:默认 `http://127.0.0.1:5178`,如果端口占用会自动寻找下一个可用端口
|
|
417
|
-
- API 服务:默认 `http://127.0.0.1:5000`,如果端口占用会自动寻找下一个可用端口
|
|
418
|
-
|
|
419
|
-
如果想使用构建后的单进程服务:
|
|
319
|
+
构建后单进程运行:
|
|
420
320
|
|
|
421
321
|
```bash
|
|
422
322
|
cd codemini-web
|
|
@@ -424,234 +324,136 @@ npm run build
|
|
|
424
324
|
npm run start -- --port 3210
|
|
425
325
|
```
|
|
426
326
|
|
|
427
|
-
当前 Web UI 重点能力:
|
|
428
|
-
|
|
429
|
-
- 使用和 CLI 相同的会话、配置与运行时进行对话
|
|
430
|
-
- 在浏览器里切换项目和历史会话
|
|
431
|
-
- 通过弹窗/卡片审阅 tool approval 和 plan approval
|
|
432
|
-
- 管理配置、skills 和 soul 人格预设
|
|
433
|
-
- 浏览 CodeWiki / project-requirements 报告,生成新报告,基于报告提问,并删除过期报告
|
|
434
|
-
- 查看运行状态、执行模式、git 分支、版本更新状态和实时执行进度
|
|
435
|
-
|
|
436
|
-
### 可选:FFF 搜索加速
|
|
437
|
-
|
|
438
|
-
Codemini CLI 可以可选地使用 `fff-mcp` 作为 `grep`、`glob` 和部分 `list` 的更快后端。
|
|
439
|
-
|
|
440
|
-
- 如果 `fff-mcp` 已安装并且在 `PATH` 中可用,Codemini 会在当前会话内自动复用它。
|
|
441
|
-
- 如果 `fff-mcp` 缺失或启动失败,Codemini 会自动回退到内置搜索实现。
|
|
442
|
-
- 这意味着 `fff-mcp` 是增强项,不是硬依赖。
|
|
443
|
-
- 现在可以通过 `codemini doctor` 里的 `FFF MCP availability` 看到它是否可用。
|
|
444
|
-
|
|
445
|
-
### 可选:Playwright 网页渲染
|
|
446
|
-
|
|
447
|
-
`web_fetch` 默认使用轻量的 `fetch` + HTML 解析路径,因此 Playwright 不再作为默认依赖安装。
|
|
448
|
-
|
|
449
|
-
如果经常读取 JavaScript 渲染页面,可以单独安装 Playwright,让 `web_fetch` 在需要时回退到浏览器渲染:
|
|
450
|
-
|
|
451
|
-
```bash
|
|
452
|
-
npm install -g playwright
|
|
453
|
-
playwright install chromium
|
|
454
|
-
```
|
|
455
|
-
|
|
456
327
|
### 命令概览
|
|
457
328
|
|
|
458
329
|
| 命令 | 说明 |
|
|
459
|
-
|
|
460
|
-
| `codemini [prompt]` |
|
|
461
|
-
| `codemini chat [prompt]` |
|
|
462
|
-
| `codemini run <task>` |
|
|
463
|
-
| `codemini run --harness <role> <task>` |
|
|
464
|
-
| `codemini run --pipeline <task>` |
|
|
465
|
-
| `codemini
|
|
466
|
-
| `codemini
|
|
467
|
-
| `codemini
|
|
468
|
-
| `codemini
|
|
469
|
-
| `codemini doctor` | 运行环境诊断并验证配置 |
|
|
470
|
-
| `codemini skill list\|install\|enable\|disable\|inspect\|reindex` | 管理 skill——列表、安装、启用/禁用、检查 |
|
|
330
|
+
| --- | --- |
|
|
331
|
+
| `codemini [prompt]` | 启动交互式编码会话。 |
|
|
332
|
+
| `codemini chat [prompt]` | 单轮或多轮对话模式。 |
|
|
333
|
+
| `codemini run <task>` | 非交互式执行编码任务。 |
|
|
334
|
+
| `codemini run --harness <role> <task>` | 用指定 sub-agent 角色执行任务。 |
|
|
335
|
+
| `codemini run --pipeline <task>` | 计划、实现、审查流水线。 |
|
|
336
|
+
| `codemini --web` | 打开本地 Web UI。 |
|
|
337
|
+
| `codemini config set|get|list <key> [value]` | 管理网关、模型、shell、UI、上下文、记忆、人格配置。 |
|
|
338
|
+
| `codemini doctor` | 环境诊断。 |
|
|
339
|
+
| `codemini skill list|install|enable|disable|inspect|reindex` | 管理内置、项目级、全局 Skills。 |
|
|
471
340
|
|
|
472
|
-
###
|
|
341
|
+
### 上下文压缩
|
|
473
342
|
|
|
474
|
-
Codemini
|
|
343
|
+
Codemini 用两阶段 compact 保持长会话可继续:
|
|
475
344
|
|
|
476
|
-
|
|
345
|
+
1. **Micro compact**:把旧 tool result 正文替换成轻量标记,保留消息顺序。
|
|
346
|
+
2. **Macro compact**:把旧上下文总结成 continuation summary,并保留合法的最近消息窗口。
|
|
477
347
|
|
|
478
|
-
|
|
479
|
-
codemini config set soul.preset playful
|
|
480
|
-
```
|
|
348
|
+
compact view 会写入 session,后续提问使用压缩视图继续;完整历史仍留在 session 里。
|
|
481
349
|
|
|
482
|
-
###
|
|
350
|
+
### Skills
|
|
483
351
|
|
|
484
|
-
Skill
|
|
352
|
+
Skill 是可复用工作流,可以显式触发,也可以在适合时自动注入。
|
|
485
353
|
|
|
486
|
-
|
|
487
|
-
|-------|----------|------|
|
|
488
|
-
| **superpowers-lite** | 所有编码工作的默认 skill | 轻量操作风格:优先结构化工具、保持上下文精简、使用 sub-agent、验证后再报告完成;仅在高风险决策中提出 1-3 个尖锐问题 |
|
|
489
|
-
| **grill-me** | 明确要求压力测试或拷问时 | 可选审查模式,用于方案、PR、发布和想法;挑战假设但不改变默认协作流程 |
|
|
490
|
-
| **brainstorm** | 存在多种合理方案时 | 在编码前探索选项和权衡;每次只问一个问题来消除不确定性 |
|
|
491
|
-
| **writing-plans** | 非平凡的实现任务 | 在动手之前创建包含精确文件路径、代码和验证步骤的分步计划 |
|
|
354
|
+
内置 Skills:
|
|
492
355
|
|
|
493
|
-
|
|
356
|
+
| Skill | 适用场景 |
|
|
357
|
+
| --- | --- |
|
|
358
|
+
| `superpowers-lite` | 默认编码流程:先理解、必要时计划、小范围编辑、验证后报告。 |
|
|
359
|
+
| `grill-me` | 对方案、PR、发布、想法做压力测试。 |
|
|
360
|
+
| `brainstorm` | 多种方案都合理时,先比较选项再动手。 |
|
|
361
|
+
| `writing-plans` | 生成带文件路径和验证步骤的实施计划。 |
|
|
494
362
|
|
|
495
363
|
```bash
|
|
496
|
-
codemini skill list
|
|
497
|
-
codemini skill install <path>
|
|
498
|
-
codemini skill install --scope=global <path>
|
|
499
|
-
codemini skill inspect <name>
|
|
364
|
+
codemini skill list
|
|
365
|
+
codemini skill install <path>
|
|
366
|
+
codemini skill install --scope=global <path>
|
|
367
|
+
codemini skill inspect <name>
|
|
500
368
|
```
|
|
501
369
|
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
### 工具模型怎么设计
|
|
505
|
-
|
|
506
|
-
Codemini CLI 把工具分成两层:
|
|
507
|
-
|
|
508
|
-
- **默认工具** — 永远可见,覆盖最常见的编码主路径
|
|
509
|
-
- **延迟工具** — 只有在需要时才通过 `tool_search` 加载
|
|
510
|
-
|
|
511
|
-
这样做的目标,是让主界面更小、更稳,也让模型在第一反应时更容易走对路径。
|
|
512
|
-
|
|
513
|
-
典型流程:
|
|
514
|
-
|
|
515
|
-
1. `query_project_index` 或 `list` 做定位
|
|
516
|
-
2. `read` 和 `grep` 做理解
|
|
517
|
-
3. `edit` 或 `write` 做改动
|
|
518
|
-
4. `run` 做验证
|
|
519
|
-
5. `update_todos` 追踪复杂任务
|
|
520
|
-
6. 真的需要专门能力时,再 `tool_search`
|
|
521
|
-
|
|
522
|
-
### 核心能力
|
|
370
|
+
### Souls
|
|
523
371
|
|
|
524
|
-
|
|
525
|
-
- `read`、`grep`、`glob`、`list`、`query_project_index`
|
|
526
|
-
- `edit`、`write`
|
|
527
|
-
- `read_plan`、`update_plan`、`update_todos`
|
|
528
|
-
- `run`、`tool_search`
|
|
529
|
-
- 更专业的能力按需加载:
|
|
530
|
-
- AST 工具:`ast_query`、`read_ast_node`
|
|
531
|
-
- 后台任务管理工具
|
|
532
|
-
- 持久 memory 工具
|
|
533
|
-
- dream loop 工具:`capture_memory`、`dream_consolidate`
|
|
534
|
-
- 通过 `update_todos` 维护复杂单任务的会话级待办清单,并直接渲染在 TUI 中
|
|
535
|
-
- 统一的 shell 执行模型:
|
|
536
|
-
- 一次性命令直接 `run`
|
|
537
|
-
- 长运行命令通过 `run` + `run_in_background=true`
|
|
538
|
-
- 在 `.codemini/` 下维护轻量项目索引,帮助模型更快理解仓库
|
|
539
|
-
- 基于 Tree-sitter 的结构化编辑能力,适合函数级、类级、方法级改动
|
|
540
|
-
- 支持通过 `ui.reply_language` 控制回复语言
|
|
541
|
-
- safe mode 默认开启
|
|
372
|
+
Soul 只改变语气和表达风格,不改变工具策略或执行逻辑。
|
|
542
373
|
|
|
543
|
-
|
|
544
|
-
|
|
545
|
-
`/reflect` 可以把当前会话中已经跑通的成功链路沉淀成一个可审阅、可复用的 `SKILL.md` 草稿。
|
|
546
|
-
|
|
547
|
-
它和 dream loop 是分开的:reflect 只生成 skill 草稿,先让用户审阅,确认后才写文件;不会写入 inbox,也不会触发 dream consolidation。
|
|
548
|
-
|
|
549
|
-
常用形式:
|
|
374
|
+
内置预设:
|
|
550
375
|
|
|
551
376
|
```text
|
|
552
|
-
|
|
553
|
-
/reflect <要沉淀的用户要求>
|
|
554
|
-
/reflect --scope=global <要沉淀的用户要求>
|
|
377
|
+
default, professional, ceo, playful, anime, caveman, pirate
|
|
555
378
|
```
|
|
556
379
|
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
- 草稿会先预览。用 `/yes` 写入,用 `/edit <反馈>` 修改,用 `/no` 放弃。
|
|
561
|
-
|
|
562
|
-
确认后的 skill 写入位置和第三方 skill 安装保持一致:
|
|
563
|
-
|
|
564
|
-
- 项目级:`.codemini/skills/<skill-name>/SKILL.md`
|
|
565
|
-
- 全局级:`<base-config-dir>/skills/<skill-name>/SKILL.md`
|
|
566
|
-
|
|
567
|
-
### Dream Loop(内置记忆演化)
|
|
568
|
-
|
|
569
|
-
Dream loop 是运行时内置能力,不依赖 skill 才能使用。
|
|
570
|
-
|
|
571
|
-
Inbox 和持久记忆的区别:
|
|
380
|
+
```bash
|
|
381
|
+
codemini config set soul.preset professional
|
|
382
|
+
```
|
|
572
383
|
|
|
573
|
-
|
|
574
|
-
- 典型 inbox 条目:用户纠正、重复失败、稳定偏好、流程收益、能力缺口、关键决策。
|
|
575
|
-
- Inbox 本质上是临时且可能带噪的,需经 consolidation 审核后再晋升。
|
|
576
|
-
- User memory 保存“跟这个用户长期相关”的稳定偏好与习惯,可跨仓库复用。
|
|
577
|
-
- Global memory 保存跨任务可复用的稳定经验或规则。
|
|
578
|
-
- Project memory 保存特定仓库的约定、流程和约束。
|
|
579
|
-
- Archive(`memory/archive/...`)用于保留被拒绝/被覆盖证据,而不是静默删除。
|
|
384
|
+
### 记忆与 Dream Loop
|
|
580
385
|
|
|
581
|
-
|
|
582
|
-
- 工具:`capture_memory`
|
|
583
|
-
- 斜杠命令:`/capture <summary> [--scope global|repo|thread] [--type observation|correction|failure|preference|pattern|win|gap|decision]`
|
|
584
|
-
- 查看 inbox:
|
|
585
|
-
- 斜杠命令:`/inbox [since-YYYY-MM-DD]`
|
|
586
|
-
- 把 inbox 整理进长期/项目记忆:
|
|
587
|
-
- 工具:`dream_consolidate`
|
|
588
|
-
- 斜杠命令:`/dream [--dry-run] [--scope=global|repo|thread]`
|
|
386
|
+
Codemini 内置记忆工具和斜杠命令:
|
|
589
387
|
|
|
590
|
-
|
|
388
|
+
| 命令 | 作用 |
|
|
389
|
+
| --- | --- |
|
|
390
|
+
| `/capture <summary>` | 捕获高信号观察到 inbox。 |
|
|
391
|
+
| `/inbox` | 查看待整理记忆证据。 |
|
|
392
|
+
| `/dream [--dry-run]` | 把 inbox 整理进长期/项目记忆。 |
|
|
393
|
+
| `/reflect` | 把成功工作流沉淀成可审阅的 `SKILL.md` 草稿。 |
|
|
591
394
|
|
|
592
|
-
|
|
593
|
-
- `execution.mode=plan`:模型规划出的工具调用不会执行,但 `/dream` 作为运行时命令仍可直接执行。
|
|
395
|
+
Inbox 是临时的、可能带噪的证据层;Dream consolidation 决定哪些内容值得晋升为长期记忆。
|
|
594
396
|
|
|
595
397
|
### 项目索引
|
|
596
398
|
|
|
597
|
-
Codemini
|
|
598
|
-
|
|
599
|
-
- `project-map.json` — 记录仓库的高层结构事实,比如语言、源码目录、测试目录、入口候选
|
|
600
|
-
- `file-index.json` — 记录文件级结构信息,比如 imports、exports、functions、classes 和轻量 symbol 提示
|
|
601
|
-
|
|
602
|
-
这份索引会在进入项目时初始化,在 `edit`、`write`、`patch` 后做增量刷新。它的目标是轻量、可靠、低噪声,而不是生成一份很长的 AI 报告。
|
|
399
|
+
Codemini 会维护 `.codemini/` 轻量索引:
|
|
603
400
|
|
|
604
|
-
|
|
605
|
-
|
|
401
|
+
| 文件 | 作用 |
|
|
402
|
+
| --- | --- |
|
|
403
|
+
| `.codemini/project-map.json` | 语言、源码目录、测试目录、入口候选和仓库事实。 |
|
|
404
|
+
| `.codemini/file-index.json` | imports、exports、functions、classes 和 symbol 提示。 |
|
|
606
405
|
|
|
607
|
-
|
|
608
|
-
- 项目工作区状态:`.codemini/`
|
|
609
|
-
- 轻量项目索引:`.codemini/`
|
|
610
|
-
- 仓库内置 skill:`skills/<name>/SKILL.md`
|
|
611
|
-
- 项目级 skill:`.codemini/skills/<name>/SKILL.md`
|
|
612
|
-
- 全局已安装 skill:`<base-config-dir>/skills/<name>/SKILL.md`
|
|
406
|
+
进入项目时初始化,编辑/写入/patch 后增量刷新。
|
|
613
407
|
|
|
614
|
-
|
|
408
|
+
### 可选增强
|
|
615
409
|
|
|
616
|
-
|
|
617
|
-
|------|------|
|
|
618
|
-
| `CODEMINI_GLOBAL_DIR` 环境变量 | `$CODEMINI_GLOBAL_DIR`(最高优先级) |
|
|
619
|
-
| Windows | `%APPDATA%\codemini-global\` |
|
|
620
|
-
| macOS | `~/Library/Preferences/codemini-global` |
|
|
621
|
-
| Linux / XDG | `$XDG_CONFIG_HOME/codemini-global` |
|
|
622
|
-
| 受限环境回退 | `.codemini-global/` |
|
|
410
|
+
FFF 搜索加速:
|
|
623
411
|
|
|
624
|
-
|
|
412
|
+
```bash
|
|
413
|
+
codemini doctor
|
|
414
|
+
```
|
|
625
415
|
|
|
626
|
-
|
|
416
|
+
如果 `fff-mcp` 在 `PATH` 中,Codemini 会自动用于更快的 `grep`、`glob` 和部分 `list`。缺失时自动回退内置搜索。
|
|
627
417
|
|
|
628
|
-
|
|
418
|
+
Playwright 网页渲染:
|
|
629
419
|
|
|
630
|
-
|
|
631
|
-
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
- 更偏结构化操作、而不是大量 shell 噪声的代码助手
|
|
420
|
+
```bash
|
|
421
|
+
npm install -g playwright
|
|
422
|
+
playwright install chromium
|
|
423
|
+
```
|
|
635
424
|
|
|
636
|
-
###
|
|
425
|
+
### 数据路径
|
|
637
426
|
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
-
|
|
427
|
+
| 范围 | 路径 |
|
|
428
|
+
| --- | --- |
|
|
429
|
+
| 全局会话 | `<base-config-dir>/sessions/` |
|
|
430
|
+
| 项目状态 | `.codemini/` |
|
|
431
|
+
| 项目 Skills | `.codemini/skills/<name>/SKILL.md` |
|
|
432
|
+
| 全局 Skills | `<base-config-dir>/skills/<name>/SKILL.md` |
|
|
433
|
+
| Windows 配置 | `%APPDATA%\codemini-global\` |
|
|
434
|
+
| macOS 配置 | `~/Library/Preferences/codemini-global` |
|
|
435
|
+
| Linux/XDG 配置 | `$XDG_CONFIG_HOME/codemini-global` |
|
|
641
436
|
|
|
642
437
|
### 开发
|
|
643
438
|
|
|
644
439
|
```bash
|
|
645
|
-
# 安装依赖
|
|
646
440
|
npm install
|
|
647
|
-
|
|
648
|
-
# 运行测试
|
|
649
441
|
npm test
|
|
650
|
-
|
|
651
|
-
# 本地启动
|
|
652
442
|
npm start
|
|
653
443
|
```
|
|
654
444
|
|
|
445
|
+
构建 Web UI:
|
|
446
|
+
|
|
447
|
+
```bash
|
|
448
|
+
npm run build:web
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
### 文档
|
|
452
|
+
|
|
453
|
+
- [OPERATIONS.md](./OPERATIONS.md) - 日常操作手册
|
|
454
|
+
- [deployment.md](./deployment.md) - 打包、安装、部署
|
|
455
|
+
- [Releases](https://github.com/havingautism/Codemini-CLI/releases) - 更新记录
|
|
456
|
+
|
|
655
457
|
### 许可证
|
|
656
458
|
|
|
657
|
-
[MIT](LICENSE)
|
|
459
|
+
[MIT](./LICENSE)
|