zelari-code 0.7.9 โ 0.7.11
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/LICENSE +37 -37
- package/README.md +320 -295
- package/bin/zelari-code.js +62 -62
- package/dist/cli/app.js +33 -3
- package/dist/cli/app.js.map +1 -1
- package/dist/cli/components/LiveRegion.js +7 -3
- package/dist/cli/components/LiveRegion.js.map +1 -1
- package/dist/cli/components/SelectList.js +67 -0
- package/dist/cli/components/SelectList.js.map +1 -0
- package/dist/cli/components/Spinner.js +51 -0
- package/dist/cli/components/Spinner.js.map +1 -0
- package/dist/cli/components/SplashScreen.js +85 -85
- package/dist/cli/components/StatusBar.js +42 -34
- package/dist/cli/components/StatusBar.js.map +1 -1
- package/dist/cli/headless.js +10 -10
- package/dist/cli/hooks/useSlashDispatch.js +11 -1
- package/dist/cli/hooks/useSlashDispatch.js.map +1 -1
- package/dist/cli/keyStore.js +2 -2
- package/dist/cli/keyStore.js.map +1 -1
- package/dist/cli/main.bundled.js +15146 -14919
- package/dist/cli/main.bundled.js.map +4 -4
- package/dist/cli/main.js +1 -1
- package/dist/cli/main.js.map +1 -1
- package/dist/cli/modelDiscovery.js +42 -5
- package/dist/cli/modelDiscovery.js.map +1 -1
- package/dist/cli/provider/openai-compatible.js +4 -2
- package/dist/cli/provider/openai-compatible.js.map +1 -1
- package/dist/cli/slashCommands.js +22 -5
- package/dist/cli/slashCommands.js.map +1 -1
- package/dist/cli/slashHandlers/provider.js +102 -5
- package/dist/cli/slashHandlers/provider.js.map +1 -1
- package/package.json +2 -2
- package/dist/agents/advancedTools.js +0 -115
- package/dist/agents/advancedTools.js.map +0 -1
- package/dist/agents/councilApi.js +0 -375
- package/dist/agents/councilApi.js.map +0 -1
- package/dist/agents/councilDirectives.js +0 -100
- package/dist/agents/councilDirectives.js.map +0 -1
- package/dist/agents/promoteMember.js +0 -210
- package/dist/agents/promoteMember.js.map +0 -1
- package/dist/agents/promptModules.js +0 -139
- package/dist/agents/promptModules.js.map +0 -1
- package/dist/agents/roles.js +0 -299
- package/dist/agents/roles.js.map +0 -1
- package/dist/agents/skills/builtin/debugging.js +0 -248
- package/dist/agents/skills/builtin/debugging.js.map +0 -1
- package/dist/agents/skills/builtin/docs.js +0 -301
- package/dist/agents/skills/builtin/docs.js.map +0 -1
- package/dist/agents/skills/builtin/git-ops.js +0 -301
- package/dist/agents/skills/builtin/git-ops.js.map +0 -1
- package/dist/agents/skills/builtin/planning.js +0 -335
- package/dist/agents/skills/builtin/planning.js.map +0 -1
- package/dist/agents/skills/builtin/refactoring.js +0 -261
- package/dist/agents/skills/builtin/refactoring.js.map +0 -1
- package/dist/agents/skills/builtin/review.js +0 -302
- package/dist/agents/skills/builtin/review.js.map +0 -1
- package/dist/agents/skills/builtin/testing.js +0 -245
- package/dist/agents/skills/builtin/testing.js.map +0 -1
- package/dist/agents/skills.js +0 -272
- package/dist/agents/skills.js.map +0 -1
- package/dist/agents/systemPromptBuilder.js +0 -151
- package/dist/agents/systemPromptBuilder.js.map +0 -1
- package/dist/agents/toolSchemas.js +0 -249
- package/dist/agents/toolSchemas.js.map +0 -1
- package/dist/agents/tools.js +0 -196
- package/dist/agents/tools.js.map +0 -1
- package/dist/agents/vaultTools.js +0 -134
- package/dist/agents/vaultTools.js.map +0 -1
- package/dist/cli/components/CollapsibleToolOutput.js +0 -43
- package/dist/cli/components/CollapsibleToolOutput.js.map +0 -1
- package/dist/cli/components/Header.js +0 -38
- package/dist/cli/components/Header.js.map +0 -1
- package/dist/main/core/AgentHarness.js +0 -467
- package/dist/main/core/AgentHarness.js.map +0 -1
- package/dist/main/core/providerStream.js +0 -99
- package/dist/main/core/providerStream.js.map +0 -1
- package/dist/main/core/sessionJsonl.js +0 -99
- package/dist/main/core/sessionJsonl.js.map +0 -1
- package/dist/main/core/tools/auditLog.js +0 -26
- package/dist/main/core/tools/auditLog.js.map +0 -1
- package/dist/main/core/tools/builtin/filesystem.js +0 -110
- package/dist/main/core/tools/builtin/filesystem.js.map +0 -1
- package/dist/main/core/tools/builtin/listFiles.js +0 -86
- package/dist/main/core/tools/builtin/listFiles.js.map +0 -1
- package/dist/main/core/tools/builtin/search.js +0 -56
- package/dist/main/core/tools/builtin/search.js.map +0 -1
- package/dist/main/core/tools/builtin/shell.js +0 -51
- package/dist/main/core/tools/builtin/shell.js.map +0 -1
- package/dist/main/core/tools/registry.js +0 -71
- package/dist/main/core/tools/registry.js.map +0 -1
- package/dist/main/core/tools/toolTypes.js +0 -8
- package/dist/main/core/tools/toolTypes.js.map +0 -1
- package/dist/main/core/tools/zodBridge.js +0 -56
- package/dist/main/core/tools/zodBridge.js.map +0 -1
- package/dist/shared/eventBus.js +0 -104
- package/dist/shared/eventBus.js.map +0 -1
- package/dist/shared/events.js +0 -73
- package/dist/shared/events.js.map +0 -1
- package/dist/shared/index.js +0 -8
- package/dist/shared/index.js.map +0 -1
- package/dist/types/context.js +0 -3
- package/dist/types/context.js.map +0 -1
- package/dist/types/index.js +0 -2
- package/dist/types/index.js.map +0 -1
- package/dist/types/knowledge.js +0 -2
- package/dist/types/knowledge.js.map +0 -1
- package/dist/types/systemTypes.js +0 -10
- package/dist/types/systemTypes.js.map +0 -1
package/README.md
CHANGED
|
@@ -1,296 +1,321 @@
|
|
|
1
|
-
# Zelari Code
|
|
2
|
-
|
|
3
|
-
```
|
|
4
|
-
-#%=
|
|
5
|
-
.*%%%@#:
|
|
6
|
-
=%%%%%%%@*
|
|
7
|
-
+%%%%%%%%%%#.
|
|
8
|
-
+%%%@@@@@@@%@#.
|
|
9
|
-
.*%@@@@@@@@@@@@@%-
|
|
10
|
-
.#%@@@@@@@@@@@@@@@@-
|
|
11
|
-
*%@@@@@@@@@@@@@@@@@%.
|
|
12
|
-
:@%%@@@@@@%:+%@@@@@%@=
|
|
13
|
-
=@%%@@@@@%.=-+%@%%@*
|
|
14
|
-
.=@@%@@@@%.*@*-+@@*.
|
|
15
|
-
-*%@@@@@@@@%.*@@@+:#@@#=.
|
|
16
|
-
*%%%%%%@@@@@@.*#%#=-:+@@@%
|
|
17
|
-
:@%%%%%%@@@@@@.:=.*:*@@@@@@=
|
|
18
|
-
*@%%@%%@@@@@@@*%@*:-:%@@@@@%.
|
|
19
|
-
:@@@%@@@@@@@@@@@@@@#%@@@@@@@@=
|
|
20
|
-
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
|
|
21
|
-
|
|
22
|
-
Z E L A R I C O D E
|
|
23
|
-
N-THEM Studio
|
|
24
|
-
```
|
|
25
|
-
|
|
26
|
-
> AI Council coding agent CLI โ multi-agent orchestration with slash commands, provider-agnostic LLM streaming, and self-update.
|
|
27
|
-
|
|
28
|
-

