miii-agent 0.1.12 → 0.1.14

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.
Files changed (3) hide show
  1. package/README.md +105 -80
  2. package/dist/cli.js +631 -170
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,26 +1,38 @@
1
- # miii
1
+ <h1 align="center">miii</h1>
2
2
 
3
- > small · simple · smart · strategic · semantic
4
- >
5
- > Your code never leaves your machine. No API keys. No cloud. No bullshit.
3
+ <p align="center">
4
+ <strong>Small. Simple. Smart. Strategic. Semantic.</strong>
5
+ </p>
6
6
 
7
- **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.
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
- [![npm](https://img.shields.io/npm/v/miii-agent)](https://www.npmjs.com/package/miii-agent)
10
- [![license](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE)
11
- [![node](https://img.shields.io/badge/node-%3E%3D18-brightgreen)](https://nodejs.org)
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
- ## The name
21
+ ---
16
22
 
17
- **miii** stands for five principles it's built around:
23
+ ## Contents
18
24
 
19
- - **small** — tight codebase, no bloat. You can read the whole thing.
20
- - **simple** no API keys, no accounts, no config ceremony. Just run it.
21
- - **smart** — decomposes problems and verifies its own work like an engineer.
22
- - **strategic** — plans before it acts; tools are gated, paths are confined.
23
- - **semantic** — works from the meaning of your code, not blind text matching.
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
- ## Why miii?
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
- Most AI coding tools are wrappers around cloud APIs. They're slow, expensive, and send your private code to someone else's server.
49
+ miii flips the script:
36
50
 
37
- miii is different:
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
- - **Local-first** Powered by Ollama. Your code stays on your disk, period.
40
- - **Zero ceremony** — No API keys. No billing. No accounts. Just `miii`.
41
- - **Actually agentic** miii doesn't just chat. It decomposes problems, calls tools, and verifies results like an engineer would.
42
- - **Fast** — No network round-trips. Response time is limited by your GPU, not a CDN.
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
- ## Installation
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 — [install here](https://ollama.com/download)
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
- ### Install miii
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
- ## Usage
101
+ ## Interaction Guide
77
102
 
78
- Once inside the TUI, just type naturally:
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
- ## Configuration
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
- ## Capabilities
127
+ ### Capabilities
121
128
 
122
- miii ships with a built-in tool suite the agent can invoke autonomously:
129
+ miii ships with a built-in tool suite that the agent invokes autonomously:
123
130
 
124
- | Tool | What it does |
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 you approve what the agent can touch, and "always" approvals persist to `~/.miii/permissions.json` so you're never asked twice. File tools are confined to your working directory; `../` traversal and absolute paths outside it are rejected.
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 used to get truncated — a 50K-line test log chopped to 32K, the middle gone, the model guessing at what it missed. miii doesn't truncate. It **spills**.
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 into the conversation, followed by a pointer:
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
- The head shows where output started; the tail catches the errors and summaries that live at the bottom. If the model needs the elided middle, it pages through it with `read_file` ranged reads nothing is ever lost. The inline budget becomes "how much to show," not "how much exists."
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
- Spill files are confined to the app-owned `~/.miii/output` dir and garbage-collected after 24h. If the spill write fails (e.g. read-only home), miii falls back to a lossy head+tail and says so explicitly, so the context window is never blown.
152
-
153
- ---
156
+ ### The Model Doctor
154
157
 
155
- ## Checking your setup
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, only scenarios matching "grep"
163
+ miii doctor gemma4:e4b grep # check one model against "grep" scenarios
163
164
  ```
164
165
 
165
- It runs the real agent against a handful of concrete tasks (edit a file, read-and-answer, create a file, locate a definition) and checks the *outcome* — did the file actually change, was the answer right — then prints a verdict per model:
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
- With more than one model it also prints a compatibility matrix (`+` pass, `.` fail). Cloud models are skipped by default; name one explicitly to include it. If a model comes back `marginal` or `not recommended`, pull a stronger coding model and try again.
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 lives in `eval/` and powers `miii doctor`. As `npm run eval` it doubles as a regression gate it exits non-zero if any model fails any scenario, so a prompt or tool change that regresses a baseline model is caught in CI. Same engine, two doors: `miii doctor` for users checking their setup, `npm run eval` for maintainers gating changes.
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 the `miii` command against your local changes
284
+ ### Testing Local Changes
262
285
 
263
- The global `miii` command points at whatever was last installed with `npm install -g miii-agent` **not** your working tree. After editing source, the global binary is stale, so `miii` (and `miii doctor`) will run the old code and may appear to ignore your changes (e.g. printing the wrong model). Two ways to run your local build:
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, so each `npm run build` is picked up automatically. Restore the published version later with `npm install -g miii-agent`. Note: `npm run dev` / `npm run start` always run the current source and never have this staleness problem.
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. Core agent loop works. Actively refining tool execution, streaming, and the permission model. PRs welcome — fork it, break it, improve it.
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