arqzero 0.0.1 → 2.1.0-beta.1

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 CHANGED
@@ -1,17 +1,494 @@
1
- # arqzero
2
-
3
- > Placeholder release. The real CLI is coming.
4
-
5
- ArqZero is a terminal-native AI engineering agent with structured methodologies. Bring your own LLM key.
6
-
7
- This `0.0.1` is a **name reservation** the working CLI ships as part of the public beta.
8
-
9
- ## Get notified
10
-
11
- - **GitHub:** https://github.com/LuciferDono/ArqZero
12
- - **Site:** https://arqzero.dev (coming soon)
13
- - **Public beta:** `npm install -g arqzero@beta` (live once the gate opens)
14
-
15
- ## License
16
-
17
- Apache-2.0 © Pranav Jadhav
1
+ <picture>
2
+ <source media="(prefers-color-scheme: dark)" srcset=".github/logo-dark.svg">
3
+ <source media="(prefers-color-scheme: light)" srcset=".github/logo-light.svg">
4
+ <img alt="ArqZero" src=".github/logo-dark.svg" width="320">
5
+ </picture>
6
+
7
+ ### Terminal-native AI coding agent. Structured methodology. Any LLM.
8
+
9
+ <p>
10
+ <a href="https://www.npmjs.com/package/arqzero"><img src="https://img.shields.io/npm/v/arqzero?style=flat-square&color=00D4AA&label=npm" alt="npm" /></a>
11
+ <a href="https://github.com/LuciferDono/ArqZero/blob/master/LICENSE"><img src="https://img.shields.io/badge/license-Apache%202.0-blue?style=flat-square" alt="license" /></a>
12
+ <a href="https://nodejs.org"><img src="https://img.shields.io/badge/node-%3E%3D18.19-green?style=flat-square" alt="node" /></a>
13
+ <a href="https://github.com/LuciferDono/ArqZero/stargazers"><img src="https://img.shields.io/github/stars/LuciferDono/ArqZero?style=flat-square&color=FFD700" alt="stars" /></a>
14
+ <a href="https://github.com/LuciferDono/ArqZero/issues"><img src="https://img.shields.io/github/issues/LuciferDono/ArqZero?style=flat-square" alt="issues" /></a>
15
+ </p>
16
+
17
+ > **Your code stays local. Your keys stay yours. ArqZero just makes you faster.**
18
+
19
+ <a href="https://luciferdono.github.io/ArqZero/">
20
+ <img src=".github/terminal-demo.svg" alt="ArqZero terminal demo" width="100%">
21
+ </a>
22
+
23
+ ---
24
+
25
+ ## Install
26
+
27
+ ```bash
28
+ npm i -g arqzero
29
+ ```
30
+
31
+ <details>
32
+ <summary><strong>Other methods</strong></summary>
33
+
34
+ ```bash
35
+ # npx (no install)
36
+ npx arqzero
37
+
38
+ # From source
39
+ git clone https://github.com/LuciferDono/ArqZero.git
40
+ cd ArqZero && npm install && npm run dev
41
+ ```
42
+
43
+ </details>
44
+
45
+ ```bash
46
+ arqzero setup # Configure your LLM API key
47
+ arqzero # Start coding
48
+ ```
49
+
50
+ ---
51
+
52
+ ## Features
53
+
54
+ <table>
55
+ <tr>
56
+ <td width="60" align="center">
57
+ <img src="https://api.iconify.design/lucide/brain-circuit.svg?color=%2300D4AA" width="32" alt="" />
58
+ </td>
59
+ <td>
60
+
61
+ **42 Structured Capabilities**<br>
62
+ TDD, debugging, code review, planning, migration, incident response, security audit — each with 8-10 step imperative protocols. Not "chat about code." Real engineering methodology.
63
+
64
+ </td>
65
+ </tr>
66
+ <tr>
67
+ <td align="center">
68
+ <img src="https://api.iconify.design/lucide/shield-check.svg?color=%2300D4AA" width="32" alt="" />
69
+ </td>
70
+ <td>
71
+
72
+ **Verification Gates**<br>
73
+ Won't claim done until tests pass. Mandatory build check, lint, type check, test run, and security scan before every completion. Evidence before assertions.
74
+
75
+ </td>
76
+ </tr>
77
+ <tr>
78
+ <td align="center">
79
+ <img src="https://api.iconify.design/lucide/key.svg?color=%2300D4AA" width="32" alt="" />
80
+ </td>
81
+ <td>
82
+
83
+ **Bring Your Own Key**<br>
84
+ Fireworks, OpenAI, Together, Groq, Ollama — any OpenAI-compatible endpoint. Your keys, your models, your data. ArqZero never phones home with your code.
85
+
86
+ </td>
87
+ </tr>
88
+ <tr>
89
+ <td align="center">
90
+ <img src="https://api.iconify.design/lucide/wrench.svg?color=%2300D4AA" width="32" alt="" />
91
+ </td>
92
+ <td>
93
+
94
+ **18 Built-in Tools**<br>
95
+ *read*, *write*, *edit*, *multiedit*, *bash*, *glob*, *grep*, *ls*, *websearch*, *webfetch*, *dispatch*, *prompt*, *todo*, *notebookread*, *notebookedit*, *bashoutput*, *killshell*.
96
+
97
+ </td>
98
+ </tr>
99
+ <tr>
100
+ <td align="center">
101
+ <img src="https://api.iconify.design/lucide/network.svg?color=%2300D4AA" width="32" alt="" />
102
+ </td>
103
+ <td>
104
+
105
+ **Parallel Subagents**<br>
106
+ Dispatch up to 7 agents working simultaneously on independent sub-tasks. Auto model routing sends complex work to stronger models.
107
+
108
+ </td>
109
+ </tr>
110
+ <tr>
111
+ <td align="center">
112
+ <img src="https://api.iconify.design/lucide/database.svg?color=%2300D4AA" width="32" alt="" />
113
+ </td>
114
+ <td>
115
+
116
+ **Cross-Session Memory**<br>
117
+ Remembers your project, your patterns, your preferences across sessions. Learns from every interaction. Picks up exactly where you left off.
118
+
119
+ </td>
120
+ </tr>
121
+ <tr>
122
+ <td align="center">
123
+ <img src="https://api.iconify.design/lucide/puzzle.svg?color=%2300D4AA" width="32" alt="" />
124
+ </td>
125
+ <td>
126
+
127
+ **Plugin System**<br>
128
+ Extend with custom tools, commands, hooks, and capabilities. JSON manifest, auto-discovery, full event system with 11 hook types.
129
+
130
+ </td>
131
+ </tr>
132
+ <tr>
133
+ <td align="center">
134
+ <img src="https://api.iconify.design/lucide/terminal.svg?color=%2300D4AA" width="32" alt="" />
135
+ </td>
136
+ <td>
137
+
138
+ **Terminal-Native TUI**<br>
139
+ Full markdown rendering, syntax highlighting, shimmer spinner, responsive layout (adapts 80col → mobile), diff display with inline edits. Built with Ink.
140
+
141
+ </td>
142
+ </tr>
143
+ </table>
144
+
145
+ ---
146
+
147
+ ## How It Works
148
+
149
+ ```
150
+ ◆ arq › fix the auth bug and add tests for the login flow
151
+
152
+ Engaging debugging + security + tdd
153
+
154
+ ● Read src/auth/login.ts (67 lines) 0.2s
155
+ ● Grep "verifyToken" → 4 matches 0.1s
156
+ ● Edit src/auth/login.ts
157
+ ⎿ + const token = await verifyJWT(req.cookies.session);
158
+ ⎿ - const token = req.headers.authorization;
159
+ ● Write src/auth/login.test.ts (new, 48 lines)
160
+ ● Bash npm test 2.1s
161
+ ⎿ 67 passing, 0 failing
162
+ ● Verification gate passed — tests green, no regressions
163
+
164
+ Fixed JWT validation in login — was using raw header instead of
165
+ signed cookie. Added 6 tests covering happy path, expired token,
166
+ and missing session. All 67 tests green.
167
+ ```
168
+
169
+ ArqZero doesn't just edit files. It **reads** the codebase, **identifies** the root cause, **fixes** the code, **writes** tests, **runs** them, and **verifies** everything passes — all in one turn.
170
+
171
+ ---
172
+
173
+ ## Providers
174
+
175
+ Bring your own key. ArqZero ships first-class adapters for 11 providers plus a `custom` slot for any OpenAI-compatible endpoint.
176
+
177
+ | Provider | Default Model | Env Var | Notes |
178
+ |----------|---------------|---------|-------|
179
+ | **Fireworks AI** | `accounts/fireworks/models/glm-4p7` | `FIREWORKS_API_KEY` | Default. Fast inference for GLM, DeepSeek, Qwen, Llama. |
180
+ | OpenAI | `gpt-4o` | `OPENAI_API_KEY` | GPT-4o, GPT-4 Turbo, o1 reasoning. |
181
+ | **Anthropic** | `claude-sonnet-4-6` | `ANTHROPIC_API_KEY` | Claude Opus/Sonnet/Haiku — native Messages API adapter. |
182
+ | Groq | `llama-3.3-70b-versatile` | `GROQ_API_KEY` | LPU inference, sub-second latency. |
183
+ | Together AI | `meta-llama/Llama-3.3-70B-Instruct-Turbo` | `TOGETHER_API_KEY` | Hosted open-source models. |
184
+ | DeepSeek | `deepseek-chat` | `DEEPSEEK_API_KEY` | DeepSeek-V3 + R1 reasoning. |
185
+ | xAI | `grok-2-latest` | `XAI_API_KEY` | Grok models. |
186
+ | Google Gemini | `gemini-2.0-flash` | `GEMINI_API_KEY` | Gemini 2.0/1.5 via OpenAI-compat endpoint. |
187
+ | Mistral AI | `mistral-large-latest` | `MISTRAL_API_KEY` | Mistral Large, Codestral, Mixtral. |
188
+ | Ollama | `llama3.3` | — | Fully local, no key required. |
189
+ | **OpenRouter** | `anthropic/claude-sonnet-4` | `OPENROUTER_API_KEY` | Unified gateway to 100+ models. **Multi-key fallback chain supported.** |
190
+ | Custom | (you specify) | `CUSTOM_API_KEY` | Any OpenAI-compatible endpoint. |
191
+
192
+ ### Switching providers
193
+
194
+ Inside ArqZero:
195
+
196
+ ```
197
+ /provider # list providers and current state
198
+ /provider set openai sk-... # store a key and switch active provider
199
+ /provider anthropic # switch (key already configured)
200
+ /provider remove groq # delete stored keys
201
+ ```
202
+
203
+ Changes save to `~/.arqzero/config.json` immediately. Restart ArqZero to pick up the new provider — no mid-session hot-swap, by design (keeps token counters and model routing consistent).
204
+
205
+ ### OpenRouter multi-key fallback
206
+
207
+ OpenRouter is the only provider that accepts a chain of keys. If key 1 fails with `401/402/403/429/5xx` or a network error, ArqZero rotates to key 2, then key 3, and so on — automatically and without losing your turn.
208
+
209
+ ```
210
+ /provider set openrouter sk-or-primary
211
+ /provider add openrouter sk-or-backup-1
212
+ /provider add openrouter sk-or-backup-2
213
+ ```
214
+
215
+ Or via env: `OPENROUTER_API_KEY="sk-1,sk-2,sk-3"` (comma-delimited).
216
+
217
+ Bad-request errors (`400` / `404`) **do not** trigger rotation — those indicate a config problem (wrong model id, malformed payload) where retrying with another key would just waste credits.
218
+
219
+ ---
220
+
221
+ ## Tools
222
+
223
+ <details>
224
+ <summary><strong>18 tools</strong> — click to expand</summary>
225
+
226
+ | Tool | What it does |
227
+ |------|-------------|
228
+ | *read* | Read files with line numbers |
229
+ | *write* | Create or overwrite files |
230
+ | *edit* | Surgical string replacement |
231
+ | *multiedit* | Batch edits across multiple files |
232
+ | *bash* | Execute shell commands |
233
+ | *bashoutput* | Read output from background processes |
234
+ | *killshell* | Stop running processes |
235
+ | *glob* | Fast file pattern matching |
236
+ | *grep* | Regex content search |
237
+ | *ls* | Directory listing |
238
+ | *websearch* | Search the web |
239
+ | *webfetch* | Fetch URL content |
240
+ | *prompt* | Ask the user a question |
241
+ | *dispatch* | Launch parallel subagents (up to 7) |
242
+ | *todowrite* | Track task progress |
243
+ | *todoread* | Read current task list |
244
+ | *notebookread* | Read Jupyter notebooks |
245
+ | *notebookedit* | Edit notebook cells |
246
+
247
+ </details>
248
+
249
+ ## Commands
250
+
251
+ 25 slash commands. Type `/` to browse, or `/help` for details.
252
+
253
+ <details>
254
+ <summary><strong>Full command list</strong></summary>
255
+
256
+ | Command | What it does |
257
+ |---------|-------------|
258
+ | `/help` | Show help and available commands |
259
+ | `/model` | Switch LLM model |
260
+ | `/clear` | Clear conversation history |
261
+ | `/compress` | Compact context to save tokens |
262
+ | `/config` | View/edit configuration |
263
+ | `/quit` | Exit ArqZero |
264
+ | `/skill` | Manage and invoke skills |
265
+ | `/memory` | View cross-session memory |
266
+ | `/undo` | Restore files from checkpoint |
267
+ | `/context` | Switch context mode (dev/research/review) |
268
+ | `/cost` | Show token usage and cost |
269
+ | `/think` | Deep reasoning mode |
270
+ | `/permissions` | Manage tool permissions |
271
+ | `/tools` | List available tools |
272
+ | `/status` | Show session status |
273
+ | `/export` | Export conversation |
274
+ | `/check` | Run verification checks |
275
+ | `/setup` | First-run configuration |
276
+ | `/agents` | Show running subagents |
277
+ | `/loop` | Autonomous loop mode |
278
+ | `/vim` | Vim keybindings |
279
+ | `/reload-plugins` | Reload plugins |
280
+ | `/plugin` | Plugin management |
281
+
282
+ </details>
283
+
284
+ ## Capabilities
285
+
286
+ ArqZero matches your task against 42 structured capabilities — each one a multi-step engineering protocol, not a vague prompt.
287
+
288
+ <details>
289
+ <summary><strong>All 42 capabilities</strong></summary>
290
+
291
+ **Methodology:** TDD, debugging, code review, refactoring, planning, incident response, migration, performance optimization
292
+
293
+ **Architecture:** backend patterns, frontend patterns, API design, database design, microservices, event-driven, serverless
294
+
295
+ **Domain:** authentication, payments, search, real-time, file processing, email, notifications
296
+
297
+ **Guardrail:** security review, accessibility, i18n, error handling, logging, monitoring
298
+
299
+ **Orchestration:** subagent dispatch, parallel execution, model routing, context management
300
+
301
+ **Tool:** custom tool creation, tool composition, tool chaining
302
+
303
+ Each capability has:
304
+ - 8-10 step imperative protocol
305
+ - Verification gate (won't complete without evidence)
306
+ - Dependency chain (auto-loads related capabilities)
307
+ - Dispatch hints (knows when to parallelize)
308
+
309
+ </details>
310
+
311
+ ---
312
+
313
+ ## Architecture
314
+
315
+ ```
316
+ ┌─────────────────────────────────────────────────────┐
317
+ │ CLI / TUI │
318
+ │ Ink (React) • Markdown • Syntax Highlighting │
319
+ ├─────────────────────────────────────────────────────┤
320
+ │ Conversation Engine │
321
+ │ Agentic loop • Tool dispatch • Streaming │
322
+ ├────────────┬────────────┬───────────────────────────┤
323
+ │ Capability │ Tools │ Subagents │
324
+ │ Registry │ (18) │ (up to 7 parallel) │
325
+ │ Matcher │ Executor │ Dispatch + merge │
326
+ │ Injector │ Path guard│ Model routing │
327
+ ├────────────┴────────────┴───────────────────────────┤
328
+ │ Provider Layer │
329
+ │ Fireworks • OpenAI • Together • Groq • Ollama │
330
+ ├─────────────────────────────────────────────────────┤
331
+ │ Hooks (11 types) │ Plugins │ Memory │ Checkpoints │
332
+ └─────────────────────────────────────────────────────┘
333
+ ```
334
+
335
+ ---
336
+
337
+ ## Headless Mode
338
+
339
+ Run ArqZero in scripts, CI/CD, or automation:
340
+
341
+ ```bash
342
+ # Single prompt
343
+ arqzero -p "add input validation to all API routes"
344
+
345
+ # JSON output for piping
346
+ arqzero -p "list all TODO comments" --output-format json
347
+
348
+ # Auto-approve all tool calls
349
+ arqzero -p "fix the failing tests" --auto-approve
350
+ ```
351
+
352
+ ---
353
+
354
+ ## Pricing
355
+
356
+ | | **Free** | **Pro** | **Team** |
357
+ |---|---|---|---|
358
+ | **Price** | $0 | $15/mo | $30/user/mo |
359
+ | **Tools** | 9 | 18 | 18 |
360
+ | **Capabilities** | 10 | 42 | 42 |
361
+ | **Messages** | 50/day | Unlimited | Unlimited |
362
+ | **Subagents** | — | Up to 7 | Up to 7 |
363
+ | **Memory** | — | Cross-session | Cross-session + team shared |
364
+ | **Verification gates** | — | Yes | Yes |
365
+ | **Plugins & hooks** | — | Yes | Yes |
366
+ | **Model routing** | — | Auto | Auto |
367
+ | **Account required** | No | Yes | Yes |
368
+
369
+ You bring your own LLM API key. ArqZero never sees your code or API keys.
370
+
371
+ ---
372
+
373
+ ## vs. Others
374
+
375
+ | | ArqZero | Claude Code | Cursor | Aider | OpenCode |
376
+ |---|---|---|---|---|---|
377
+ | **Open source** | Apache 2.0 | Source-available | Closed | Apache 2.0 | MIT |
378
+ | **Any LLM provider** | Yes (BYOK) | Anthropic only | OpenAI/Anthropic | Yes | Yes |
379
+ | **Structured methodology** | 42 capabilities | No | No | No | No |
380
+ | **Verification gates** | Mandatory | No | No | No | No |
381
+ | **Parallel subagents** | Up to 7 | Yes | No | No | 3 |
382
+ | **Plugin system** | Yes (hooks, commands, tools) | Yes | Extensions | No | Yes |
383
+ | **Cross-session memory** | Yes | Yes | No | Yes | No |
384
+ | **Terminal native** | Yes | Yes | IDE | Yes | Yes |
385
+ | **Price (tool itself)** | Free core | $20/mo+ | $20/mo | Free | Free |
386
+
387
+ ---
388
+
389
+ ## Configuration
390
+
391
+ ```bash
392
+ arqzero setup # Interactive first-run wizard
393
+ ```
394
+
395
+ Or edit `~/.arqzero/config.json` directly:
396
+
397
+ ```json
398
+ {
399
+ "fireworksApiKey": "fw_...",
400
+ "defaultModel": "accounts/fireworks/models/glm-4p7",
401
+ "theme": "dark",
402
+ "autoApprove": false
403
+ }
404
+ ```
405
+
406
+ Environment variables override config:
407
+
408
+ ```bash
409
+ export ARQZERO_FIREWORKS_API_KEY="fw_..."
410
+ export ARQZERO_DEFAULT_MODEL="accounts/fireworks/models/glm-5"
411
+ ```
412
+
413
+ ---
414
+
415
+ ## FAQ
416
+
417
+ <details>
418
+ <summary><strong>How is this different from Claude Code?</strong></summary>
419
+
420
+ - **Any LLM** — not locked to Anthropic. Use Fireworks, OpenAI, Ollama, whatever.
421
+ - **Structured methodology** — 42 capabilities with step-by-step protocols, not freeform chat.
422
+ - **Verification gates** — won't claim done without tests passing. Claude Code lets you ship broken code.
423
+ - **BYOK** — your API key goes directly to your provider. ArqZero never proxies your requests.
424
+ - **Open source** — Apache 2.0. Fork it, extend it, self-host it.
425
+
426
+ </details>
427
+
428
+ <details>
429
+ <summary><strong>How is this different from Aider?</strong></summary>
430
+
431
+ - **TUI** — full terminal UI with markdown rendering, syntax highlighting, and responsive layout. Aider is plain text.
432
+ - **Subagents** — dispatch up to 7 parallel agents. Aider is single-threaded.
433
+ - **Capabilities** — 42 structured engineering protocols, not just "edit files."
434
+ - **Plugins** — extensible with hooks, commands, and custom tools.
435
+ - **Memory** — learns across sessions. Aider starts fresh every time.
436
+
437
+ </details>
438
+
439
+ <details>
440
+ <summary><strong>How is this different from OpenCode?</strong></summary>
441
+
442
+ - **Methodology** — ArqZero doesn't just give you tools, it gives you engineering discipline. 42 capabilities with verification gates.
443
+ - **Subagents** — up to 7 parallel vs OpenCode's 3.
444
+ - **Capability matching** — auto-detects your task type and injects the right methodology (TDD, debugging, migration, etc.)
445
+ - **Checkpoints** — auto-captures state before every edit. `/undo` to restore. OpenCode doesn't.
446
+
447
+ </details>
448
+
449
+ <details>
450
+ <summary><strong>Is my code sent to ArqZero servers?</strong></summary>
451
+
452
+ **No.** ArqZero is BYOK (Bring Your Own Key). Your API key goes directly to your chosen LLM provider (Fireworks, OpenAI, etc.). ArqZero never sees your code, your prompts, or your API keys. The only server communication is for license verification (Pro/Team tiers), which sends zero code.
453
+
454
+ </details>
455
+
456
+ <details>
457
+ <summary><strong>Can I use it offline?</strong></summary>
458
+
459
+ Yes, with a local provider like Ollama. Point ArqZero at `http://localhost:11434/v1` and everything runs on your machine. Pro features work offline for up to 7 days with cached license.
460
+
461
+ </details>
462
+
463
+ ---
464
+
465
+ ## Contributing
466
+
467
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for development setup and guidelines.
468
+
469
+ ```bash
470
+ git clone https://github.com/LuciferDono/ArqZero.git
471
+ cd ArqZero && npm install
472
+ npm run dev # Start dev mode
473
+ npx tsx --test src/ # Run 747 tests
474
+ ```
475
+
476
+ ## Security
477
+
478
+ Found a vulnerability? See [SECURITY.md](SECURITY.md). Please report responsibly — do not open a public issue.
479
+
480
+ ## Community
481
+
482
+ - [GitHub Issues](https://github.com/LuciferDono/ArqZero/issues) — bugs and feature requests
483
+ - [GitHub Discussions](https://github.com/LuciferDono/ArqZero/discussions) — questions and ideas
484
+ - [Website](https://luciferdono.github.io/ArqZero/) — docs, pricing, blog
485
+
486
+ ## License
487
+
488
+ [Apache License 2.0](LICENSE) — use it, fork it, build on it.
489
+
490
+ ---
491
+
492
+ <p align="center">
493
+ <sub>Built by <a href="https://github.com/LuciferDono">prana</a> — because coding agents should follow engineering discipline, not just autocomplete.</sub>
494
+ </p>