@aiiware/aii 0.19.0 → 0.19.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 +64 -196
- package/bin/aii +576 -575
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -9,7 +9,7 @@ An autonomous AI assistant that lives in your terminal. Ask it anything — it r
|
|
|
9
9
|
</p>
|
|
10
10
|
|
|
11
11
|
<p align="center">
|
|
12
|
-
<strong>npm:</strong> <code>@aiiware/aii</code> · <strong>Version:</strong> 0.
|
|
12
|
+
<strong>npm:</strong> <code>@aiiware/aii</code> · <strong>Version:</strong> 0.19.3 · <strong>Node.js:</strong> >= 20
|
|
13
13
|
</p>
|
|
14
14
|
|
|
15
15
|
---
|
|
@@ -39,19 +39,9 @@ npm install -g @aiiware/aii
|
|
|
39
39
|
aii -D hi there!
|
|
40
40
|
```
|
|
41
41
|
|
|
42
|
-
|
|
43
|
-
<a href="https://youtu.be/Y98DqkgdWdQ">
|
|
44
|
-
<img src="https://img.youtube.com/vi/Y98DqkgdWdQ/maxresdefault.jpg" width="600" alt="Aii CLI npm Install Demo" />
|
|
45
|
-
</a>
|
|
46
|
-
<br/>
|
|
47
|
-
<em>npm install demo</em>
|
|
48
|
-
</p>
|
|
49
|
-
|
|
50
|
-
On first run, Aii auto-launches a setup wizard to configure your AI provider, model, and API key. After setup completes, your command executes automatically.
|
|
51
|
-
|
|
52
|
-
Already know your provider? You can also configure directly: `aii config apikey <provider> <key>`
|
|
42
|
+
([npm install demo](https://youtu.be/Y98DqkgdWdQ))
|
|
53
43
|
|
|
54
|
-
|
|
44
|
+
On first run, Aii auto-launches a setup wizard to configure your AI provider, model, and API key. After setup completes, your command executes automatically. Already know your provider? Configure directly: `aii config apikey <provider> <key>`
|
|
55
45
|
|
|
56
46
|
---
|
|
57
47
|
|
|
@@ -77,22 +67,7 @@ echo "Hello world" | aii translate to Japanese
|
|
|
77
67
|
aii run git commit -y
|
|
78
68
|
```
|
|
79
69
|
|
|
80
|
-
It reads your staged changes, writes a Conventional Commits message, and commits — one command.
|
|
81
|
-
|
|
82
|
-
Control the attribution footer (also on `aii run git pr`):
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
aii run git commit -y --no-signature # this run: no footer
|
|
86
|
-
aii run git commit -y --signature "Reviewed-by: TT" # this run: your own footer
|
|
87
|
-
```
|
|
88
|
-
|
|
89
|
-
```yaml
|
|
90
|
-
# ~/.aii/config.yaml — persistent preference
|
|
91
|
-
git:
|
|
92
|
-
commit_signature: none # default | none | any literal footer text
|
|
93
|
-
```
|
|
94
|
-
|
|
95
|
-
Precedence: `--no-signature` > `--signature "<text>"` > config > default. The footer is appended by the CLI after generation (never model-written), so it is byte-identical on every run. The interactive `/commit` and `/review` skills are separate surfaces and keep their own footer.
|
|
70
|
+
It reads your staged changes, writes a Conventional Commits message, and commits — one command. Control the attribution footer (also on `aii run git pr`) with `--no-signature` / `--signature "<text>"`, or persist it via `git.commit_signature` in [config](#configuration).
|
|
96
71
|
|
|
97
72
|
### Start an interactive session
|
|
98
73
|
|
|
@@ -107,10 +82,9 @@ You get a rich terminal UI with streaming responses, syntax highlighting, diff p
|
|
|
107
82
|
```bash
|
|
108
83
|
aii --model ollama/llama3.1:8b write a bash one-liner to find large files
|
|
109
84
|
aii --model deepseek/deepseek-chat explain this regex
|
|
110
|
-
aii --model openai/gpt-4.1 refactor this function
|
|
111
85
|
```
|
|
112
86
|
|
|
113
|
-
Or during a session: `/model
|
|
87
|
+
Or during a session: `/model deepseek:deepseek-chat`
|
|
114
88
|
|
|
115
89
|
### Run it autonomously
|
|
116
90
|
|
|
@@ -118,7 +92,7 @@ Or during a session: `/model anthropic:claude-sonnet-4`
|
|
|
118
92
|
aii loop "fix all failing tests" --verify "npm test" --budget 0.50
|
|
119
93
|
```
|
|
120
94
|
|
|
121
|
-
The agent loops
|
|
95
|
+
The agent loops until your verification command passes or a limit is hit — see [Autonomous Loops](#autonomous-loops). Or give an interactive session a standing objective with [`/goal`](#session-goals).
|
|
122
96
|
|
|
123
97
|
---
|
|
124
98
|
|
|
@@ -128,12 +102,12 @@ The agent loops with fresh context each iteration, stopping when your verificati
|
|
|
128
102
|
|
|
129
103
|
| Provider | What You Get |
|
|
130
104
|
|----------|-------------|
|
|
131
|
-
| **Anthropic** | Claude Sonnet
|
|
132
|
-
| **OpenAI** | GPT
|
|
133
|
-
| **Google** | Gemini
|
|
105
|
+
| **Anthropic** | Claude (Sonnet · Opus · Haiku) |
|
|
106
|
+
| **OpenAI** | GPT + o-series |
|
|
107
|
+
| **Google** | Gemini (pro · flash) |
|
|
134
108
|
| **DeepSeek** | deepseek-chat, deepseek-reasoner |
|
|
135
|
-
| **Moonshot** | Kimi
|
|
136
|
-
| **Z.ai** | GLM
|
|
109
|
+
| **Moonshot** | Kimi |
|
|
110
|
+
| **Z.ai** | GLM family |
|
|
137
111
|
| **Ollama** | Any local model — free, private, offline |
|
|
138
112
|
| **OpenRouter** | 300+ models through one API key |
|
|
139
113
|
|
|
@@ -143,22 +117,18 @@ The agent loops with fresh context each iteration, stopping when your verificati
|
|
|
143
117
|
|
|
144
118
|
## Tools
|
|
145
119
|
|
|
146
|
-
The agent autonomously picks from
|
|
120
|
+
The agent autonomously picks from its built-in tools:
|
|
147
121
|
|
|
148
122
|
| Tool | What It Does |
|
|
149
123
|
|------|-------------|
|
|
150
|
-
| **Read** | Read
|
|
151
|
-
| **
|
|
152
|
-
| **
|
|
153
|
-
| **
|
|
154
|
-
| **Grep** | Search file contents (regex) |
|
|
155
|
-
| **Bash** | Run shell commands |
|
|
156
|
-
| **WebSearch** | Search the web |
|
|
157
|
-
| **WebFetch** | Fetch and parse web pages |
|
|
124
|
+
| **Read / Write / Edit** | Read, create, and surgically edit files |
|
|
125
|
+
| **Glob / Grep** | Find files by pattern, search contents (regex) |
|
|
126
|
+
| **Bash** | Run shell commands (plus background jobs) |
|
|
127
|
+
| **WebSearch / WebFetch** | Search the web, fetch and parse pages |
|
|
158
128
|
| **Task** | Delegate to parallel subagents |
|
|
159
129
|
| **Skill** | Invoke extensible skill packages |
|
|
160
130
|
|
|
161
|
-
You control what the agent can do
|
|
131
|
+
…plus task-planning and interaction helpers. You control what the agent can do: by default it asks before running commands or writing files. Use `--auto` to skip confirmations.
|
|
162
132
|
|
|
163
133
|
---
|
|
164
134
|
|
|
@@ -169,10 +139,7 @@ During interactive sessions, type `/` to see all commands. Highlights:
|
|
|
169
139
|
| Command | What It Does |
|
|
170
140
|
|---------|-------------|
|
|
171
141
|
| `/help` | Show all commands |
|
|
172
|
-
| `/model [name]` | View or switch model |
|
|
173
|
-
| `/provider [name]` | View or switch provider |
|
|
174
|
-
| `/soul [name]` | View or switch soul (thinker, doer, coder) |
|
|
175
|
-
| `/theme [name]` | View or switch color theme |
|
|
142
|
+
| `/model [name]` / `/provider [name]` | View or switch model / provider |
|
|
176
143
|
| `/auto` | Toggle auto-approve mode |
|
|
177
144
|
| `/plan` | Toggle plan mode (read-only) |
|
|
178
145
|
| `/goal [objective]` | Set a session goal the agent works toward autonomously (see [Session Goals](#session-goals)) |
|
|
@@ -183,27 +150,17 @@ During interactive sessions, type `/` to see all commands. Highlights:
|
|
|
183
150
|
| `/aii [question]` | Ask about Aii features, commands, and usage |
|
|
184
151
|
| `/commit` | AI-powered git commit |
|
|
185
152
|
| `/review-pr` | AI-powered PR review |
|
|
186
|
-
| `/worktree create` | Isolated workspace for experiments |
|
|
187
|
-
| `/mcp install` | Add MCP server from catalog |
|
|
188
|
-
| `/mcp reconnect` | Reconnect failed MCP servers |
|
|
189
|
-
| `/persona [action]` | Manage workspace personas (install, use, list, status) |
|
|
190
|
-
| `/skills` | List and manage skill packages |
|
|
191
|
-
| `/sessions` | Browse and resume past sessions |
|
|
192
153
|
| `/exit` | End session with summary |
|
|
193
154
|
|
|
194
155
|
### Keyboard Shortcuts
|
|
195
156
|
|
|
196
157
|
| Key | Action |
|
|
197
158
|
|-----|--------|
|
|
198
|
-
| `Enter` | Submit input |
|
|
199
159
|
| `Esc` | Cancel current request |
|
|
200
|
-
| `Ctrl+C` | Exit immediately |
|
|
201
160
|
| `Ctrl+D` | Graceful exit with session summary |
|
|
202
161
|
| `Ctrl+L` | Clear conversation |
|
|
203
|
-
| `Ctrl+O` | Peek full tool output
|
|
162
|
+
| `Ctrl+O` | Peek full tool output · toggle subagent tree |
|
|
204
163
|
| `Ctrl+U` | Clear type-ahead queue / input line |
|
|
205
|
-
| `Up/Down` | Navigate input history |
|
|
206
|
-
| `Tab` | Autocomplete commands |
|
|
207
164
|
|
|
208
165
|
---
|
|
209
166
|
|
|
@@ -211,14 +168,7 @@ During interactive sessions, type `/` to see all commands. Highlights:
|
|
|
211
168
|
|
|
212
169
|
### Subagents
|
|
213
170
|
|
|
214
|
-
The agent delegates complex
|
|
215
|
-
|
|
216
|
-
| Agent | Purpose | Tools |
|
|
217
|
-
|-------|---------|-------|
|
|
218
|
-
| **Explore** | Fast codebase search and analysis | Read-only |
|
|
219
|
-
| **Plan** | Architecture and implementation design | Read-only |
|
|
220
|
-
| **Review** | Code quality analysis | Read-only |
|
|
221
|
-
| **Code** | Full implementation | All tools |
|
|
171
|
+
The agent delegates complex work to specialized read-only subagents running in parallel — **explore**, **plan**, **review**, **code-reviewer**, **code-architect**, **researcher** — keeping the main context clean while they fan out.
|
|
222
172
|
|
|
223
173
|
Define custom agents in `.aii/agents/<name>.md` with YAML frontmatter for custom system prompts, model tiers, and tool access.
|
|
224
174
|
|
|
@@ -248,11 +198,10 @@ Work on multiple features in parallel without stashing:
|
|
|
248
198
|
```bash
|
|
249
199
|
aii worktree create auth-refactor # Create isolated workspace + branch
|
|
250
200
|
aii worktree list # See all worktrees
|
|
251
|
-
aii worktree merge auth-refactor # Merge back
|
|
252
201
|
aii worktree clean # Remove all clean worktrees
|
|
253
202
|
```
|
|
254
203
|
|
|
255
|
-
|
|
204
|
+
During a session, `/worktree` adds `merge`, `diff`, and `commit`: `/worktree merge auth-refactor` merges back.
|
|
256
205
|
|
|
257
206
|
### Autonomous Loops
|
|
258
207
|
|
|
@@ -270,24 +219,15 @@ aii loop --budget 1.00 --duration 8h "refactor the auth module"
|
|
|
270
219
|
|
|
271
220
|
| Command | What It Does |
|
|
272
221
|
|---------|-------------|
|
|
273
|
-
| `/pause [duration]` | Pause after the current tool call (e.g., `/pause 5m
|
|
274
|
-
| `/resume` | Resume a paused loop |
|
|
275
|
-
| `/stop` | Finish current turn, then exit cleanly |
|
|
222
|
+
| `/pause [duration]` | Pause after the current tool call (e.g., `/pause 5m`); timed pauses auto-resume |
|
|
223
|
+
| `/resume` / `/stop` | Resume a paused loop / finish the current turn and exit cleanly |
|
|
276
224
|
| `/stats` | Live view of tokens, cost, iterations, elapsed time |
|
|
277
|
-
| `/note <text>` | Inject
|
|
278
|
-
| Plain text + Enter | Queue guidance
|
|
279
|
-
|
|
280
|
-
Pause takes effect between tool calls — the agent finishes what it's doing, then waits. Timed pauses auto-resume after the duration. The status bar shows pause state with a countdown timer.
|
|
281
|
-
|
|
282
|
-
**`/note` vs plain text** — `/note` delivers your message immediately within the current turn, intercepting the next tool call so the agent can pivot without waiting. Plain text queues guidance for the next iteration — the agent sees it when the new iteration starts. If the agent has no more tool calls left, `/note` falls back to the next iteration — your note is never lost.
|
|
225
|
+
| `/note <text>` | Inject guidance immediately — seen at the next tool call (also works in normal sessions) |
|
|
226
|
+
| Plain text + Enter | Queue guidance for the next iteration |
|
|
283
227
|
|
|
284
|
-
`/
|
|
228
|
+
A canceled or exhausted loop is resumable: `/loop list` shows saved loops, `/loop resume <id>` continues one with its remaining limits. The status bar tracks iterations, tokens, cost, and pause state in real time.
|
|
285
229
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
The status bar updates in real time with iteration count, token usage, estimated cost, and tool calls — you always know what the loop is doing and what it's costing.
|
|
289
|
-
|
|
290
|
-
### Session Goals (`/goal`)
|
|
230
|
+
### Session Goals
|
|
291
231
|
|
|
292
232
|
Give the interactive session a **persistent objective it keeps working toward until evidence says it's done** — no more typing "keep going" after every turn:
|
|
293
233
|
|
|
@@ -296,23 +236,21 @@ Give the interactive session a **persistent objective it keeps working toward un
|
|
|
296
236
|
without changing public API behavior. --budget 2.00
|
|
297
237
|
```
|
|
298
238
|
|
|
299
|
-
While a goal is **active**, the agent sees the objective every turn
|
|
239
|
+
While a goal is **active**, the agent sees the objective every turn and auto-continues between turns — working, then declaring `GOAL COMPLETE — evidence: …` or `GOAL BLOCKED — <what it needs>`. The lifecycle stays yours:
|
|
300
240
|
|
|
301
241
|
| Command | What It Does |
|
|
302
242
|
|---------|-------------|
|
|
303
|
-
| `/goal <objective>` | Set the goal (`--budget
|
|
304
|
-
| `/goal` | Status view — objective, status, verify,
|
|
305
|
-
| `/goal draft <
|
|
306
|
-
| `/goal edit <text and/or flags>` | Revise in place
|
|
243
|
+
| `/goal <objective>` | Set the goal — flags: `--verify "cmd"` (repeatable), `--budget`, `--auto-turns` (`0` = unlimited), `--max-time`, `--max-tokens`, `--no-proof`, `--auto` |
|
|
244
|
+
| `/goal` | Status view — objective, status, verify, limits, usage |
|
|
245
|
+
| `/goal draft <description>` | The model proposes a strong goal contract; you edit + submit |
|
|
246
|
+
| `/goal edit <text and/or flags>` | Revise in place |
|
|
307
247
|
| `/goal pause` / `resume` / `clear` | Suspend / re-arm / remove |
|
|
308
248
|
|
|
309
|
-
**Verified completion** —
|
|
310
|
-
|
|
311
|
-
**Unattended runs**: in Normal mode, approval prompts pause the goal (it never escalates its own authority) — add `--auto` at set time (or type `/auto`) to auto-approve mutating tools for the session and let it run hands-off.
|
|
249
|
+
**Verified completion** — with `--verify` armed, `GOAL COMPLETE` only counts when every command exits 0; failures keep the goal active and feed back to the agent, so "done" means *provably* done. Even without `--verify`, a bare completion isn't taken at face value: the agent gets one nudge to show proof, self-contradicting evidence is rejected, and an unlimited (`--auto-turns 0`) goal **never ends on an unverified claim** (opt out with `--no-proof` or `goal.proof_expected: false` in config).
|
|
312
250
|
|
|
313
|
-
Guardrails
|
|
251
|
+
Guardrails: auto-continuation caps at **10 turns** by default, limit stops hand off with measured progress/remaining/next, typing always wins the turn, Esc pauses, and the `◎ Goal` status-bar segment keeps the state in view. Goals survive restarts via `aii agent --continue`.
|
|
314
252
|
|
|
315
|
-
`/goal` vs `/loop`: a loop grinds a fixed prompt with fresh context each iteration; a goal keeps one **conversation** converging on an outcome
|
|
253
|
+
`/goal` vs `/loop`: a loop grinds a fixed prompt with fresh context each iteration; a goal keeps one **conversation** converging on an outcome. Starting a loop auto-pauses an active goal.
|
|
316
254
|
|
|
317
255
|
### Telegram Integration
|
|
318
256
|
|
|
@@ -321,25 +259,13 @@ Run the full agent from Telegram:
|
|
|
321
259
|
```bash
|
|
322
260
|
aii telegram pair mybot <bot-token> # Pair with @BotFather token
|
|
323
261
|
aii telegram start mybot # Start listening
|
|
324
|
-
aii telegram list # Manage bots
|
|
325
262
|
```
|
|
326
263
|
|
|
327
|
-
Responses stream live
|
|
328
|
-
|
|
329
|
-
Start a conversation in Telegram, continue it from the CLI — or vice versa.
|
|
264
|
+
Responses stream live, and conversations continue across channels — start in Telegram, pick up from the CLI, or vice versa.
|
|
330
265
|
|
|
331
266
|
### Soul System
|
|
332
267
|
|
|
333
|
-
Each agent has a personality — called a **soul** — that shapes how it communicates. Built on [SoulSpec v0.4](https://soulspec.org).
|
|
334
|
-
|
|
335
|
-
```bash
|
|
336
|
-
aii soul help # See available souls
|
|
337
|
-
aii soul switch doer # Switch personality
|
|
338
|
-
```
|
|
339
|
-
|
|
340
|
-
Or during a session: `/soul doer`
|
|
341
|
-
|
|
342
|
-
**Built-in souls:**
|
|
268
|
+
Each agent has a personality — called a **soul** — that shapes how it communicates. Built on [SoulSpec v0.4](https://soulspec.org). Switch with `aii soul switch doer` or `/soul doer` in a session.
|
|
343
269
|
|
|
344
270
|
| Soul | Display Name | Style |
|
|
345
271
|
|------|-------------|-------|
|
|
@@ -347,40 +273,20 @@ Or during a session: `/soul doer`
|
|
|
347
273
|
| **doer** | Aii Doer 🪼 | Direct and efficient — leads with the answer, every sentence earns its place |
|
|
348
274
|
| **coder** | Aii Coder 🪼 | Pair-programming partner — reads your codebase, references specific lines |
|
|
349
275
|
|
|
350
|
-
Your preference persists across sessions and channels.
|
|
351
|
-
|
|
352
|
-
**Custom souls:** Create your own in `.aii/soul/` with `SOUL.md`, `STYLE.md`, `IDENTITY.md`, and an optional `soul.json` manifest. Custom souls introduce themselves as "{Name}, powered by Aii 🪼".
|
|
276
|
+
Your preference persists across sessions and channels. Custom souls: drop a soul directory (`SOUL.md`, `STYLE.md`, `IDENTITY.md`) in `.aii/soul/`.
|
|
353
277
|
|
|
354
278
|
### Personas
|
|
355
279
|
|
|
356
280
|
Bundle soul, skills, hooks, instructions, and theme into a single installable package — one command to load a complete AI engineering identity.
|
|
357
281
|
|
|
358
282
|
```bash
|
|
359
|
-
#
|
|
360
|
-
aii persona
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
aii persona install github:aiiware/aii-personas/aiiware-full-stack-engineer
|
|
364
|
-
|
|
365
|
-
# Activate it
|
|
366
|
-
aii persona use aiiware/full-stack-engineer
|
|
367
|
-
|
|
368
|
-
# Switch roles instantly
|
|
369
|
-
aii persona use aiiware/code-reviewer
|
|
370
|
-
aii persona use aiiware/mentor
|
|
371
|
-
|
|
372
|
-
# Check what's active
|
|
373
|
-
aii persona status
|
|
374
|
-
|
|
375
|
-
# Deactivate
|
|
376
|
-
aii persona use --none
|
|
283
|
+
aii persona install github:aiiware/aii-personas/aiiware-full-stack-engineer # or gitlab:
|
|
284
|
+
aii persona use aiiware/full-stack-engineer # activate (switch roles anytime)
|
|
285
|
+
aii persona status # check what's active
|
|
286
|
+
aii persona use --none # deactivate
|
|
377
287
|
```
|
|
378
288
|
|
|
379
|
-
**Official personas:** [github.com/aiiware/aii-personas](https://github.com/aiiware/aii-personas)
|
|
380
|
-
|
|
381
|
-
Or during a session: `/persona use aiiware/full-stack-engineer`, `/persona list`, `/persona status`
|
|
382
|
-
|
|
383
|
-
Create your own — just a directory with a `persona.json` manifest and skill/soul files. See the [personas repo](https://github.com/aiiware/aii-personas) for examples.
|
|
289
|
+
**Official personas:** [github.com/aiiware/aii-personas](https://github.com/aiiware/aii-personas) — or create your own: a directory with a `persona.json` manifest and skill/soul files. In-session: `/persona use`, `/persona list`, `/persona status`.
|
|
384
290
|
|
|
385
291
|
### Theme System
|
|
386
292
|
|
|
@@ -401,12 +307,9 @@ Extensible instruction packages you can install and invoke:
|
|
|
401
307
|
/commit # Built-in: AI git commit
|
|
402
308
|
/review-pr # Built-in: PR review
|
|
403
309
|
/explain this function # Built-in: code explainer
|
|
404
|
-
/<custom-skill> [args] # Any user-invocable skill
|
|
405
310
|
```
|
|
406
311
|
|
|
407
|
-
Install accepts GitHub URLs in any format — repo paths, blob URLs, and bare repo URLs all work.
|
|
408
|
-
|
|
409
|
-
Create skills in `.aii/skills/<name>/SKILL.md` with YAML frontmatter.
|
|
312
|
+
Install accepts GitHub URLs in any format — repo paths, blob URLs, and bare repo URLs all work. Create skills in `.aii/skills/<name>/SKILL.md` with YAML frontmatter.
|
|
410
313
|
|
|
411
314
|
### Project Instructions (AGENTS.md)
|
|
412
315
|
|
|
@@ -423,7 +326,7 @@ Also discovers `CLAUDE.md`, `.cursorrules`, and `.github/copilot-instructions.md
|
|
|
423
326
|
|
|
424
327
|
Run custom scripts when the agent takes actions. Configure in `.aii/hooks.json`:
|
|
425
328
|
|
|
426
|
-
**Events:** `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStart`, `SubagentStop`
|
|
329
|
+
**Events:** `PreToolUse`, `PostToolUse`, `Stop`, `SubagentStart`, `SubagentStop`, `TaskCompleted`
|
|
427
330
|
|
|
428
331
|
```bash
|
|
429
332
|
/hooks # View configured hooks
|
|
@@ -438,11 +341,9 @@ Extend the agent with Model Context Protocol servers:
|
|
|
438
341
|
aii mcp catalog # Browse available servers
|
|
439
342
|
aii mcp install github # One-command install
|
|
440
343
|
aii mcp add my-server npx my-mcp # Add custom server
|
|
441
|
-
aii mcp list-tools github # Discover tools
|
|
442
|
-
aii mcp test github # Connectivity test
|
|
443
344
|
```
|
|
444
345
|
|
|
445
|
-
MCP servers connect in the background during session start
|
|
346
|
+
MCP servers connect in the background during session start. If a server drops, `/mcp reconnect <server>` restores it without restarting your session.
|
|
446
347
|
|
|
447
348
|
### Server Sessions
|
|
448
349
|
|
|
@@ -451,7 +352,6 @@ Conversations persist across restarts and channels:
|
|
|
451
352
|
```bash
|
|
452
353
|
aii sessions list # Browse recent sessions
|
|
453
354
|
aii sessions resume <id> # Pick up where you left off
|
|
454
|
-
aii sessions info <id> # View stats (tokens, cost, tools)
|
|
455
355
|
```
|
|
456
356
|
|
|
457
357
|
---
|
|
@@ -461,23 +361,14 @@ aii sessions info <id> # View stats (tokens, cost, tools)
|
|
|
461
361
|
```bash
|
|
462
362
|
aii config init # Interactive setup wizard
|
|
463
363
|
aii config init --project # Scaffold project config for this repo
|
|
464
|
-
aii config show # Current settings
|
|
465
364
|
aii config show --sources # Per-key provenance (env/local/project/global)
|
|
466
365
|
aii config validate # Check config + API key validity
|
|
467
366
|
aii config set <key> <value> # Set a specific value
|
|
468
|
-
aii config provider [name]
|
|
469
|
-
aii config model [name] # Show or switch model
|
|
367
|
+
aii config provider|model [name] # Show or switch provider / model
|
|
470
368
|
aii config apikey <provider> [key] # Set API key (masked input)
|
|
471
|
-
aii config apikey list # Show all provider key status
|
|
472
|
-
aii config apikey remove <provider> # Remove a provider's key
|
|
473
|
-
aii config apikey help # Show API key help
|
|
474
|
-
aii config host [host:port] # Show or change server URL
|
|
475
|
-
aii config models # List all available models
|
|
476
|
-
aii config providers # List all providers with status
|
|
477
|
-
aii config help # Show config help
|
|
478
369
|
```
|
|
479
370
|
|
|
480
|
-
Config lives in `~/.aii/`:
|
|
371
|
+
Run `aii config help` for the full list. Config lives in `~/.aii/`:
|
|
481
372
|
|
|
482
373
|
| File | Purpose |
|
|
483
374
|
|------|---------|
|
|
@@ -485,19 +376,23 @@ Config lives in `~/.aii/`:
|
|
|
485
376
|
| `secrets.yaml` | API keys (file mode 0600) |
|
|
486
377
|
| `mcp_servers.json` | MCP server configuration |
|
|
487
378
|
|
|
488
|
-
|
|
379
|
+
Common preference keys, one file:
|
|
489
380
|
|
|
490
381
|
```yaml
|
|
491
382
|
# ~/.aii/config.yaml
|
|
383
|
+
git:
|
|
384
|
+
commit_signature: none # commit/PR footer: default | none | any literal text
|
|
492
385
|
sessions:
|
|
493
|
-
keep: 50
|
|
386
|
+
keep: 50 # most-recent sessions to retain; 0 = unlimited
|
|
387
|
+
goal:
|
|
388
|
+
proof_expected: true # /goal demands proof before accepting completion
|
|
494
389
|
```
|
|
495
390
|
|
|
496
391
|
Environment variables also work: `ANTHROPIC_API_KEY`, `OPENAI_API_KEY`, `DEEPSEEK_API_KEY`, etc.
|
|
497
392
|
|
|
498
|
-
### Project
|
|
393
|
+
### Project-level config & commands
|
|
499
394
|
|
|
500
|
-
A repository can carry its own Aii config — committed for the team, layered under your personal settings:
|
|
395
|
+
A repository can carry its own Aii config and slash commands — committed for the team, layered under your personal settings:
|
|
501
396
|
|
|
502
397
|
```bash
|
|
503
398
|
aii config init --project # creates .aii/settings.json, gitignores .aii/settings.local.json
|
|
@@ -507,38 +402,13 @@ aii config init --project # creates .aii/settings.json, gitignores .aii/sett
|
|
|
507
402
|
// .aii/settings.json (committed)
|
|
508
403
|
{
|
|
509
404
|
"llm": { "model": "deepseek-v4", "provider": "deepseek" },
|
|
510
|
-
"
|
|
511
|
-
"permissions": {
|
|
512
|
-
"deny_write": ["db/migrations/**"], // paths the agent may never write in this repo
|
|
513
|
-
"deny_tools": ["Bash"] // tools the agent may never use in this repo
|
|
514
|
-
}
|
|
405
|
+
"permissions": { "deny_write": ["db/migrations/**"], "deny_tools": ["Bash"] }
|
|
515
406
|
}
|
|
516
407
|
```
|
|
517
408
|
|
|
518
|
-
Precedence: `flag > env > .aii/settings.local.json > .aii/settings.json > ~/.aii/config.yaml > defaults` — your env pins always win
|
|
519
|
-
|
|
520
|
-
**A repo can only narrow, never widen.** Only safe keys are accepted (model, provider, temperature, output mode, persona, theme, deny rules); anything that would widen authority — `api.*`, `allow_write`, auto-approve flags — is rejected with a warning. Deny rules are enforced everywhere (file tools, Bash write targets, subagents) as hard tool errors. Project values are session-effective only: `aii config set` still writes exclusively to your `~/.aii/config.yaml`.
|
|
521
|
-
|
|
522
|
-
A repo's `.aii/hooks.json` never runs silently: the first interactive session shows each hook's event + command and asks for approval, remembered in `~/.aii/project-trust.json` until the file changes. Headless runs fail closed. Skip the whole project layer for one session with `aii --no-project-config`.
|
|
409
|
+
Precedence: `flag > env > .aii/settings.local.json > .aii/settings.json > ~/.aii/config.yaml > defaults` — your env pins always win; `aii config show --sources` shows where each value came from. **A repo can only narrow, never widen**: only safe keys are accepted (model, provider, output mode, persona, theme, deny rules); anything that would widen authority is rejected, and deny rules are enforced everywhere as hard tool errors.
|
|
523
410
|
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
A repository can ship its own slash commands — one markdown file per command under `.aii/commands/`, committed and shared with the team:
|
|
527
|
-
|
|
528
|
-
```markdown
|
|
529
|
-
<!-- .aii/commands/deploy.md -->
|
|
530
|
-
---
|
|
531
|
-
description: Deploy the current branch to staging
|
|
532
|
-
argument-hint: <environment>
|
|
533
|
-
---
|
|
534
|
-
Deploy the current branch to $ARGUMENTS:
|
|
535
|
-
1. Run the test suite; abort on failure.
|
|
536
|
-
2. Build and push the image tagged with the short sha.
|
|
537
|
-
```
|
|
538
|
-
|
|
539
|
-
Typing `/deploy staging` expands the file's body (with `$ARGUMENTS` → `staging`) into the agent turn. The filename is the command name; frontmatter is optional (`description` and `argument-hint` are shown in the `/` menu and `/help`, where project commands carry a `[project]` badge).
|
|
540
|
-
|
|
541
|
-
**First use asks once.** A cloned repo's command is prompt content the agent will follow with your tools — so the first `/deploy` shows the file's full body and asks. Approve and it's remembered (per file content, in `~/.aii/project-trust.json`) until the file changes; decline and it's skipped. Headless runs fail closed. The same gate now also covers project `.aii/skills/` — repo-committed skills ask before they first run, and an unapproved one is never model-auto-invoked. Project commands are typed-slash only (never triggered by plain English), and `aii --no-project-config` disables commands and skills along with the rest of the project layer.
|
|
411
|
+
Project slash commands live one markdown file per command under `.aii/commands/` — typing `/deploy staging` expands `.aii/commands/deploy.md` (with `$ARGUMENTS` → `staging`) into the agent turn, and project commands carry a `[project]` badge in the `/` menu. **First use asks once**: a cloned repo's command, hook, or skill shows its full content and asks before it ever runs — remembered per file content in `~/.aii/project-trust.json` until the file changes; headless runs fail closed. Skip the whole project layer with `aii --no-project-config`.
|
|
542
412
|
|
|
543
413
|
---
|
|
544
414
|
|
|
@@ -550,6 +420,7 @@ Typing `/deploy staging` expands the file's body (with `$ARGUMENTS` → `staging
|
|
|
550
420
|
| `aii <query>` | Single-shot query |
|
|
551
421
|
| `aii run git commit [-y]` | AI-powered git commit |
|
|
552
422
|
| `aii loop [query] [--flags]` | Autonomous agent loop |
|
|
423
|
+
| `aii cloud <action>` | Aii Cloud — connect this machine, dispatch from the web (BYOC) |
|
|
553
424
|
| `aii config <action>` | Configuration management |
|
|
554
425
|
| `aii mcp <action>` | MCP server management |
|
|
555
426
|
| `aii telegram <action>` | Telegram bot management |
|
|
@@ -558,11 +429,12 @@ Typing `/deploy staging` expands the file's body (with `$ARGUMENTS` → `staging
|
|
|
558
429
|
| `aii skill <action>` | Skill management (list, info, install) |
|
|
559
430
|
| `aii soul <action>` | Soul (personality) management |
|
|
560
431
|
| `aii worktree <action>` | Git worktree management |
|
|
432
|
+
| `aii plugin <action>` | Plugin management |
|
|
561
433
|
| `aii prompt <action>` | Prompt library |
|
|
562
434
|
| `aii upgrade` | Self-update to latest version |
|
|
563
435
|
| `aii doctor` | Health diagnostics |
|
|
564
|
-
|
|
565
|
-
|
|
436
|
+
|
|
437
|
+
Run `aii help` for the full command list.
|
|
566
438
|
|
|
567
439
|
### Global Flags
|
|
568
440
|
|
|
@@ -600,10 +472,7 @@ aii "review the staged diff for correctness bugs" \
|
|
|
600
472
|
--bare --max-turns 12 --max-budget-usd 1.00 --output-format json | jq -r '.result'
|
|
601
473
|
```
|
|
602
474
|
|
|
603
|
-
|
|
604
|
-
- **`--bare`** sends only the result to **stdout** and all status/chrome to **stderr**, so `RESULT=$(aii "…" --bare)` is clean. Compose with `--output-format json` for structured stdout.
|
|
605
|
-
- **`--append-system-prompt[-file]`** injects an additive, escaped instruction (a review rubric, house style) without editing committed config. The file form reads only inside the workspace and rejects symlinks.
|
|
606
|
-
- Ready-to-use **GitHub Actions** recipes live in [`examples/github-actions/`](examples/github-actions/): they use the `pull_request` trigger (never `pull_request_target` with a PR checkout), reference `AII_API_KEY` via `secrets.`, and consume Aii output as data (never `eval`).
|
|
475
|
+
`--max-turns` bounds cost server-side; `--bare` keeps stdout pipe-clean for `RESULT=$(aii "…" --bare)`; on a single one-shot turn, `--max-budget-usd` adds an advisory `over_budget` flag (pair with `--max-turns` to hard-bound cost). Ready-to-use **GitHub Actions** recipes live in [`examples/github-actions/`](examples/github-actions/) — they use the `pull_request` trigger (never `pull_request_target` with a PR checkout), reference `AII_API_KEY` via `secrets.`, and consume Aii output as data (never `eval`).
|
|
607
476
|
|
|
608
477
|
---
|
|
609
478
|
|
|
@@ -614,7 +483,6 @@ Run `aii doctor` for automated diagnostics.
|
|
|
614
483
|
| Problem | Fix |
|
|
615
484
|
|---------|-----|
|
|
616
485
|
| `aii` not found | `curl -fsSL https://aiiware.com/install.sh \| bash` |
|
|
617
|
-
| Update to latest | `aii upgrade` |
|
|
618
486
|
| Server won't start | Make sure Docker is running |
|
|
619
487
|
| API key error | `aii config apikey <provider> <key>` or `aii config init` |
|
|
620
488
|
| Wrong model | `aii config model <name>` |
|