mini-coder 0.1.1 → 0.2.0

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.
@@ -46,31 +46,19 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
46
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`
@@ -85,11 +73,8 @@ Developer-focused CLI coding agent. Prioritizes dev flow — no slow startup, no
85
73
  `/mcp remove` *name*
86
74
  : Remove MCP server.
87
75
 
88
- `/agent` \[*name*\]
89
- : Set or clear active primary 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.
@@ -109,19 +94,36 @@ 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
 
119
124
  **shell**
120
125
  : Execute bash commands; repo inspection and `mc-edit` edits happen here.
121
126
 
122
- **subagent**
123
- : Spawn a focused mini-agent for parallel subtasks.
124
-
125
127
  **listSkills**
126
128
  : List discovered skills (metadata only).
127
129
 
@@ -153,58 +155,6 @@ mc-edit <path> (--old <text> | --old-file <path>) [--new <text> | --new-file <pa
153
155
 
154
156
  Workflow: inspect with **shell** → edit with **mc-edit** → verify with **shell**.
155
157
 
156
- ## CUSTOM COMMANDS
157
-
158
- Drop a `.md` file in `.agents/commands/` (local) or `~/.agents/commands/` (global) and it becomes a `/command`. Filename equals command name (`standup.md` → `/standup`).
159
-
160
- `.claude/commands/*.md` is also supported.
161
-
162
- **Frontmatter fields:**
163
-
164
- `description`
165
- : Shown in `/help`.
166
-
167
- `model`
168
- : Override model (only with `context: fork`).
169
-
170
- `context`
171
- : `fork` to run as isolated subagent; default is inline.
172
-
173
- `subtask`
174
- : `true` forces subagent (OpenCode-compatible alias).
175
-
176
- `agent`
177
- : Run under named agent's system prompt (only with `context: fork`).
178
-
179
- **Argument substitution:**
180
-
181
- `$ARGUMENTS` expands to the full argument string; `$1`–`$9` expand to positional tokens.
182
-
183
- **Shell interpolation:**
184
-
185
- `` !`cmd` `` injects shell output at expansion time (10 s timeout).
186
-
187
- **Precedence:** custom commands shadow built-ins. Local overrides global.
188
-
189
- ## CUSTOM AGENTS
190
-
191
- Drop a `.md` file in `.agents/agents/` (local) or `~/.agents/agents/` (global). Filename equals agent name. Activate with `/agent <name>`.
192
-
193
- `.claude/agents/*.md` is also supported.
194
-
195
- **Frontmatter fields:**
196
-
197
- `description`
198
- : Shown in `/help`.
199
-
200
- `model`
201
- : Override active model.
202
-
203
- `mode`
204
- : `primary` excludes from subagent tool; `subagent`/`all`/omitted keeps it available.
205
-
206
- Body is the agent system prompt. Non-primary agents are exposed to the **subagent** tool for delegation.
207
-
208
158
  ## SKILLS
209
159
 
210
160
  Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
@@ -221,18 +171,18 @@ Skills are reusable instruction files at `.agents/skills/<name>/SKILL.md`.
221
171
 
222
172
  Skills are never auto-loaded. Load explicitly:
223
173
 
224
- - `@skill-name` in prompts (injects body wrapped in `<skill>` XML).
174
+ - `/skill-name` in prompts (injects body as a user message).
225
175
  - **listSkills** / **readSkill** tools at runtime.
226
176
 
227
177
  Local discovery walks up from cwd to the git worktree root.
228
178
 
229
- ## 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.
230
180
 
231
- Supports `.agents` and `.claude` layouts for commands, skills, agents, and context.
181
+ ## CONFIGURATION
232
182
 
233
183
  Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
234
184
 
235
- **Context files** (one global + one local loaded):
185
+ **Context files** (one global + one local loaded into the system prompt):
236
186
 
237
187
  - Global: `~/.agents/AGENTS.md` → `~/.agents/CLAUDE.md`
238
188
  - Local: `./.agents/AGENTS.md` → `./CLAUDE.md` → `./AGENTS.md`
@@ -269,7 +219,7 @@ Config roots: `.agents/`, `.claude/` — local (repo) or global (`~/`).
269
219
  : App data directory (sessions.db, api.log, errors.log).
270
220
 
271
221
  `.agents/` or `.claude/`
272
- : Config directories for commands, agents, skills.
222
+ : Config directories for skills and context files.
273
223
 
274
224
  `AGENTS.md` / `CLAUDE.md`
275
225
  : Project context files.
package/lefthook.yml ADDED
@@ -0,0 +1,15 @@
1
+ pre-commit:
2
+ parallel: true
3
+ 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
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "mini-coder",
3
- "version": "0.1.1",
3
+ "version": "0.2.0",
4
4
  "description": "A small, fast CLI coding agent",
5
5
  "module": "src/index.ts",
6
6
  "type": "module",
@@ -18,7 +18,7 @@
18
18
  "test": "bun test --only-failures",
19
19
  "test:verbose": "bun test",
20
20
  "jscpd": "jscpd src",
21
- "ui-oneshot": "bun scripts/ui-oneshot.ts"
21
+ "prepare": "lefthook install"
22
22
  },
23
23
  "dependencies": {
24
24
  "@ai-sdk/anthropic": "^3.0.60",
@@ -37,6 +37,7 @@
37
37
  "@types/bun": "latest",
38
38
  "jscpd": "^4.0.8",
39
39
  "knip": "^5.86.0",
40
+ "lefthook": "^2.1.4",
40
41
  "typescript": "^5.9.3"
41
42
  },
42
43
  "knip": {
package/research.md DELETED
@@ -1,38 +0,0 @@
1
- I want your help exploring how could we use yoctocolor to add color ouput to commonly used shell commands. Let's first check the db, check the recent past sessions for a sample. Then check for the shell usage and assert the most common commands
2
-
3
- Response:
4
-
5
- ## Shell Usage Analysis (from 101 sessions)
6
-
7
- Most common commands:
8
- | Command | Count | Opportunity |
9
- |---------|-------|-------------|
10
- | `cat` | 72 | File content preview |
11
- | `git` | 54 | Status/diff output |
12
- | `bun` | 32 | Test/build output |
13
- | `sed` | 29 | Transform preview |
14
- | `mc-edit` | 26 | File edits |
15
- | `nl` | 12 | Line numbers |
16
- | `rg` | 11 | Search matches |
17
- | `npm` | 9 | Package output |
18
- | `grep` | 7 | Match highlighting |
19
- | `ls` | 5 | File listings |
20
-
21
- ## Current Shell Output Coloring (in `tool-result-renderers.ts`)
22
-
23
- The shell result renderer already uses yoctocolors:
24
-
25
- - **Status badges**: `c.green("done")` / `c.red("error")` / `c.yellow("timeout")`
26
- - **Stderr lines**: `c.red()` for error emphasis
27
- - **Stdout/stderr line separators**: `c.dim()` or colored pipe character
28
-
29
- ## Enhancement Opportunities
30
-
31
- 1. **Command syntax highlighting** - Color `git`, `bun`, `npm` commands differently in the tool call line
32
- 2. **File path highlighting** - Use `c.cyan()` for paths in output
33
- 3. **Git diffs from mc-edit** - Render a colored diff
34
- 4. **Line numbers** - `nl` output could use `c.yellow()` for numbers
35
- 5. **Git output** - Branch names in `c.cyan()`, commit hashes in `c.yellow()`, file statuses (M/A/D) in color
36
- 6. **rg/grep matches** - Highlight matching text in `c.greenBright()` or `c.yellow()`
37
- 7. **Exit code** - Non-zero codes in `c.red()` or `c.yellow()`
38
- 8. **Test output** - `bun test` results: passes in `c.green()`, fails in `c.red()`, skips in `c.yellow()`