@slenderbuilds/niti 0.3.3 → 0.4.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.
- package/README.md +176 -111
- package/package.json +8 -7
package/README.md
CHANGED
|
@@ -1,144 +1,210 @@
|
|
|
1
1
|
<div align="center">
|
|
2
2
|
|
|
3
|
-
|
|
4
|
-
[](#license)
|
|
5
|
-
[](#two-front-ends-one-core)
|
|
6
|
-
[](#two-front-ends-one-core)
|
|
3
|
+
<br>
|
|
7
4
|
|
|
8
|
-
|
|
5
|
+
<img src="assets/logo.png" alt="" width="112">
|
|
9
6
|
|
|
10
|
-
|
|
7
|
+
<picture>
|
|
8
|
+
<source media="(prefers-color-scheme: dark)" srcset="assets/wordmark-dark.svg">
|
|
9
|
+
<source media="(prefers-color-scheme: light)" srcset="assets/wordmark-light.svg">
|
|
10
|
+
<img src="assets/wordmark-dark.svg" alt="niti" width="360">
|
|
11
|
+
</picture>
|
|
11
12
|
|
|
13
|
+
### A team of AI coding agents, on any mix of models, working on one project — live in your terminal.
|
|
12
14
|
|
|
13
15
|
<br>
|
|
14
16
|
|
|
15
|
-
|
|
17
|
+
[](https://www.npmjs.com/package/@slenderbuilds/niti)
|
|
18
|
+
[](https://github.com/slenderongithub/niti/actions/workflows/ci.yml)
|
|
19
|
+
[](#install)
|
|
20
|
+
[](#license)
|
|
21
|
+
|
|
22
|
+
**[Install](#install)** · **[The terminal](#the-terminal)** · **[In the browser](#in-the-browser)** · **[Under the hood](#under-the-hood)** · **[Configure](#configure)**
|
|
23
|
+
|
|
24
|
+
<br>
|
|
25
|
+
|
|
26
|
+
<img src="readme_images/cli.png" alt="niti's terminal: a three-agent team, the project's files, and the live transcript" width="100%">
|
|
16
27
|
|
|
17
28
|
</div>
|
|
18
29
|
|
|
19
|
-
|
|
30
|
+
<br>
|
|
20
31
|
|
|
21
|
-
##
|
|
32
|
+
## Install
|
|
22
33
|
|
|
23
34
|
```sh
|
|
24
|
-
npm install -g @slenderbuilds/niti
|
|
25
|
-
niti
|
|
35
|
+
npm install -g @slenderbuilds/niti
|
|
36
|
+
niti
|
|
26
37
|
```
|
|
27
38
|
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
39
|
+
Prebuilt for macOS, Linux and Windows — no Bun, no Go, no build step. On first launch niti asks
|
|
40
|
+
how many teammates you want (1–6) and, for each, a **provider**, a **model**, a **name** and a
|
|
41
|
+
one-line **job**. One of them leads: it turns your request into a plan, the others build it, and
|
|
42
|
+
they talk to each other as they go.
|
|
43
|
+
|
|
44
|
+
Anthropic, OpenAI, Gemini, OpenRouter, DeepSeek, Groq, xAI, Mistral and many more come from the
|
|
45
|
+
[Models.dev](https://models.dev) catalog, alongside local models (Ollama, LM Studio) and any
|
|
46
|
+
OpenAI-compatible endpoint. Keys stay on your machine — `~/.config/niti/auth.json` (mode 0600) and
|
|
47
|
+
your OS keychain.
|
|
48
|
+
|
|
49
|
+
<br>
|
|
50
|
+
|
|
51
|
+
## What you get
|
|
52
|
+
|
|
53
|
+
<table>
|
|
54
|
+
<tr>
|
|
55
|
+
<td width="50%" valign="top">
|
|
56
|
+
|
|
57
|
+
**A team, not a chatbot**<br>
|
|
58
|
+
Mix models by strength — a careful model to plan, a fast one to build, a cheap one to review. The
|
|
59
|
+
lead plans the work as a dependency graph; independent tasks run at the same time; teammates ask
|
|
60
|
+
each other questions directly.
|
|
61
|
+
|
|
62
|
+
</td>
|
|
63
|
+
<td width="50%" valign="top">
|
|
64
|
+
|
|
65
|
+
**Watch it work**<br>
|
|
66
|
+
Every edit appears as a numbered, syntax-colored diff. Commands stream their output, then fold to a
|
|
67
|
+
one-line result. Each agent's checklist stays pinned. Every run ends with a summary card and a
|
|
68
|
+
suggested next step.
|
|
69
|
+
|
|
70
|
+
</td>
|
|
71
|
+
</tr>
|
|
72
|
+
<tr>
|
|
73
|
+
<td width="50%" valign="top">
|
|
74
|
+
|
|
75
|
+
**Talk to it mid-run**<br>
|
|
76
|
+
Say hello and it says hello — no invented work. Ask a question and it reads the code to answer.
|
|
77
|
+
Anything you type while agents work steers them; <kbd>esc</kbd> stops them at once.
|
|
78
|
+
|
|
79
|
+
</td>
|
|
80
|
+
<td width="50%" valign="top">
|
|
81
|
+
|
|
82
|
+
**Guardrails on by default**<br>
|
|
83
|
+
Approvals before risky actions, a project-scoped sandbox, verification against your own build
|
|
84
|
+
before a task counts as done, undo and rewind for every write, and a check that refuses "fixes"
|
|
85
|
+
that only edited the tests.
|
|
86
|
+
|
|
87
|
+
</td>
|
|
88
|
+
</tr>
|
|
89
|
+
</table>
|
|
90
|
+
|
|
91
|
+
<br>
|
|
92
|
+
|
|
93
|
+
## The terminal
|
|
94
|
+
|
|
95
|
+
The footer always lists the keys that work where you are, and <kbd>f1</kbd> explains them — along
|
|
96
|
+
with every glyph in the transcript. The ones worth knowing on day one:
|
|
32
97
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
98
|
+
| Key | |
|
|
99
|
+
|---|---|
|
|
100
|
+
| <kbd>^p</kbd> | Command palette — every command, view, agent and theme, fuzzy-searchable |
|
|
101
|
+
| <kbd>tab</kbd> | Move focus: prompt → transcript → agents → files |
|
|
102
|
+
| <kbd>⇧tab</kbd> | Switch **Build** ↔ **Plan** (plan first, run when you like it) |
|
|
103
|
+
| <kbd>esc</kbd> | While agents work: interrupt them. Anything you type mid-run steers the working agent |
|
|
104
|
+
| <kbd>^o</kbd> | Unfold full command output and whole diffs |
|
|
105
|
+
| <kbd>^l</kbd> | Switch an agent's model |
|
|
106
|
+
| <kbd>^t</kbd> | Theme picker with live preview |
|
|
107
|
+
| <kbd>↑</kbd> · <kbd>^r</kbd> | Recall or search earlier prompts |
|
|
108
|
+
| `@path` · `!cmd` | Mention a project file · run a command right here |
|
|
38
109
|
|
|
39
|
-
|
|
110
|
+
The **Files** panel marks what the agents touched this session — **M** edited, **A** created,
|
|
111
|
+
**·** read. Open any file read-only with this session's changes marked, or hand it to `$EDITOR`.
|
|
40
112
|
|
|
41
|
-
<
|
|
113
|
+
Type <kbd>/</kbd> for every command:
|
|
42
114
|
|
|
43
|
-
|
|
115
|
+
<img src="readme_images/commands.png" alt="the command list over the running session" width="100%">
|
|
116
|
+
|
|
117
|
+
**Themes** — six calm palettes (graphite, obsidian, ember, tide, dusk, moss), each with a designed
|
|
118
|
+
light version that takes over when you turn on light mode. Or add your own in
|
|
119
|
+
`~/.config/niti/themes/*.json`.
|
|
120
|
+
|
|
121
|
+
<br>
|
|
44
122
|
|
|
45
|
-
|
|
46
|
-
usage, all pushed over SSE as the team works:
|
|
123
|
+
## In the browser
|
|
47
124
|
|
|
48
|
-
|
|
125
|
+
`/dashboard` opens a live control center: the team as a graph, the task board, agent-to-agent
|
|
126
|
+
messages and usage, updated as the work happens. Click an agent to read its transcript, switch its
|
|
127
|
+
model or message it mid-task. Approvals can be answered here too.
|
|
49
128
|
|
|
50
|
-
|
|
51
|
-
|
|
129
|
+
<img src="readme_images/dashboard.png" alt="the web dashboard: team graph, board and an agent's live transcript" width="100%">
|
|
130
|
+
|
|
131
|
+
`/graph` maps your project's imports — or, in **Models** mode, the team talking in real time.
|
|
52
132
|
|
|
53
133
|
<table>
|
|
54
134
|
<tr>
|
|
55
|
-
<td width="
|
|
56
|
-
<td width="
|
|
135
|
+
<td width="33%"><img src="readme_images/graph-project.png" alt="project mode: every file, colored by directory"></td>
|
|
136
|
+
<td width="33%"><img src="readme_images/graph-focus.png" alt="hovering a file highlights what it imports and what imports it"></td>
|
|
137
|
+
<td width="34%"><img src="readme_images/graph-models.png" alt="models mode: each agent, colored by status"></td>
|
|
57
138
|
</tr>
|
|
58
139
|
<tr>
|
|
59
|
-
<td>
|
|
60
|
-
<td>
|
|
140
|
+
<td align="center"><sub>Every file, colored by directory</sub></td>
|
|
141
|
+
<td align="center"><sub>Hover to trace a file's imports</sub></td>
|
|
142
|
+
<td align="center"><sub>Models mode: the team, live</sub></td>
|
|
61
143
|
</tr>
|
|
62
144
|
</table>
|
|
63
145
|
|
|
64
|
-
Both pages
|
|
146
|
+
Both pages follow the theme you pick in the terminal.
|
|
147
|
+
|
|
148
|
+
<br>
|
|
65
149
|
|
|
66
|
-
##
|
|
150
|
+
## Settings, at a glance
|
|
67
151
|
|
|
68
|
-
`/settings`
|
|
152
|
+
`/settings` opens Status, Config, Usage and Stats without leaving the session.
|
|
69
153
|
|
|
70
154
|
<table>
|
|
71
155
|
<tr>
|
|
72
|
-
<td width="
|
|
73
|
-
<td width="
|
|
74
|
-
<td width="34%"><img src="readme_images/stats_models.png" alt="Stats tab — tokens per day, tokens by model"></td>
|
|
156
|
+
<td width="50%"><img src="readme_images/config.png" alt="Config: mode, theme, permissions, thinking, light mode and more"></td>
|
|
157
|
+
<td width="50%"><img src="readme_images/stats_models.png" alt="Stats: tokens per day and by model"></td>
|
|
75
158
|
</tr>
|
|
76
159
|
</table>
|
|
77
160
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
- **
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
- **
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
- **
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
attached, before any replan. Best-of-N where the selector is a compiler rather than a judge
|
|
113
|
-
model, and where the tasks that were right first time cost nothing extra.
|
|
114
|
-
- **Approval gates** — agents pause for `[y] approve · [n] deny · [a] always` before risky actions,
|
|
115
|
-
answered from the TUI or the web dashboard; dangerous shell patterns always prompt.
|
|
116
|
-
- **Persistence** — every turn checkpoints to SQLite (`.niti/niti.db`); `niti-core resume` picks up
|
|
117
|
-
unfinished tasks with history intact. `/undo` and `/rewind` revert file writes.
|
|
118
|
-
- **MCP + LSP** — declare `mcpServers`/`lsp` in `agents.yaml`; both merge into the same tool loop,
|
|
119
|
-
gated the same way as everything else.
|
|
120
|
-
- **Failover** — a 429/overload/context-limit requeues the task instead of failing it; another agent
|
|
121
|
-
picks it up.
|
|
122
|
-
|
|
123
|
-
See [`project_context.md`](./project_context.md) for the full architecture record, the verification
|
|
124
|
-
history, and the deliberate ceilings (what's intentionally out of scope, and why).
|
|
125
|
-
|
|
126
|
-
## Configuring agents
|
|
127
|
-
|
|
128
|
-
`niti` rewrites only the `agents:` block on each team pick — everything else survives a relaunch.
|
|
129
|
-
Edit `.niti/agents.yaml` directly for anything the picker doesn't cover:
|
|
161
|
+
<br>
|
|
162
|
+
|
|
163
|
+
## Under the hood
|
|
164
|
+
|
|
165
|
+
- **Talks before it plans** — a greeting gets a reply and a question gets an answer (read-only). Only
|
|
166
|
+
a request to change something becomes a plan, and a follow-up adjusts the unfinished plan instead
|
|
167
|
+
of replacing it. The lead remembers the last few exchanges.
|
|
168
|
+
- **Plans as a graph** — the lead turns a request into tasks with dependencies and hand-offs;
|
|
169
|
+
independent tasks run concurrently, and the lead reviews the result at the end.
|
|
170
|
+
- **Agents talk to each other** — any teammate can ask another mid-task (the frontend asking the
|
|
171
|
+
backend about an API shape), rate-capped per pair.
|
|
172
|
+
- **Starts oriented** — a map of the repository (its layout and the files most of it depends on)
|
|
173
|
+
rides in every agent's prompt, so work begins with context instead of guesses.
|
|
174
|
+
- **Verified before "done"** — an agent that changed files must pass your project's own checks
|
|
175
|
+
(a `typecheck` or `build` script, `go build`, `cargo check`, or whatever `verify:` names). A task
|
|
176
|
+
that never passes ends `unverified`, and is retried on a different model before any replan.
|
|
177
|
+
- **Honest about cost** — prompt caching tuned per provider (Anthropic breakpoints, OpenAI cache
|
|
178
|
+
keys, Gemini implicit caching), reasoning effort per agent, real per-model context windows and
|
|
179
|
+
prices, and thinking tokens counted — see `/cost`.
|
|
180
|
+
- **Guarded tools** — `read_file`, `write_file`, `edit`, `shell` and read-only search, gated per
|
|
181
|
+
agent and by a permission policy; paths are jailed to the project; dangerous commands always ask.
|
|
182
|
+
- **Picks up where you left off** — every turn checkpoints to SQLite; `niti-core resume` continues
|
|
183
|
+
unfinished work, and `/undo` / `/rewind` revert writes.
|
|
184
|
+
- **Extensible** — MCP servers and language servers join the same tool loop, under the same gates.
|
|
185
|
+
|
|
186
|
+
The full architecture record, the verification history and what is deliberately out of scope live
|
|
187
|
+
in [`project_context.md`](./project_context.md).
|
|
188
|
+
|
|
189
|
+
<br>
|
|
190
|
+
|
|
191
|
+
## Configure
|
|
192
|
+
|
|
193
|
+
The team picker rewrites only the `agents:` block of `.niti/agents.yaml`; everything else is
|
|
194
|
+
yours to edit.
|
|
130
195
|
|
|
131
196
|
```yaml
|
|
132
197
|
agents:
|
|
133
198
|
- id: architect
|
|
134
199
|
provider: anthropic
|
|
135
|
-
model: claude-opus-
|
|
200
|
+
model: claude-opus-5
|
|
136
201
|
role: Architect
|
|
137
202
|
lead: true
|
|
138
|
-
|
|
203
|
+
reasoning: high
|
|
204
|
+
systemPrompt: You are a software architect. Plan the work into independent tasks.
|
|
139
205
|
- id: engineer
|
|
140
206
|
provider: openai
|
|
141
|
-
model: gpt-
|
|
207
|
+
model: gpt-5
|
|
142
208
|
role: Backend Engineer
|
|
143
209
|
systemPrompt: You are a backend engineer. Implement the assigned task.
|
|
144
210
|
allowedTools: [read_file, write_file, edit, shell, mcp]
|
|
@@ -152,42 +218,41 @@ mcpServers:
|
|
|
152
218
|
command: code-review-graph
|
|
153
219
|
args: [--stdio]
|
|
154
220
|
|
|
155
|
-
theme:
|
|
156
|
-
auto: false
|
|
157
|
-
maxAgents: 6
|
|
221
|
+
theme: graphite
|
|
222
|
+
auto: false # true: approve anything not explicitly denied
|
|
158
223
|
```
|
|
159
224
|
|
|
160
|
-
|
|
161
|
-
[`project_context.md`](./project_context.md).
|
|
225
|
+
<br>
|
|
162
226
|
|
|
163
|
-
##
|
|
227
|
+
## Build from source
|
|
164
228
|
|
|
165
229
|
Requires [Bun](https://bun.sh) ≥ 1.3 and [Go](https://go.dev) ≥ 1.22.
|
|
166
230
|
|
|
167
231
|
```sh
|
|
168
232
|
bun install
|
|
169
|
-
bun run build:
|
|
233
|
+
bun run build:all # ./niti (terminal UI) and ./niti-core (engine)
|
|
170
234
|
./niti
|
|
171
235
|
```
|
|
172
236
|
|
|
173
|
-
Headless
|
|
237
|
+
Headless, for scripts and CI:
|
|
174
238
|
|
|
175
239
|
```sh
|
|
176
240
|
bun run src/cli.ts "Build a clothing website for gen-z." # one-shot
|
|
177
|
-
bun run src/cli.ts --web "
|
|
178
|
-
bun run src/server/main.ts # headless server, prints its own handshake URL
|
|
241
|
+
bun run src/cli.ts --web "…" # with the live dashboard
|
|
179
242
|
```
|
|
180
243
|
|
|
181
|
-
|
|
244
|
+
Tests: `bun test` · `bunx tsc --noEmit` · `cd tui && go test ./...`
|
|
182
245
|
|
|
183
|
-
|
|
184
|
-
bun test # TypeScript unit + integration tests
|
|
185
|
-
bunx tsc --noEmit # typecheck
|
|
186
|
-
cd tui && go build ./... && go vet ./... && go test ./... # Go TUI: build, vet, unit tests
|
|
187
|
-
```
|
|
246
|
+
<br>
|
|
188
247
|
|
|
189
248
|
## License
|
|
190
249
|
|
|
191
|
-
MIT
|
|
250
|
+
MIT
|
|
251
|
+
|
|
252
|
+
<br>
|
|
192
253
|
|
|
193
|
-
<
|
|
254
|
+
<div align="center">
|
|
255
|
+
<img src="assets/logo.png" alt="niti" width="40">
|
|
256
|
+
<br>
|
|
257
|
+
<sub>Built for people who would rather watch their tools work than wonder what they're doing.</sub>
|
|
258
|
+
</div>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@slenderbuilds/niti",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "A terminal CLI that runs multiple AI coding agents from different LLM providers concurrently on one project.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -22,7 +22,8 @@
|
|
|
22
22
|
"build:release": "bun run scripts/build-release.ts",
|
|
23
23
|
"test": "bun test ./src ./web",
|
|
24
24
|
"typecheck": "tsc --noEmit",
|
|
25
|
-
"gen:catalog": "bun run scripts/gen-catalog.ts"
|
|
25
|
+
"gen:catalog": "bun run scripts/gen-catalog.ts",
|
|
26
|
+
"bump": "bun run scripts/bump-version.ts"
|
|
26
27
|
},
|
|
27
28
|
"engines": {
|
|
28
29
|
"node": ">=18"
|
|
@@ -53,11 +54,11 @@
|
|
|
53
54
|
"access": "public"
|
|
54
55
|
},
|
|
55
56
|
"optionalDependencies": {
|
|
56
|
-
"niti-darwin-arm64": "0.
|
|
57
|
-
"niti-darwin-x64": "0.
|
|
58
|
-
"niti-linux-arm64": "0.
|
|
59
|
-
"niti-linux-x64": "0.
|
|
60
|
-
"niti-win32-x64": "0.
|
|
57
|
+
"niti-darwin-arm64": "0.4.0",
|
|
58
|
+
"niti-darwin-x64": "0.4.0",
|
|
59
|
+
"niti-linux-arm64": "0.4.0",
|
|
60
|
+
"niti-linux-x64": "0.4.0",
|
|
61
|
+
"niti-win32-x64": "0.4.0"
|
|
61
62
|
},
|
|
62
63
|
"devDependencies": {
|
|
63
64
|
"@anthropic-ai/sdk": "^0.115.0",
|