mini-coder 0.1.2 → 0.2.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.
@@ -0,0 +1,13 @@
1
+ # KNOWN ISSUES
2
+
3
+ ## Bugs
4
+
5
+ - `/model` doesn't autocomplete models provider/name pattern.
6
+ - AI SDK expands `claude-3-5-haiku` → dated variant that Zen doesn't serve (404).
7
+ - Shell tool max-timeout leaves the parent terminal in a broken state.
8
+
9
+ ## Features
10
+
11
+ - Conversation summary on max context instead of just an error with `/new` suggestion.
12
+
13
+ ## Refactors
@@ -6,7 +6,7 @@
6
6
 
7
7
  ## SYNOPSIS
8
8
 
9
- `mc` \[*options*\] \[*prompt*\]
9
+ `mc` \[_options_\] \[_prompt_\]
10
10
 
11
11
  ## DESCRIPTION
12
12
 
@@ -14,25 +14,25 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
14
14
 
15
15
  ## OPTIONS
16
16
 
17
- `-m`, `--model` *id*
17
+ `-m`, `--model` _id_
18
18
  : Model to use (e.g. `zen/claude-sonnet-4-6`).
19
19
 
20
20
  `-c`, `--continue`
21
21
  : Continue most recent session.
22
22
 
23
- `-r`, `--resume` *id*
23
+ `-r`, `--resume` _id_
24
24
  : Resume a specific session.
25
25
 
26
26
  `-l`, `--list`
27
27
  : List recent sessions.
28
28
 
29
- `--cwd` *path*
29
+ `--cwd` _path_
30
30
  : Set working directory.
31
31
 
32
32
  `-h`, `--help`
33
33
  : Display help.
34
34
 
35
- *prompt*
35
+ _prompt_
36
36
  : Optional one-shot prompt. Runs once then exits.
37
37
 
38
38
  ## INTERACTIVE COMMANDS
@@ -40,64 +40,49 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
40
40
  `/model`
41
41
  : List all available models.
42
42
 
43
- `/model` *id*
43
+ `/model` _id_
44
44
  : Switch model.
45
45
 
46
- `/model effort` *low|medium|high|xhigh|off*
46
+ `/model effort` _low|medium|high|xhigh|off_
47
47
  : Set reasoning effort.
48
48
 
49
- `/reasoning` \[*on|off*\]
50
- : Toggle reasoning display.
51
-
52
- `/context prune` *off|balanced|aggressive*
53
- : Pruning strategy.
54
-
55
- `/context cap` *off|bytes|kb*
56
- : Tool result payload cap.
57
-
58
- `/cache` *on|off*
59
- : Toggle prompt caching globally.
60
-
61
- `/cache openai` *in_memory|24h*
62
- : OpenAI cache retention.
49
+ `/session` \[_id_\]
50
+ : List sessions or switch to one.
63
51
 
64
- `/cache gemini` *off|cachedContents/...*
65
- : Gemini cached content.
52
+ `/new`
53
+ : Start a fresh session.
66
54
 
67
55
  `/undo`
68
56
  : Remove last turn (does NOT revert filesystem).
69
57
 
70
- `/new`
71
- : Start a fresh session.
58
+ `/reasoning` \[_on|off_\]
59
+ : Toggle reasoning display.
72
60
 
73
- `/verbose`
61
+ `/verbose` \[_on|off_\]
74
62
  : Toggle output truncation.
75
63
 
76
64
  `/mcp list`
77
65
  : List MCP servers.
78
66
 
79
- `/mcp add` *name* `http` *url*
67
+ `/mcp add` _name_ `http` _url_
80
68
  : Add HTTP MCP server.
81
69
 
82
- `/mcp add` *name* `stdio` *cmd* \[*args...*\]
70
+ `/mcp add` _name_ `stdio` _cmd_ \[_args..._\]
83
71
  : Add stdio MCP server.
84
72
 
85
- `/mcp remove` *name*
73
+ `/mcp remove` _name_
86
74
  : Remove MCP server.
87
75
 
88
- `/agent` \[*name*\]
89
- : Set or clear active agent.
90
-
91
76
  `/review`
92
- : Review changes (custom command, auto-created globally).
77
+ : Review recent changes (global skill, auto-created at first run).
93
78
 
94
79
  `/login`
95
80
  : Show OAuth login status.
96
81
 
97
- `/login` *provider*
82
+ `/login` _provider_
98
83
  : Login via OAuth (opens browser for device flow). Currently supports `anthropic`.
99
84
 
