miii-agent 0.1.12 → 0.1.13
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 +105 -80
- package/dist/cli.js +4 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,26 +1,38 @@
|
|
|
1
|
-
|
|
1
|
+
<h1 align="center">miii</h1>
|
|
2
2
|
|
|
3
|
-
>
|
|
4
|
-
>
|
|
5
|
-
>
|
|
3
|
+
<p align="center">
|
|
4
|
+
<strong>Small. Simple. Smart. Strategic. Semantic.</strong>
|
|
5
|
+
</p>
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
<p align="center">
|
|
8
|
+
A local-first AI coding agent that lives in your terminal.<br>
|
|
9
|
+
Your code never leaves your machine. No API keys. No cloud. No bullshit.
|
|
10
|
+
</p>
|
|
8
11
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
+
<p align="center">
|
|
13
|
+
<a href="https://www.npmjs.com/package/miii-agent"><img src="https://img.shields.io/npm/v/miii-agent" alt="npm version"></a>
|
|
14
|
+
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="license"></a>
|
|
15
|
+
<a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen" alt="node version"></a>
|
|
16
|
+
<a href="https://ollama.com"><img src="https://img.shields.io/badge/powered%20by-Ollama-black" alt="powered by Ollama"></a>
|
|
17
|
+
</p>
|
|
12
18
|
|
|
13
|
-
|
|
19
|
+
miii is a local-first AI coding agent that lives in your terminal. Powered by [Ollama](https://ollama.com), it reads your code, writes features, runs tests, and fixes bugs — entirely on your hardware, at native speed.
|
|
14
20
|
|
|
15
|
-
|
|
21
|
+
---
|
|
16
22
|
|
|
17
|
-
|
|
23
|
+
## Contents
|
|
18
24
|
|
|
19
|
-
-
|
|
20
|
-
-
|
|
21
|
-
-
|
|
22
|
-
-
|
|
23
|
-
-
|
|
25
|
+
- [Demo](#demo)
|
|
26
|
+
- [The Local-First Advantage](#the-local-first-advantage)
|
|
27
|
+
- [Core Philosophy](#core-philosophy)
|
|
28
|
+
- [Quick Start](#quick-start)
|
|
29
|
+
- [Interaction Guide](#interaction-guide)
|
|
30
|
+
- [Technical Deep Dive](#technical-deep-dive)
|
|
31
|
+
- [Configuration](#configuration)
|
|
32
|
+
- [System Architecture](#system-architecture)
|
|
33
|
+
- [Development](#development)
|
|
34
|
+
- [Project Status](#project-status)
|
|
35
|
+
- [License](#license)
|
|
24
36
|
|
|
25
37
|
---
|
|
26
38
|
|
|
@@ -30,25 +42,45 @@
|
|
|
30
42
|
|
|
31
43
|
---
|
|
32
44
|
|
|
33
|
-
##
|
|
45
|
+
## The Local-First Advantage
|
|
46
|
+
|
|
47
|
+
Most AI coding tools are wrappers around cloud APIs. They are slow, expensive, and require you to trust your private codebase to a third-party server.
|
|
34
48
|
|
|
35
|
-
|
|
49
|
+
miii flips the script:
|
|
36
50
|
|
|
37
|
-
|
|
51
|
+
- **Absolute Privacy** — Powered by Ollama. Your code stays on your disk, period.
|
|
52
|
+
- **Zero Friction** — No API keys, no billing, no accounts. Just `miii`.
|
|
53
|
+
- **True Agency** — miii doesn't just chat; it decomposes problems, invokes tools, and verifies results like a senior engineer.
|
|
54
|
+
- **Native Performance** — No network round-trips. Latency is limited by your GPU, not a CDN.
|
|
38
55
|
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
56
|
+
| | Cloud AI agents | **miii** |
|
|
57
|
+
|----------------|--------------------------|------------------------------|
|
|
58
|
+
| Your code | Sent to a third party | Never leaves your machine |
|
|
59
|
+
| Cost | Per-token billing | Free — runs on your hardware |
|
|
60
|
+
| Setup | API keys, accounts | `npm i -g miii-agent` |
|
|
61
|
+
| Offline | No | Yes |
|
|
62
|
+
| Latency | Network + queue | Your GPU only |
|
|
43
63
|
|
|
44
64
|
---
|
|
45
65
|
|
|
46
|
-
##
|
|
66
|
+
## Core Philosophy
|
|
67
|
+
|
|
68
|
+
miii is built on five foundational principles:
|
|
69
|
+
|
|
70
|
+
- **small** — A tight, bloat-free codebase. You can read the entire project in an afternoon.
|
|
71
|
+
- **simple** — No configuration ceremony. Install and run.
|
|
72
|
+
- **smart** — Decomposes complex tasks and verifies its own work.
|
|
73
|
+
- **strategic** — Plans before acting; tools are gated and paths are confined.
|
|
74
|
+
- **semantic** — Operates on the meaning of your code, not blind text matching.
|
|
75
|
+
|
|
76
|
+
---
|
|
77
|
+
|
|
78
|
+
## Quick Start
|
|
47
79
|
|
|
48
80
|
### Prerequisites
|
|
49
81
|
|
|
50
82
|
- **Node.js** ≥ 18
|
|
51
|
-
- **Ollama** running locally — [
|
|
83
|
+
- **Ollama** running locally — [Download here](https://ollama.com/download)
|
|
52
84
|
- A coding model pulled locally:
|
|
53
85
|
|
|
54
86
|
```bash
|
|
@@ -57,25 +89,18 @@ ollama pull qwen2.5-coder:14b
|
|
|
57
89
|
ollama pull deepseek-coder-v2
|
|
58
90
|
```
|
|
59
91
|
|
|
60
|
-
###
|
|
92
|
+
### Installation & Launch
|
|
61
93
|
|
|
62
94
|
```bash
|
|
63
95
|
npm install -g miii-agent
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
### Launch
|
|
67
|
-
|
|
68
|
-
```bash
|
|
69
96
|
miii
|
|
70
97
|
```
|
|
71
98
|
|
|
72
|
-
That's it.
|
|
73
|
-
|
|
74
99
|
---
|
|
75
100
|
|
|
76
|
-
##
|
|
101
|
+
## Interaction Guide
|
|
77
102
|
|
|
78
|
-
|
|
103
|
+
Inside the TUI, interact naturally:
|
|
79
104
|
|
|
80
105
|
```
|
|
81
106
|
> refactor the auth module to use async/await
|
|
@@ -97,32 +122,14 @@ Once inside the TUI, just type naturally:
|
|
|
97
122
|
|
|
98
123
|
---
|
|
99
124
|
|
|
100
|
-
##
|
|
101
|
-
|
|
102
|
-
Settings live in `~/.miii/config.json` and are created on first run.
|
|
103
|
-
|
|
104
|
-
```json
|
|
105
|
-
{
|
|
106
|
-
"model": "qwen2.5-coder:14b",
|
|
107
|
-
"ollamaHost": "http://localhost:11434",
|
|
108
|
-
"effort": "medium"
|
|
109
|
-
}
|
|
110
|
-
```
|
|
111
|
-
|
|
112
|
-
| Field | Description | Values |
|
|
113
|
-
|-------|-------------|--------|
|
|
114
|
-
| `model` | Default Ollama model | any `ollama list` model |
|
|
115
|
-
| `ollamaHost` | Ollama API endpoint | URL string |
|
|
116
|
-
| `effort` | Controls temperature & limits | `low` \| `medium` \| `high` |
|
|
117
|
-
|
|
118
|
-
---
|
|
125
|
+
## Technical Deep Dive
|
|
119
126
|
|
|
120
|
-
|
|
127
|
+
### Capabilities
|
|
121
128
|
|
|
122
|
-
miii ships with a built-in tool suite the agent
|
|
129
|
+
miii ships with a built-in tool suite that the agent invokes autonomously:
|
|
123
130
|
|
|
124
|
-
| Tool |
|
|
125
|
-
|
|
131
|
+
| Tool | Function |
|
|
132
|
+
|------|----------|
|
|
126
133
|
| `read_file` | Read any file in your workspace |
|
|
127
134
|
| `write_file` | Create new files |
|
|
128
135
|
| `edit_file` | Precise string-level edits with whitespace tolerance (no rewrites) |
|
|
@@ -130,15 +137,13 @@ miii ships with a built-in tool suite the agent can invoke autonomously:
|
|
|
130
137
|
| `grep` | Regex search across files |
|
|
131
138
|
| `run_bash` | Execute shell commands |
|
|
132
139
|
|
|
133
|
-
Every sensitive operation is gated by a permission system
|
|
140
|
+
**Security & Safety:** Every sensitive operation is gated by a permission system. You approve what the agent can touch, and "always" approvals persist to `~/.miii/permissions.json`. File tools are strictly confined to your working directory; `../` traversal and absolute paths outside the workspace are rejected.
|
|
134
141
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
## Lossless output spill
|
|
142
|
+
### Lossless Output Spill
|
|
138
143
|
|
|
139
|
-
Big tool outputs
|
|
144
|
+
Big tool outputs (like 50K-line test logs) usually get truncated, leaving the model to guess. miii doesn't truncate; it **spills**.
|
|
140
145
|
|
|
141
|
-
When a tool result exceeds the inline budget (~10K bytes), the full output is written to `~/.miii/output/<id>.txt`. Only a head + tail **preview** is inlined
|
|
146
|
+
When a tool result exceeds the inline budget (~10K bytes), the full output is written to `~/.miii/output/<id>.txt`. Only a head + tail **preview** is inlined, followed by a pointer:
|
|
142
147
|
|
|
143
148
|
```
|
|
144
149
|
[command output truncated: 5184 lines / 412900 bytes.
|
|
@@ -146,23 +151,19 @@ When a tool result exceeds the inline budget (~10K bytes), the full output is wr
|
|
|
146
151
|
read_file offset/limit to see the elided middle.]
|
|
147
152
|
```
|
|
148
153
|
|
|
149
|
-
|
|
154
|
+
If the model needs the elided middle, it pages through it using `read_file` ranged reads. Nothing is ever lost. Spill files are garbage-collected after 24 hours.
|
|
150
155
|
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
---
|
|
156
|
+
### The Model Doctor
|
|
154
157
|
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
miii is model-agnostic — but not every local model can actually drive an agent. A model that can't emit clean tool calls will chat at you instead of editing files. `miii doctor` tells you which of *your* installed models are up to the job, before you waste time wondering why nothing happens.
|
|
158
|
+
Not every local model can drive an agent. A model that cannot emit clean tool calls will simply chat at you instead of editing files. `miii doctor` validates your installed models against concrete engineering tasks.
|
|
158
159
|
|
|
159
160
|
```bash
|
|
160
161
|
miii doctor # check every local model (from `ollama list`)
|
|
161
162
|
miii doctor qwen2.5-coder:7b # check one model
|
|
162
|
-
miii doctor gemma4:e4b grep # one model
|
|
163
|
+
miii doctor gemma4:e4b grep # check one model against "grep" scenarios
|
|
163
164
|
```
|
|
164
165
|
|
|
165
|
-
It
|
|
166
|
+
It verifies outcomes (did the file actually change?) and prints a verdict:
|
|
166
167
|
|
|
167
168
|
```
|
|
168
169
|
=== qwen3-coder ===
|
|
@@ -176,11 +177,29 @@ PASS grep-locate ...
|
|
|
176
177
|
→ gemma4:e4b: 1/4 — not recommended — weak tool-calling
|
|
177
178
|
```
|
|
178
179
|
|
|
179
|
-
|
|
180
|
+
---
|
|
181
|
+
|
|
182
|
+
## Configuration
|
|
183
|
+
|
|
184
|
+
Settings live in `~/.miii/config.json` and are created on first run.
|
|
185
|
+
|
|
186
|
+
```json
|
|
187
|
+
{
|
|
188
|
+
"model": "qwen2.5-coder:14b",
|
|
189
|
+
"ollamaHost": "http://localhost:11434",
|
|
190
|
+
"effort": "medium"
|
|
191
|
+
}
|
|
192
|
+
```
|
|
193
|
+
|
|
194
|
+
| Field | Description | Values |
|
|
195
|
+
|-------|-------------|--------|
|
|
196
|
+
| `model` | Default Ollama model | any `ollama list` model |
|
|
197
|
+
| `ollamaHost` | Ollama API endpoint | URL string |
|
|
198
|
+
| `effort` | Controls temperature & limits | `low` \| `medium` \| `high` |
|
|
180
199
|
|
|
181
200
|
---
|
|
182
201
|
|
|
183
|
-
## Architecture
|
|
202
|
+
## System Architecture
|
|
184
203
|
|
|
185
204
|
```mermaid
|
|
186
205
|
graph TD
|
|
@@ -242,6 +261,8 @@ graph TD
|
|
|
242
261
|
|
|
243
262
|
## Development
|
|
244
263
|
|
|
264
|
+
### Setup
|
|
265
|
+
|
|
245
266
|
```bash
|
|
246
267
|
git clone https://github.com/maruakshay/miii-cli.git
|
|
247
268
|
cd miii-cli
|
|
@@ -249,6 +270,8 @@ npm install
|
|
|
249
270
|
npm run dev
|
|
250
271
|
```
|
|
251
272
|
|
|
273
|
+
### Build & Test
|
|
274
|
+
|
|
252
275
|
```bash
|
|
253
276
|
npm run build # production build
|
|
254
277
|
npm run start # run built output
|
|
@@ -256,11 +279,11 @@ npm run typecheck # type-check src + eval
|
|
|
256
279
|
npm run eval # run the eval harness as a CI / regression gate
|
|
257
280
|
```
|
|
258
281
|
|
|
259
|
-
The eval harness
|
|
282
|
+
The eval harness in `eval/` powers `miii doctor` and serves as a regression gate. If `npm run eval` exits non-zero, a prompt or tool change has regressed a baseline model.
|
|
260
283
|
|
|
261
|
-
### Testing
|
|
284
|
+
### Testing Local Changes
|
|
262
285
|
|
|
263
|
-
The global `miii` command points
|
|
286
|
+
The global `miii` command points to the last installed version of `miii-agent`. To run your local working tree:
|
|
264
287
|
|
|
265
288
|
```bash
|
|
266
289
|
node dist/cli.js doctor <model> # run the freshly built output directly
|
|
@@ -268,11 +291,13 @@ node dist/cli.js doctor <model> # run the freshly built output directly
|
|
|
268
291
|
npm run build && npm link # point the global `miii` at this repo
|
|
269
292
|
```
|
|
270
293
|
|
|
271
|
-
`npm link` symlinks the global `miii` to `dist/cli.js` in this repo
|
|
294
|
+
`npm link` symlinks the global `miii` to `dist/cli.js` in this repo. Restore the published version later with `npm install -g miii-agent`.
|
|
295
|
+
|
|
296
|
+
---
|
|
272
297
|
|
|
273
298
|
## Project Status
|
|
274
299
|
|
|
275
|
-
MVP
|
|
300
|
+
**MVP.** Core agent loop is stable. Actively refining tool execution, streaming, and the permission model. PRs are welcome — fork it, break it, improve it.
|
|
276
301
|
|
|
277
302
|
---
|
|
278
303
|
|
package/dist/cli.js
CHANGED
|
@@ -1983,11 +1983,13 @@ function FileEditBlock({
|
|
|
1983
1983
|
removed > 0 ? `Added ${added} lines, removed ${removed} lines` : `Added ${added} lines`
|
|
1984
1984
|
] }) }),
|
|
1985
1985
|
shown.map((ln, i) => {
|
|
1986
|
-
const width = (process.stdout.columns ?? 80) - 6;
|
|
1987
|
-
const
|
|
1986
|
+
const width = (process.stdout.columns ?? 80) - 6 - 20;
|
|
1987
|
+
const raw = `${ln.sign} ${ln.text}`;
|
|
1988
|
+
const content = raw.length > width ? raw.slice(0, width) : raw.padEnd(width);
|
|
1988
1989
|
return /* @__PURE__ */ jsx9(Box9, { marginLeft: 4, children: /* @__PURE__ */ jsx9(
|
|
1989
1990
|
Text9,
|
|
1990
1991
|
{
|
|
1992
|
+
wrap: "truncate",
|
|
1991
1993
|
backgroundColor: ln.sign === "+" ? "#13351f" : ln.sign === "-" ? "#3b1414" : void 0,
|
|
1992
1994
|
dimColor: ln.sign === " ",
|
|
1993
1995
|
children: content
|