mini-coder 0.0.3
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 +140 -0
- package/dist/mc.js +3727 -0
- package/package.json +34 -0
package/README.md
ADDED
|
@@ -0,0 +1,140 @@
|
|
|
1
|
+
<p align="center">
|
|
2
|
+
<img src="assets/icon-5-community-badge.svg" alt="mini-coder logo" width="100" height="100"/>
|
|
3
|
+
</p>
|
|
4
|
+
|
|
5
|
+
# ๐พ mini-coder
|
|
6
|
+
|
|
7
|
+
> *Small. Fast. Gets out of your way.*
|
|
8
|
+
|
|
9
|
+
Hey there! I'm **mini-coder** โ a CLI coding agent built for developers who want a sharp tool, not a bloated IDE plugin. Think of me as the pocket knife of AI coding assistants: lightweight, reliable, and always ready.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## ๐ค Who Am I?
|
|
14
|
+
|
|
15
|
+
I'm `mc` โ your new terminal companion. I live in your shell, speak to large language models, and help you explore, understand, and modify code at the speed of thought.
|
|
16
|
+
|
|
17
|
+
I was built with a simple philosophy: **dev flow first**. No slow startup. No clunky GUI. No vendor lock-in. Just you, your terminal, and an AI that keeps up.
|
|
18
|
+
|
|
19
|
+
```
|
|
20
|
+
$ mc
|
|
21
|
+
โโ mini-coder โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
22
|
+
โ What would you like to work on today? โ
|
|
23
|
+
โ โ
|
|
24
|
+
โ > _ โ
|
|
25
|
+
โ โ
|
|
26
|
+
โ [zen/claude-sonnet-4-6] [~/src/my-project] [main] ...โ
|
|
27
|
+
โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
---
|
|
31
|
+
|
|
32
|
+
## ๐ ๏ธ What Can I Do?
|
|
33
|
+
|
|
34
|
+
I come equipped with a tight, reliable set of tools:
|
|
35
|
+
|
|
36
|
+
| Tool | What it does |
|
|
37
|
+
|---|---|
|
|
38
|
+
| ๐ `glob` | Find files by pattern across your project |
|
|
39
|
+
| ๐งฒ `grep` | Search file contents with regex |
|
|
40
|
+
| ๐ `read` | Read files (with line-range support) |
|
|
41
|
+
| ๐ `create` | Create a new file or fully overwrite an existing file |
|
|
42
|
+
| โ๏ธ `replace` | Replace or delete lines using hashline anchors |
|
|
43
|
+
| โ `insert` | Insert lines before/after an anchor without replacing |
|
|
44
|
+
| ๐ `shell` | Run shell commands and see their output |
|
|
45
|
+
| ๐ค `subagent` | Spawn a focused mini-me for parallel subtasks |
|
|
46
|
+
|
|
47
|
+
I can also connect to **MCP servers** (like Exa for web search), giving you superpowers on demand.
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## โก Key Features
|
|
52
|
+
|
|
53
|
+
- **Multi-provider** โ set `OPENCODE_API_KEY` for Zen, `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `GOOGLE_API_KEY`, or just run Ollama locally. I auto-discover whatever's available.
|
|
54
|
+
- **Session memory** โ conversations are saved in a local SQLite database. Resume where you left off with `-c` or pick a specific session with `-r <id>`.
|
|
55
|
+
- **Shell integration** โ prefix with `!` to run shell commands inline. Use `@` to reference files in your prompt (with Tab completion).
|
|
56
|
+
- **Slash commands** โ `/model` to switch models, `/plan` for read-only thinking mode, `/ralph` for autonomous looping (agent re-runs your goal with fresh context each iteration until it signals done), `/review` for a code review, `/undo` to roll back a turn, `/new` for a clean session, `/mcp` to manage MCP servers.
|
|
57
|
+
- **Post-tool hooks** โ drop an executable at `.agents/hooks/post-<tool>` and I'll run it after every matching tool call.
|
|
58
|
+
- **Beautiful, minimal output** โ diffs for edits, formatted trees for file searches, a live status bar with model, git branch, and token counts.
|
|
59
|
+
- **16 ANSI colors only** โ my output inherits *your* terminal theme. Dark mode, light mode, Solarized, Gruvbox โ I fit right in.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## ๐ง Interesting Things About Me
|
|
64
|
+
|
|
65
|
+
- **I eat my own dog food.** I was built *by* a mini-coder agent. It's agents all the way down. ๐ข
|
|
66
|
+
- **I'm tiny but mighty.** The whole runtime is [Bun.js](https://bun.com) โ fast startup, native TypeScript, and a built-in SQLite driver.
|
|
67
|
+
- **I respect existing conventions.** Hook scripts live in `.agents/hooks/`, context in `AGENTS.md` or `CLAUDE.md` โ I follow the ecosystem instead of inventing new standards.
|
|
68
|
+
- **I spin while I think.** โ โ โ นโ ธโ ผโ ดโ ฆโ งโ โ (It's the little things.)
|
|
69
|
+
- **I can clone myself.** The `subagent` tool lets me spin up parallel instances of myself to tackle independent subtasks simultaneously. Divide and conquer! (Up to 3 levels deep.)
|
|
70
|
+
|
|
71
|
+
---
|
|
72
|
+
|
|
73
|
+
## ๐ Getting Started
|
|
74
|
+
|
|
75
|
+
```bash
|
|
76
|
+
# Install globally
|
|
77
|
+
bun run build && bun add -g mini-coder@file:$(pwd)
|
|
78
|
+
|
|
79
|
+
# Set your provider key (pick one โ or run Ollama locally)
|
|
80
|
+
export OPENCODE_API_KEY=your-zen-key # recommended
|
|
81
|
+
export ANTHROPIC_API_KEY=your-key # or direct Anthropic
|
|
82
|
+
export OPENAI_API_KEY=your-key # or direct OpenAI
|
|
83
|
+
|
|
84
|
+
# Launch!
|
|
85
|
+
mc
|
|
86
|
+
```
|
|
87
|
+
|
|
88
|
+
Or run directly for a quick task:
|
|
89
|
+
|
|
90
|
+
```bash
|
|
91
|
+
mc "Refactor the auth module to use async/await"
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
Useful flags:
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
mc -c # continue last session
|
|
98
|
+
mc -r <id> # resume a specific session
|
|
99
|
+
mc -l # list recent sessions
|
|
100
|
+
mc -m zen/claude-sonnet-4-6 # pick a model
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## ๐๏ธ Project Structure
|
|
106
|
+
|
|
107
|
+
```
|
|
108
|
+
src/
|
|
109
|
+
index.ts # Entry point + CLI arg parsing
|
|
110
|
+
agent/ # Main REPL loop + tool registry
|
|
111
|
+
cli/ # Input, output, slash commands, markdown rendering
|
|
112
|
+
llm-api/ # Provider factory + streaming turn logic
|
|
113
|
+
tools/ # glob, grep, read, create, replace, insert, shell, subagent
|
|
114
|
+
# + hashline anchors, diffs, hooks, snapshots
|
|
115
|
+
mcp/ # MCP server connections
|
|
116
|
+
session/ # SQLite-backed session & history management
|
|
117
|
+
```
|
|
118
|
+
|
|
119
|
+
---
|
|
120
|
+
|
|
121
|
+
## ๐ฎ Tech Stack
|
|
122
|
+
|
|
123
|
+
- **Runtime:** [Bun.js](https://bun.com) โ fast, modern, all-in-one
|
|
124
|
+
- **LLM routing:** [AI SDK](https://ai-sdk.dev) โ multi-provider with streaming
|
|
125
|
+
- **Colors:** [yoctocolors](https://github.com/sindresorhus/yoctocolors) โ tiny and terminal-theme-aware
|
|
126
|
+
- **Schema validation:** [Zod](https://zod.dev)
|
|
127
|
+
- **Linting/formatting:** [Biome](https://biomejs.dev)
|
|
128
|
+
- **Storage:** `bun:sqlite` โ zero-dependency local sessions
|
|
129
|
+
|
|
130
|
+
---
|
|
131
|
+
|
|
132
|
+
## ๐ฌ Philosophy
|
|
133
|
+
|
|
134
|
+
> Accurate. Fast. Focused on the conversation.
|
|
135
|
+
|
|
136
|
+
I believe the best tools disappear into your workflow. I don't want to be the star of the show โ I want *you* to ship great code, faster.
|
|
137
|
+
|
|
138
|
+
---
|
|
139
|
+
|
|
140
|
+
*Built with โค๏ธ and a healthy obsession with terminal aesthetics.*
|