100
- `/logout` *provider*
85
+ `/logout` _provider_
101
86
  : Clear saved OAuth tokens.
102
87
 
103
88
  `/help`
@@ -109,10 +94,30 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
109
94
  ## INLINE FEATURES
110
95
 
111
96
  `!` prefix
112
- : Runs shell commands inline.
97
+ : Runs shell commands inline — output is sent to the LLM as a user message.
113
98
 
114
99
  `@` prefix
115
- : References files or skills (with tab completion).
100
+ : Embeds a file into the prompt (Tab to complete file paths).
101
+
102
+ `/` prefix
103
+ : Reference a skill in the prompt (Tab to complete skill names).
104
+
105
+ ## KEYS
106
+
107
+ `ESC`
108
+ : Interrupt the assistant response — partial output is preserved in history.
109
+
110
+ `Ctrl+C`
111
+ : Exit forcefully.
112
+
113
+ `Ctrl+D`
114
+ : Graceful exit (EOF).
115
+
116
+ `↑` / `↓`
117
+ : Navigate command history.
118
+
119
+ `Ctrl+R`
120
+ : Search command history.
116
121
 
117
122
  ## BUILT-IN TOOLS
118
123
 
@@ -150,46 +155,6 @@ mc-edit <path> (--old <text> | --old-file <path>) [--new <text> | --new-file <pa
150
155
 
151
156
  Workflow: inspect with **shell** → edit with **mc-edit** → verify with **shell**.
152
157
 
153
- ## CUSTOM COMMANDS
154
-
155
- Drop a `.md` file in `.agents/commands/` (local) or `~/.agents/commands/` (global) and it becomes a `/command`. Filename equals command name (`standup.md` → `/standup`).
156
-
157
- `.claude/commands/*.md` is also supported.
158
-
159
- **Frontmatter fields:**
160
-
161
- `description`
162
- : Shown in `/help`.
163
-
164
- `model`
165
- : Optional metadata field.
166
-
167
- **Argument substitution:**
168
-
169
- `$ARGUMENTS` expands to the full argument string; `$1`–`$9` expand to positional tokens.
170
-
171
- **Shell interpolation:**
172
-
173
- `` !`cmd` `` injects shell output at expansion time (10 s timeout).
174
-
175
- **Precedence:** custom commands shadow built-ins. Local overrides global.
176
-
177
- ## CUSTOM AGENTS
178
-
179
- Drop a `.md` file in `.agents/agents/` (local) or `~/.agents/agents/` (global). Filename equals agent name. Activate with `/agent <name>`.
180
-
181
- `.claude/agents/*.md` is also supported.
182
-
183
- **Frontmatter fields:**
184
-
185
- `description`
186
- : Shown in `/help`.
187
-
188
- `model`
189
- : Optional metadata field.
190
-
191
- Body is the agent system prompt.
192
-
193
158
  ## SKILLS
194
159
 
195
160
  Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
@@ -206,18 +171,18 @@ Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
206
171
 
207
172
  Skills are never auto-loaded. Load explicitly:
208
173
 
209
- - `@skill-name` in prompts (injects body wrapped in `<skill>` XML).
174
+ - `/skill-name` in prompts (injects body as a user message).
210
175
  - **listSkills** / **readSkill** tools at runtime.
211
176
 
212
177
  Local discovery walks up from cwd to the git worktree root.
213
178
 
214
- ## CONFIGURATION
179
+ A default **review** skill is created at `~/.agents/skills/review/SKILL.md` on first run if it doesn't exist. It can be customized or shadowed locally.
215
180
 
216
- Supports `.agents` and `.claude` layouts for commands, skills, agents, and context.
181
+ ## CONFIGURATION
217
182
 
218
183
  Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
219
184
 
220
- **Context files** (one global + one local loaded):
185
+ **Context files** (one global + one local loaded into the system prompt):
221
186
 
222
187
  - Global: `~/.agents/AGENTS.md` → `~/.agents/CLAUDE.md`
223
188
  - Local: `./.agents/AGENTS.md` → `./CLAUDE.md` → `./AGENTS.md`
@@ -254,7 +219,7 @@ Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
254
219
  : App data directory (sessions.db, api.log, errors.log).
255
220
 
256
221
  `.agents/` or `.claude/`
257
- : Config directories for commands, agents, skills.
222
+ : Config directories for skills and context files.
258
223
 
259
224
  `AGENTS.md` / `CLAUDE.md`
260
225
  : Project context files.
package/lefthook.yml CHANGED
@@ -1,15 +1,4 @@
1
1
  pre-commit:
2
- parallel: true
3
2
  commands:
4
- jscpd:
5
- run: bun run jscpd
6
- knip:
7
- run: bun run knip
8
- typecheck:
9
- run: bun run typecheck
10
- format:
11
- run: bun run format
12
- lint:
13
- run: bun run lint
14
- test:
15
- run: bun run test
3
+ check:
4
+ run: bun run check
package/package.json CHANGED
@@ -1,49 +1,51 @@
1
1
  {
2
- "name": "mini-coder",
3
- "version": "0.1.2",
4
- "description": "A small, fast CLI coding agent",
5
- "module": "src/index.ts",
6
- "type": "module",
7
- "bin": {
8
- "mc": "dist/mc.js",
9
- "mc-edit": "dist/mc-edit.js"
10
- },
11
- "scripts": {
12
- "build": "bun run scripts/build.ts",
13
- "dev": "bun run src/index.ts",
14
- "typecheck": "tsc --noEmit",
15
- "lint": "biome check src",
16
- "format": "biome check --write src",
17
- "knip": "knip",
18
- "test": "bun test --only-failures",
19
- "test:verbose": "bun test",
20
- "jscpd": "jscpd src",
21
- "prepare": "lefthook install"
22
- },
23
- "dependencies": {
24
- "@ai-sdk/anthropic": "^3.0.60",
25
- "@ai-sdk/google": "^3.0.51",
26
- "@ai-sdk/openai": "^3.0.45",
27
- "@ai-sdk/openai-compatible": "^2.0.36",
28
- "@modelcontextprotocol/sdk": "^1.27.1",
29
- "ai": "^6.0.127",
30
- "diff": "^8.0.3",
31
- "yoctocolors": "^2.1.2",
32
- "yoctomarkdown": "^0.0.7",
33
- "zod": "^4.3.6"
34
- },
35
- "devDependencies": {
36
- "@biomejs/biome": "^2.4.6",
37
- "@types/bun": "latest",
38
- "jscpd": "^4.0.8",
39
- "knip": "^5.86.0",
40
- "lefthook": "^2.1.4",
41
- "typescript": "^5.9.3"
42
- },
43
- "knip": {
44
- "entry": [
45
- "src/mc-edit.ts"
46
- ]
47
- },
48
- "license": "MIT"
2
+ "name": "mini-coder",
3
+ "version": "0.2.1",
4
+ "description": "A small, fast CLI coding agent",
5
+ "module": "src/index.ts",
6
+ "type": "module",
7
+ "bin": {
8
+ "mc": "dist/mc.js",
9
+ "mc-edit": "dist/mc-edit.js"
10
+ },
11
+ "scripts": {
12
+ "prepare": "lefthook install",
13
+ "build": "bun run scripts/build.ts",
14
+ "dev": "bun run src/index.ts",
15
+ "format": "prettier --write --log-level warn .",
16
+ "check": "bun run prettier -c . && bun run typecheck && bun run lint && bun run knip && bun run jscpd && bun run test",
17
+ "typecheck": "tsc --noEmit",
18
+ "lint": "biome check src",
19
+ "knip": "knip",
20
+ "test": "bun test --only-failures",
21
+ "test:verbose": "bun test",
22
+ "jscpd": "jscpd -s src"
23
+ },
24
+ "dependencies": {
25
+ "@ai-sdk/anthropic": "^3.0.60",
26
+ "@ai-sdk/google": "^3.0.51",
27
+ "@ai-sdk/openai": "^3.0.45",
28
+ "@ai-sdk/openai-compatible": "^2.0.36",
29
+ "@modelcontextprotocol/sdk": "^1.27.1",
30
+ "ai": "^6.0.127",
31
+ "diff": "^8.0.3",
32
+ "yoctocolors": "^2.1.2",
33
+ "yoctomarkdown": "^0.0.7",
34
+ "zod": "^4.3.6"
35
+ },
36
+ "devDependencies": {
37
+ "@biomejs/biome": "^2.4.6",
38
+ "@types/bun": "latest",
39
+ "jscpd": "^4.0.8",
40
+ "knip": "^5.86.0",
41
+ "lefthook": "^2.1.4",
42
+ "prettier": "^3.8.1",
43
+ "typescript": "^5.9.3"
44
+ },
45
+ "knip": {
46
+ "entry": [
47
+ "src/mc-edit.ts"
48
+ ]
49
+ },
50
+ "license": "MIT"
49
51
  }