|
|
29
|
-

|
|
30
|
-

|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
>
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
โ
|
|
76
|
-
โ
|
|
77
|
-
โ
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
zelari-code --
|
|
98
|
-
zelari-code
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
#
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
#
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
|
128
|
-
|
|
129
|
-
| `/
|
|
130
|
-
| `/
|
|
131
|
-
| `/provider` |
|
|
132
|
-
| `/
|
|
133
|
-
| `/
|
|
134
|
-
| `/
|
|
135
|
-
| `/
|
|
136
|
-
| `/
|
|
137
|
-
| `/
|
|
138
|
-
| `/
|
|
139
|
-
| `/
|
|
140
|
-
| `/
|
|
141
|
-
| `/
|
|
142
|
-
| `/
|
|
143
|
-
| `/
|
|
144
|
-
| `/
|
|
145
|
-
| `/steer <text>` | Queue follow-up
|
|
146
|
-
| `/
|
|
147
|
-
| `/
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
##
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
```bash
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
-
|
|
179
|
-
-
|
|
180
|
-
-
|
|
181
|
-
-
|
|
182
|
-
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
zelari-code
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
1
|
+
# Zelari Code
|
|
2
|
+
|
|
3
|
+
```
|
|
4
|
+
-#%=
|
|
5
|
+
.*%%%@#:
|
|
6
|
+
=%%%%%%%@*
|
|
7
|
+
+%%%%%%%%%%#.
|
|
8
|
+
+%%%@@@@@@@%@#.
|
|
9
|
+
.*%@@@@@@@@@@@@@%-
|
|
10
|
+
.#%@@@@@@@@@@@@@@@@-
|
|
11
|
+
*%@@@@@@@@@@@@@@@@@%.
|
|
12
|
+
:@%%@@@@@@%:+%@@@@@%@=
|
|
13
|
+
=@%%@@@@@%.=-+%@%%@*
|
|
14
|
+
.=@@%@@@@%.*@*-+@@*.
|
|
15
|
+
-*%@@@@@@@@%.*@@@+:#@@#=.
|
|
16
|
+
*%%%%%%@@@@@@.*#%#=-:+@@@%
|
|
17
|
+
:@%%%%%%@@@@@@.:=.*:*@@@@@@=
|
|
18
|
+
*@%%@%%@@@@@@@*%@*:-:%@@@@@%.
|
|
19
|
+
:@@@%@@@@@@@@@@@@@@#%@@@@@@@@=
|
|
20
|
+
*%%%%%%%%%%%%%%%%%%%%%%%%%%%%#
|
|
21
|
+
|
|
22
|
+
Z E L A R I C O D E
|
|
23
|
+
N-THEM Studio
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
> AI Council coding agent CLI โ multi-agent orchestration with slash commands, provider-agnostic LLM streaming, and self-update.
|
|
27
|
+
|
|
28
|
+

|
|
29
|
+

|
|
30
|
+

|
|
31
|
+
|
|
32
|
+
๐ **[Guida completa all'uso (IT)](./docs/GUIDA.md)** โ installazione, TUI, comandi slash, council, skills, workspace, headless, MCP.
|
|
33
|
+
|
|
34
|
+
**Zelari Code** is a standalone CLI extracted from [AnathemaBrain](https://github.com/N-THEM-Studio/AnathemaBrain). It brings the multi-agent council (Caronte, Nettuno, Gerione, Plutone, Minosse, Lucifero) directly into your terminal with a rich TUI (Ink + React), slash command system, and provider-agnostic LLM streaming (OpenAI-compatible, xAI Grok with OAuth, GLM/Z.AI).
|
|
35
|
+
|
|
36
|
+
> **Upgrading from โค 0.4.x?** See [MIGRATION.md](./MIGRATION.md) โ the internal
|
|
37
|
+
> `src/main/core/`, `src/agents/`, `src/shared/`, `src/types/` paths no longer
|
|
38
|
+
> exist. The published core package is `@zelari/core` (MIT). 9 subpath exports.
|
|
39
|
+
|
|
40
|
+
## Install
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
npm install -g zelari-code
|
|
44
|
+
zelari-code
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Requires **Node.js โฅ 20**.
|
|
48
|
+
|
|
49
|
+
### `zelari-code: command not found` (Windows)
|
|
50
|
+
|
|
51
|
+
After `npm install -g`, the `zelari-code` command may not be on your `PATH`. Fix:
|
|
52
|
+
|
|
53
|
+
**PowerShell** (run as admin, then restart your terminal):
|
|
54
|
+
```powershell
|
|
55
|
+
$npmPrefix = npm config get prefix
|
|
56
|
+
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$npmPrefix", "User")
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
**Git Bash / WSL:**
|
|
60
|
+
```bash
|
|
61
|
+
echo 'export PATH="$(npm config get prefix):$PATH"' >> ~/.bashrc
|
|
62
|
+
source ~/.bashrc
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Verify the fix: `where zelari-code` (CMD) or `which zelari-code` (Bash) should print a path.
|
|
66
|
+
|
|
67
|
+
## First Run
|
|
68
|
+
|
|
69
|
+
The first time you run `zelari-code` (or whenever your provider config
|
|
70
|
+
is missing), the CLI launches a 5-step onboarding wizard instead of
|
|
71
|
+
the regular TUI:
|
|
72
|
+
|
|
73
|
+
```
|
|
74
|
+
โญโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฎ
|
|
75
|
+
โ zelari-code v0.6.0 โ first-time setup โ
|
|
76
|
+
โ 1/welcome 2/provider 3/model 4/apikey 5/...โ
|
|
77
|
+
โ โ
|
|
78
|
+
โ Welcome! Let's get you coding in under 2 min. โ
|
|
79
|
+
โ Press [Enter] to continue, [Q] to quit. โ
|
|
80
|
+
โฐโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโฏ
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
The wizard walks you through:
|
|
84
|
+
|
|
85
|
+
1. **Welcome** โ overview + how to quit.
|
|
86
|
+
2. **Provider** โ pick from `grok`, `minimax`, `glm`, `openai-compatible` (โ/โ + Enter).
|
|
87
|
+
3. **Model** โ type a model name or accept the default (Enter).
|
|
88
|
+
4. **API key** โ choose `env` (use `GROK_API_KEY` etc.), `keystore` (save locally), or `skip` (set later via `/login`).
|
|
89
|
+
5. **Confirm** โ review + Enter to commit.
|
|
90
|
+
|
|
91
|
+
When you press Enter on confirm, the wizard writes `~/.tmp/zelari-code/provider.json` (and `keys.json` if you chose keystore), shows a brief "โ Setup complete!" banner, **then transparently transitions into the regular TUI** โ no need to re-launch.
|
|
92
|
+
|
|
93
|
+
### Skipping / re-running
|
|
94
|
+
|
|
95
|
+
```bash
|
|
96
|
+
zelari-code --no-wizard # skip wizard even on first run
|
|
97
|
+
zelari-code --reset-config # force re-run wizard (clears provider.json)
|
|
98
|
+
ZELARI_NO_WIZARD=1 zelari-code # env equivalent of --no-wizard
|
|
99
|
+
zelari-code --version # print version + exit (no TUI)
|
|
100
|
+
zelari-code --help # print help + exit (no TUI)
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
The wizard re-runs automatically if `provider.json` is missing on the next launch.
|
|
104
|
+
|
|
105
|
+
## Quick Start
|
|
106
|
+
|
|
107
|
+
```bash
|
|
108
|
+
# Set your OpenAI-compatible API key (OpenAI, Together, Groq, custom endpoint, etc.)
|
|
109
|
+
export OPENAI_API_KEY=sk-...
|
|
110
|
+
|
|
111
|
+
# Or use Grok via OAuth (Device Authorization Grant โ RFC 8628)
|
|
112
|
+
zelari-code
|
|
113
|
+
# Inside the TUI: /login grok
|
|
114
|
+
# โ A code + verification URL appears; open the URL, enter the code, authorize.
|
|
115
|
+
|
|
116
|
+
# Or use GLM/Z.AI
|
|
117
|
+
export GLM_API_KEY=...
|
|
118
|
+
|
|
119
|
+
# Run zelari-code from any directory
|
|
120
|
+
zelari-code
|
|
121
|
+
```
|
|
122
|
+
|
|
123
|
+
## Slash Commands
|
|
124
|
+
|
|
125
|
+
Full reference: **[docs/GUIDA.md](./docs/GUIDA.md#comandi-slash)** (all flags, examples, skill IDs).
|
|
126
|
+
|
|
127
|
+
| Command | Description |
|
|
128
|
+
|---|---|
|
|
129
|
+
| `/help` | List all commands + loaded skills |
|
|
130
|
+
| `/exit` | Exit the CLI |
|
|
131
|
+
| `/login <provider> [key]` | Set API key; `/login grok` starts OAuth |
|
|
132
|
+
| `/provider`, `/provider <id>` | Show / switch LLM provider |
|
|
133
|
+
| `/provider custom <url>` | Self-hosted endpoint (Ollama, LM Studio, โฆ) |
|
|
134
|
+
| `/model <name>`, `/models` | Set model / list discovered models |
|
|
135
|
+
| `/skill <id> [input]` | Invoke a coding skill (23 built-in + SKILL.md) |
|
|
136
|
+
| `/skill-stats [id]` | Skill invocation stats |
|
|
137
|
+
| `/skill-compare <id1> <id2>` | Compare two skills' stats |
|
|
138
|
+
| `/council <input>` | Run the 6-member council pipeline |
|
|
139
|
+
| `/council-feedback <id> <1-5>` | Rate a council member |
|
|
140
|
+
| `/promote-member <id>` | Promote a council member to a skill |
|
|
141
|
+
| `/sessions`, `/resume <id>`, `/new` | Session management |
|
|
142
|
+
| `/branch <name>`, `/branches`, `/checkout <name>` | Session branches |
|
|
143
|
+
| `/compact`, `/clear` | Compact / clear transcript |
|
|
144
|
+
| `/diff [--staged]`, `/undo --yes` | Git diff / revert (destructive) |
|
|
145
|
+
| `/steer <text>`, `/steer --interrupt <text>` | Queue follow-up during a run |
|
|
146
|
+
| `/workspace โฆ` | `.zelari/` artifacts + `AGENTS.MD` |
|
|
147
|
+
| `/update`, `/update --yes` | Check / install CLI updates |
|
|
148
|
+
|
|
149
|
+
**TUI:** `shift+tab` toggles **agent** โ **council** mode for free-form prompts.
|
|
150
|
+
|
|
151
|
+
## Headless Mode
|
|
152
|
+
|
|
153
|
+
Run a single task without the TUI (CI/scripts):
|
|
154
|
+
|
|
155
|
+
```bash
|
|
156
|
+
zelari-code --headless --task "Explain src/cli/main.ts" --output plain
|
|
157
|
+
zelari-code --headless --task "Design a REST API" --council --output json
|
|
158
|
+
```
|
|
159
|
+
|
|
160
|
+
See **[docs/GUIDA.md](./docs/GUIDA.md#modalitร -headless-ciscript)** for exit codes and all flags.
|
|
161
|
+
|
|
162
|
+
## Self-Update
|
|
163
|
+
|
|
164
|
+
Zelari Code includes a built-in update mechanism:
|
|
165
|
+
|
|
166
|
+
```bash
|
|
167
|
+
# Inside the TUI:
|
|
168
|
+
/update # check for updates (prints current vs latest)
|
|
169
|
+
/update --yes # apply update (runs npm install -g zelari-code@latest)
|
|
170
|
+
```
|
|
171
|
+
|
|
172
|
+
On startup, the CLI silently checks the npm registry. If a newer version is available, it prints a one-line hint to stderr.
|
|
173
|
+
|
|
174
|
+
Disable auto-check: `ANATHEMA_DEV=1 zelari-code`
|
|
175
|
+
|
|
176
|
+
## Features
|
|
177
|
+
|
|
178
|
+
- ๐ค **Multi-agent council** โ 6 roles (Caronte, Nettuno, Gerione, Plutone, Minosse, Lucifero) with feedback loops and member promotion
|
|
179
|
+
- โงโฅ **Agent/council mode switch** โ `shift+tab` toggles free-form prompts between the single agent and the full council pipeline (mode shown in the status line)
|
|
180
|
+
- ๐จ **Rich TUI** โ Ink + React: native-scrollback chat stream, input bar with status line below it (mode ยท provider ยท model ยท session ยท cwd ยท execution timer)
|
|
181
|
+
- ๐๏ธ **Live git sidebar** โ right-hand panel with the N-THEM emblem and the working-tree changes (`+added`/`-removed` per file, refreshed every 4s; auto-hidden on narrow terminals)
|
|
182
|
+
- โฑ๏ธ **Execution timer** โ elapsed time of the in-flight turn in the status line (`โฑ 12s`), frozen as `last 34s` when the run completes
|
|
183
|
+
- ๐ง **Provider-agnostic** โ OpenAI-compatible APIs (OpenAI, Together, Groq, custom), xAI Grok with OAuth refresh, GLM/Z.AI
|
|
184
|
+
- ๐ ๏ธ **Built-in tools** โ filesystem (read/write/edit), shell (bash), search (grep), web fetch/search
|
|
185
|
+
- ๐ **23 coding skills** (+ user `SKILL.md` from `.zelari/skills/`, `.claude/skills/`, โฆ)
|
|
186
|
+
- ๐ **Cross-provider failover** โ automatic retry with provider swap on transient errors
|
|
187
|
+
- ๐ **Metrics + skill history** โ fire-and-forget logging to `~/.tmp/zelari-code/`
|
|
188
|
+
- ๐๏ธ **Session management** โ JSONL transcripts, resume across restarts, compaction
|
|
189
|
+
- ๐ฟ **Branch isolation** โ session snapshots per branch
|
|
190
|
+
- ๐ **MCP** โ external MCP servers via `.zelari/mcp.json`
|
|
191
|
+
- ๐ **Self-update** โ `/update` slash command + silent registry check on startup
|
|
192
|
+
|
|
193
|
+
## Architecture
|
|
194
|
+
|
|
195
|
+
```
|
|
196
|
+
zelari-code (CLI, proprietary)
|
|
197
|
+
โโโ src/cli/ # Ink TUI, provider config, workspace, wizard, MCP
|
|
198
|
+
โ โโโ components/ # ChatStream, InputBar, Sidebar, StatusBar, โฆ
|
|
199
|
+
โ โโโ slashHandlers/ # /provider, /workspace, /update, โฆ
|
|
200
|
+
โ โโโ workspace/ # .zelari/ persistence + AGENTS.MD curation
|
|
201
|
+
โโโ packages/core/ # @zelari/core (MIT, npm)
|
|
202
|
+
โโโ core/ # AgentHarness โ provider-neutral agent loop
|
|
203
|
+
โโโ agents/ # Council API, roles, 23 skills, tool schemas
|
|
204
|
+
โโโ harness/tools/ # Tool registry + filesystem/shell/search/web
|
|
205
|
+
โโโ events/ # BrainEvent contract
|
|
206
|
+
โโโ council/ # Run mode, tier banners
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
`AgentHarness` takes (model, provider, messages, tools) + a streaming function and yields `AsyncIterable<BrainEvent>`. The CLI subscribes and renders via `eventsToMessages()`. See [MIGRATION.md](./MIGRATION.md) for the v0.5+ package boundary.
|
|
210
|
+
|
|
211
|
+
## Environment Variables
|
|
212
|
+
|
|
213
|
+
| Variable | Description |
|
|
214
|
+
|---|---|
|
|
215
|
+
| `OPENAI_API_KEY` | OpenAI API key |
|
|
216
|
+
| `OPENAI_MODEL` | Default model (default: `grok-4`) |
|
|
217
|
+
| `OPENAI_BASE_URL` | Custom OpenAI-compatible endpoint |
|
|
218
|
+
| `GLM_API_KEY` | GLM/Z.AI API key |
|
|
219
|
+
| `GROK_API_KEY` | xAI Grok API key (alternative to OAuth) |
|
|
220
|
+
| `ANATHEMA_DEV=1` | Disable silent update check on startup |
|
|
221
|
+
| `ZELARI_NO_WIZARD=1` | Skip first-run wizard |
|
|
222
|
+
| `ZELARI_COUNCIL_TIER=lite` | Council with 3 members instead of 6 |
|
|
223
|
+
| `ZELARI_MCP=0` | Disable MCP servers |
|
|
224
|
+
| `ANATHEMA_FAILOVER=0` | Disable cross-provider failover |
|
|
225
|
+
|
|
226
|
+
See **[docs/GUIDA.md](./docs/GUIDA.md#variabili-dambiente)** for the full list.
|
|
227
|
+
|
|
228
|
+
## Council Workspace
|
|
229
|
+
|
|
230
|
+
The CLI persists council output (decisions, risks, docs, plan, reviews) into a **project-local** `.zelari/` directory and auto-curates an `AGENTS.MD` at the project root.
|
|
231
|
+
|
|
232
|
+
### Layout
|
|
233
|
+
|
|
234
|
+
```
|
|
235
|
+
.zelari/ # auto-gitignored, per-project
|
|
236
|
+
โโโ plan.md # phases / tasks / milestones (Markdown + YAML frontmatter)
|
|
237
|
+
โโโ risks.md # risk register (live, ordered by severity)
|
|
238
|
+
โโโ decisions/ # ADRs (Architecture Decision Records) โ 001-<slug>.md
|
|
239
|
+
โโโ reviews/ # Minosse verdict per council run
|
|
240
|
+
โโโ docs/ # doc drafts produced by the council
|
|
241
|
+
AGENTS.MD # committed at project root, auto-curated from .zelari/
|
|
242
|
+
```
|
|
243
|
+
|
|
244
|
+
### Slash commands
|
|
245
|
+
|
|
246
|
+
| Command | Effect |
|
|
247
|
+
| --- | --- |
|
|
248
|
+
| `/workspace` | List all artifacts + usage hint |
|
|
249
|
+
| `/workspace show plan` | Render `.zelari/plan.md` |
|
|
250
|
+
| `/workspace show decisions` | List all ADRs (id, status, title) |
|
|
251
|
+
| `/workspace show risks` | Render `.zelari/risks.md` |
|
|
252
|
+
| `/workspace show agents` | Render `AGENTS.MD` (project root) |
|
|
253
|
+
| `/workspace show docs` | List `.zelari/docs/` drafts |
|
|
254
|
+
| `/workspace sync` | Re-run AGENTS.MD auto-curation (idempotent โ no-op if unchanged) |
|
|
255
|
+
| `/workspace reset --yes` | Delete `.zelari/` (destructive โ requires confirmation) |
|
|
256
|
+
|
|
257
|
+
### AGENTS.MD format
|
|
258
|
+
|
|
259
|
+
`AGENTS.MD` is partitioned into:
|
|
260
|
+
|
|
261
|
+
1. **Manual blocks** (free-form, preserved verbatim across updates) โ write anything you want here.
|
|
262
|
+
2. **Auto-managed sections** delimited by `<!-- zelari:auto:start section="..." -->` / `<!-- zelari:auto:end -->` markers โ overwritten each sync.
|
|
263
|
+
|
|
264
|
+
Auto-managed sections:
|
|
265
|
+
- `tech-stack` โ languages, frameworks, build tools (derived from `package.json`)
|
|
266
|
+
- `decisions` โ accepted ADRs (newest first, capped)
|
|
267
|
+
- `conventions` โ code conventions observed in source tree
|
|
268
|
+
- `build` โ build/test/lint commands
|
|
269
|
+
- `open-questions` โ info-level risks + unsolved questions
|
|
270
|
+
|
|
271
|
+
Set `ZELARI_AGENTS_MD=0` to disable AGENTS.MD auto-curation.
|
|
272
|
+
|
|
273
|
+
### Storage layout internals
|
|
274
|
+
|
|
275
|
+
- Frontmatter: subset YAML (scalars, flow/sequence/block-sequence arrays, flow/block maps) โ no external deps.
|
|
276
|
+
- Concurrency: per-key mutex (filesystem writes are serialized per artifact).
|
|
277
|
+
- Idempotency: hash comparison โ AGENTS.MD write is skipped when no section changed (clean git diff).
|
|
278
|
+
|
|
279
|
+
See [`docs/plans/2026-07-01-council-workspace-cli-stubs.md`](./docs/plans/2026-07-01-council-workspace-cli-stubs.md) for the full schema.
|
|
280
|
+
|
|
281
|
+
## Documentation
|
|
282
|
+
|
|
283
|
+
| Doc | Description |
|
|
284
|
+
|---|---|
|
|
285
|
+
| [docs/GUIDA.md](./docs/GUIDA.md) | **Guida utente completa** (IT) |
|
|
286
|
+
| [docs/TOOLS.md](./docs/TOOLS.md) | Tool builtin, workspace, MCP |
|
|
287
|
+
| [MIGRATION.md](./MIGRATION.md) | Upgrade from โค 0.4.x |
|
|
288
|
+
| [docs/decisions/](./docs/decisions/) | ADRs (monorepo, npm publish, API policy) |
|
|
289
|
+
|
|
290
|
+
## Development
|
|
291
|
+
|
|
292
|
+
```bash
|
|
293
|
+
git clone https://github.com/N-THEM-Studio/zelari-code.git
|
|
294
|
+
cd zelari-code
|
|
295
|
+
npm install
|
|
296
|
+
npm run build:cli
|
|
297
|
+
npm link
|
|
298
|
+
zelari-code
|
|
299
|
+
```
|
|
300
|
+
|
|
301
|
+
### Run tests
|
|
302
|
+
|
|
303
|
+
```bash
|
|
304
|
+
npm test
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
### Typecheck
|
|
308
|
+
|
|
309
|
+
```bash
|
|
310
|
+
npm run typecheck
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
## Related Projects
|
|
314
|
+
|
|
315
|
+
- [AnathemaBrain](https://github.com/N-THEM-Studio/AnathemaBrain) โ the Electron desktop GUI that shares the agent runtime + council system with this CLI
|
|
316
|
+
- Zelari Coder originated as the `npm run coder` script inside AnathemaBrain
|
|
317
|
+
- [@zelari/core on npm](https://www.npmjs.com/package/@zelari/core) โ reusable agent runtime (MIT)
|
|
318
|
+
|
|
319
|
+
## License
|
|
320
|
+
|
|
296
321
|
Proprietary ยฉ 2026 [N-THEM Studio](https://github.com/N-THEM-Studio). See [LICENSE](./LICENSE).
|