vexi-cli 0.8.0 → 0.9.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 CHANGED
@@ -89,7 +89,7 @@ On first run, paste any API key. Vexi **auto-detects the provider** from the key
89
89
 
90
90
  Your key is stored **locally** in `~/.vexi/config.json` with owner-only file permissions (`chmod 600`).
91
91
 
92
- ### 🆓 Start for free — no credit card needed
92
+ ### <img src="assets/icons/gift.svg" width="20" height="20" alt=""/> Start for free — no credit card needed
93
93
 
94
94
  **International:**
95
95
 
@@ -135,6 +135,8 @@ Vexi auto-detects your system language on first run.
135
135
  ```bash
136
136
  vexi # start a chat session in the current project
137
137
  vexi --lang es # start in Spanish
138
+ vexi -p "explain the auth flow" # one-shot, non-interactive (scripts/CI)
139
+ vexi -p "add a health endpoint" --yes # same, but auto-run any shell commands proposed
138
140
  vexi config # show config location + provider + model
139
141
  vexi config reset # delete the stored API key
140
142
  vexi skill list # show active skills
@@ -153,6 +155,10 @@ vexi undo # revert the last AI file edit
153
155
  vexi redo # re-apply a reverted edit
154
156
  vexi history # list recent AI file edits with timestamps
155
157
  vexi clean # clear old snapshots (.vexi/snapshots/)
158
+ vexi setup # configure any OpenAI-compatible endpoint by URL
159
+ vexi update # update Vexi to the latest version
160
+ vexi uninstall # uninstall Vexi (keeps ~/.vexi config)
161
+ vexi uninstall --purge # uninstall + delete ~/.vexi
156
162
  ```
157
163
 
158
164
  Inside the chat:
@@ -165,10 +171,12 @@ Inside the chat:
165
171
  /undo revert last AI file edit
166
172
  /redo re-apply last undone edit
167
173
  /history list recent AI file edits
174
+ /push stage, commit and push to git
175
+ /usage token & cost estimate for this session
168
176
  /exit quit
169
177
  ```
170
178
 
171
- ## ⚙️ Multi-language build support
179
+ ## <img src="assets/icons/settings.svg" width="22" height="22" alt=""/> Multi-language build support
172
180
 
173
181
  Vexi can build and run projects in **any language** — not just JavaScript. When the AI suggests commands, it wraps them in a shell block, Vexi asks for confirmation, then executes them automatically and feeds the output back to the AI.
174
182
 
@@ -184,7 +192,7 @@ Vexi can build and run projects in **any language** — not just JavaScript. Whe
184
192
 
185
193
  The project scanner automatically detects `.py`, `.java`, `.c`, `.cpp`, `.rs`, `.go` files and tells the AI what language your project uses before the first message.
186
194
 
187
- ## 🧠 Project memory — Context Compression Engine
195
+ ## <img src="assets/icons/brain-circuit.svg" width="22" height="22" alt=""/> Project memory — Context Compression Engine
188
196
 
189
197
  Most AI coding tools forget earlier decisions once the conversation gets long.
190
198
  Vexi doesn't delete old messages — it **compresses** them:
@@ -196,7 +204,7 @@ Vexi doesn't delete old messages — it **compresses** them:
196
204
  your decisions **across sessions**, even in large projects.
197
205
  - Inspect it anytime with `/memory`.
198
206
 
199
- ## 🗺️ Full project understanding
207
+ ## <img src="assets/icons/map.svg" width="22" height="22" alt=""/> Full project understanding
200
208
 
201
209
  On startup Vexi scans your whole project (not just the open file) and injects
202
210
  a compact map into every prompt: languages, frameworks, and architecture
@@ -206,7 +214,7 @@ Scanner safeguards: respects `.gitignore`, always skips `node_modules`,
206
214
  `.git`, `dist`, `build`, `coverage`, and ignores files larger than 500KB —
207
215
  so it never floods the context window.
208
216
 
209
- ## 🎯 Custom Skills
217
+ ## <img src="assets/icons/target.svg" width="22" height="22" alt=""/> Custom Skills
210
218
 
211
219
  Teach Vexi *your* conventions with plain markdown files in `.vexi/skills/`:
212
220
 
@@ -225,7 +233,7 @@ vexi skill add https://github.com/user/react-best-practices
225
233
  vexi skill add ./docs/conventions.md
226
234
  ```
227
235
 
228
- ## 🎬 Vexi Replay
236
+ ## <img src="assets/icons/clapperboard.svg" width="22" height="22" alt=""/> Vexi Replay
229
237
 
230
238
  Every chat session is automatically recorded to `.vexi/sessions/` (locally,
231
239
  nothing leaves your machine). Export any session as a **single standalone
@@ -242,7 +250,7 @@ and it ends with a session summary (duration, messages, model). An
242
250
  **Export video** button records the replay right in the browser
243
251
  (MediaRecorder — no ffmpeg, the CLI stays lightweight). Share it anywhere.
244
252
 
245
- ## 🌍 Explain code in your native language
253
+ ## <img src="assets/icons/languages.svg" width="22" height="22" alt=""/> Explain code in your native language
246
254
 
247
255
  > The first AI tool that explains any code in your native language.
248
256
 
@@ -257,7 +265,7 @@ numbers → how the pieces fit together. Latin-script languages stream
257
265
  directly in the terminal; Arabic is written to `.md` + `.html` (dir="rtl")
258
266
  and opened in your browser, where it renders perfectly.
259
267
 
260
- ## 🗺️ Visual code graph
268
+ ## <img src="assets/icons/network.svg" width="22" height="22" alt=""/> Visual code graph
261
269
 
262
270
  ```bash
263
271
  vexi graph --visual
@@ -269,7 +277,7 @@ search. Node heat shows how many files depend on each module, and clicking
269
277
  a node runs **impact analysis** — highlighting every file that breaks if
270
278
  you change it.
271
279
 
272
- ## 🔌 MCP support
280
+ ## <img src="assets/icons/plug.svg" width="22" height="22" alt=""/> MCP support
273
281
 
274
282
  **Vexi as MCP client** — connect external tools and the AI can call them
275
283
  mid-conversation (works with every provider, no function-calling API needed):
@@ -301,7 +309,7 @@ official `@modelcontextprotocol/sdk`:
301
309
  Vexi **complements** Claude Code instead of competing: its project memory
302
310
  becomes a shared memory layer usable by any agent.
303
311
 
304
- ## 🧠 Vexi Learn
312
+ ## <img src="assets/icons/graduation-cap.svg" width="22" height="22" alt=""/> Vexi Learn
305
313
 
306
314
  > The agent gets more *you* over time.
307
315
 
@@ -319,7 +327,39 @@ session, so you stop repeating yourself. Everything stays local — the only
319
327
  network call is to your own model provider, and you always preview before
320
328
  saving.
321
329
 
322
- ## ↩️ Undo / Redo instant rescue from any AI edit
330
+ ## <img src="assets/icons/link.svg" width="22" height="22" alt=""/> URL-based setup any OpenAI-compatible endpoint
331
+
332
+ ```bash
333
+ vexi setup
334
+ ```
335
+
336
+ Paste any API endpoint URL and Vexi auto-detects the provider, fetches available models, and lets you pick one — no manual config editing required. Works with:
337
+
338
+ - **Local models** — Ollama (`http://localhost:11434`), LM Studio, etc.
339
+ - **Custom proxies** — your own OpenAI-compatible gateway
340
+ - **Specialist providers** — Z.ai Coding Plan, Cloudflare Workers AI, and any `/v1/chat/completions`-compatible API
341
+
342
+ ```
343
+ ? Paste your endpoint URL › https://openrouter.ai/api/v1
344
+ Detected: OpenRouter
345
+ ? Paste your API key › sk-or-...
346
+ Fetching available models…
347
+ ? Choose a model › meta-llama/llama-3.3-70b-instruct:free
348
+ ✓ Saved — run `vexi` to start
349
+ ```
350
+
351
+ ## <img src="assets/icons/rocket.svg" width="22" height="22" alt=""/> Git push from chat — `/push`
352
+
353
+ Stage, commit and push without leaving the session. The AI drafts the commit message from your staged diff:
354
+
355
+ ```
356
+ /push # AI writes commit message, confirms, then pushes
357
+ /push --only # push current branch without a new commit
358
+ ```
359
+
360
+ Auth pre-flight runs before the real push so you get a clear error if credentials are missing, not a mid-push failure.
361
+
362
+ ## <img src="assets/icons/undo-2.svg" width="22" height="22" alt=""/> Undo / Redo — instant rescue from any AI edit
323
363
 
324
364
  > Approve a change, see it break things, type `vexi undo`. Done.
325
365
 
@@ -342,6 +382,35 @@ Or use the in-chat shortcuts without leaving the session: `/undo`, `/redo`, `/hi
342
382
 
343
383
  This pairs naturally with the confirmation prompt: even if you approve a change that turns out to be wrong, one command gets you back.
344
384
 
385
+ ## <img src="assets/icons/file-check.svg" width="22" height="22" alt=""/> Reliable file edits
386
+
387
+ Vexi edits files through structured tools — `read_file`, `write_file`, and
388
+ `edit_file` (exact `old` → `new` substring replacement) — instead of fragile
389
+ shell patching (`cat >`, `sed -i`). `edit_file` refuses a non-existent or
390
+ ambiguous match rather than corrupting the file, and every write is snapshotted
391
+ on the **exact** file about to change, so `/undo` is precise rather than
392
+ regex-guessed.
393
+
394
+ On providers that reliably support it (Anthropic, OpenAI, Groq, Gemini,
395
+ Mistral, Cerebras, DeepSeek, Qwen, Kimi, GLM, OpenRouter), the tools run over
396
+ **native function-calling**; everywhere else Vexi falls back to a
397
+ provider-agnostic text protocol, so the same capabilities work with every
398
+ provider.
399
+
400
+ ## <img src="assets/icons/coins.svg" width="22" height="22" alt=""/> Token & cost tracking
401
+
402
+ Vexi accumulates the real token usage reported by your provider and estimates
403
+ the dollar cost from a built-in price table:
404
+
405
+ ```
406
+ /usage → 12,340 tokens (8.1k in / 4.2k out) · ~$0.0187
407
+ ```
408
+
409
+ Check it anytime with `/usage`, and a one-line summary prints when you exit
410
+ (and to stderr in `-p` mode). Known free-tier models read as **$0**, and
411
+ unpriced models still show token counts. Since you bring your own key, the
412
+ `~` marks it as an estimate.
413
+
345
414
  ## Roadmap
346
415
 
347
416
  | Phase | Feature | Status |
@@ -353,21 +422,30 @@ This pairs naturally with the confirmation prompt: even if you approve a change
353
422
  | 5 | **Vexi Learn** — adapts to your personal coding style | ✅ done |
354
423
  | 6 | **Multi-language builds** — auto-executes pip, gcc, javac, cargo, gradle from chat | ✅ done |
355
424
  | 7 | **Undo / Redo** — instant one-command revert of any AI file edit, without touching git | ✅ done |
425
+ | 8 | **`/push`** — stage, AI-draft commit message, and push to git from chat | ✅ done |
426
+ | 9 | **`vexi setup`** — configure any OpenAI-compatible endpoint by pasting a URL | ✅ done |
427
+ | 10 | **Self-maintaining** — `vexi update`, `vexi uninstall`, daily update-check notice | ✅ done |
428
+ | 11 | **Reliable file edits** — structured read/write/edit tools with exact undo snapshots, native function-calling where the provider supports it | ✅ done |
429
+ | 12 | **Token & cost tracking** (`/usage`) · remote model-default manifest (defaults refresh without a release) | ✅ done |
356
430
 
357
431
  ## Why Vexi?
358
432
 
359
433
  | | Vexi | OpenCode | Claude Code | Cursor |
360
434
  | --- | --- | --- | --- | --- |
361
435
  | Install | `npm i -g vexi-cli` | binary/script | `npm i -g` | desktop app |
362
- | BYOK (any provider) | ✅ 12 providers incl. Chinese AI | ✅ | Anthropic only | partial |
363
- | Works fully offline/local | ✅ no server, no account | ✅ | ❌ account | ❌ account |
364
- | Native-language code explanations | ✅ ar/es/pt/fr | | | |
436
+ | BYOK (any provider) | ✅ 13 providers incl. Chinese AI + URL endpoints | ✅ | limited (defaults to Anthropic; Bedrock/Vertex/gateways possible) | partial |
437
+ | No server, no account | ✅ no server, no account | ✅ | ❌ account | ❌ account |
438
+ | Native-language code explanations (built-in) | ✅ ar/es/pt/fr | via model | via model | via model |
365
439
  | Session replay export | ✅ | ❌ | ❌ | ❌ |
366
440
  | Persistent project memory | ✅ | partial | partial | ✅ |
367
441
  | Learns your personal coding style | ✅ from your own sessions | ❌ | ❌ | partial |
368
- | MCP server mode (be a tool for other agents) | ✅ | ❌ | | ❌ |
369
- | Builds any language (Python, Java, C, Rust, Go) | ✅ | | ✅ | ✅ |
442
+ | MCP server mode (be a tool for other agents) | ✅ | ❌ | `claude mcp serve` | ❌ |
443
+ | Builds any language (Python, Java, C, Rust, Go) | ✅ | | ✅ | ✅ |
370
444
  | Instant undo/redo of AI edits (no git required) | ✅ per-file snapshots | ❌ | ❌ | ❌ |
445
+ | Git push from chat (AI commit message) | ✅ `/push` | ❌ | ✅ | partial |
446
+ | URL endpoint setup (Ollama, custom proxies) | ✅ `vexi setup` | ✅ | ❌ | ❌ |
447
+ | Structured file-edit tools + exact undo | ✅ read/write/edit + per-file snapshots | partial | ✅ | ✅ |
448
+ | Token & cost tracking (`/usage`) | ✅ per-session estimate | ❌ | ✅ | partial |
371
449
  | License | MIT | MIT | proprietary | proprietary |
372
450
 
373
451
  Vexi **complements** tools like Claude Code instead of competing: its project memory and multilingual explanations will be exposed over MCP so any agent can use them.
@@ -388,7 +466,10 @@ src/
388
466
  ├── cli.ts CLI definition (commander)
389
467
  ├── agent.ts chat loop + first-run onboarding
390
468
  ├── config.ts ~/.vexi/config.json (atomic, chmod 600)
391
- ├── providers/ key detection + streaming API clients
469
+ ├── version.ts dynamic VERSION from package.json
470
+ ├── endpoint.ts URL provider detection + model discovery (vexi setup)
471
+ ├── onboarding.ts interactive URL-based setup wizard
472
+ ├── providers/ key detection + streaming API clients (13 providers)
392
473
  ├── scanner/ project mapper (.gitignore-aware, size-capped)
393
474
  ├── memory/ Context Compression Engine (.vexi/memory.json)
394
475
  ├── skills/ custom skills loader (.vexi/skills/*.md)
@@ -398,6 +479,8 @@ src/
398
479
  ├── mcp/ MCP client (tools in chat) + server mode
399
480
  ├── learn/ Vexi Learn — style mining from your own sessions
400
481
  ├── snapshots/ undo/redo engine — per-file backups before AI edits
482
+ ├── git/ /push command — stage, AI commit message, push
483
+ ├── update/ vexi update / uninstall + daily update-check
401
484
  ├── i18n/ 5-language UI strings + RTL strategy
402
485
  ├── ui/ terminal branding (chalk, ora)
403
486
  └── utils/ atomic JSON writes, cross-platform open
@@ -412,19 +495,19 @@ To add support for a new key format, edit a single file: `src/providers/detect.t
412
495
 
413
496
  ---
414
497
 
415
- ## 🌍 العربية
498
+ ## <img src="assets/icons/globe.svg" width="22" height="22" alt=""/> العربية
416
499
 
417
500
  **Vexi** — وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر يعمل في الطرفية. ثبّته بأمر واحد (`npm install -g vexi-cli`)، الصق مفتاح API الخاص بك مرة واحدة، وابدأ فورًا. لا تسجيل، لا خادم، كل شيء يعمل محليًا على جهازك. يشرح Vexi أي كود بالعربية الفصحى (`vexi explain auth.ts --ar`) في ملفات HTML تدعم الاتجاه من اليمين لليسار بشكل مثالي، ويتعلّم أسلوبك البرمجي الشخصي من جلساتك السابقة (`vexi learn`).
418
501
 
419
- ## 🌍 Español
502
+ ## <img src="assets/icons/globe.svg" width="22" height="22" alt=""/> Español
420
503
 
421
504
  **Vexi** es un agente de programación con IA, de código abierto, que vive en tu terminal. Instálalo con un solo comando (`npm install -g vexi-cli`), pega tu clave API una vez y empieza al instante. Sin registro, sin servidor: todo se ejecuta localmente. Vexi detecta tu proveedor automáticamente y habla tu idioma.
422
505
 
423
- ## 🌍 Português
506
+ ## <img src="assets/icons/globe.svg" width="22" height="22" alt=""/> Português
424
507
 
425
508
  **Vexi** é um agente de programação com IA, de código aberto, que vive no seu terminal. Instale com um único comando (`npm install -g vexi-cli`), cole sua chave de API uma vez e comece imediatamente. Sem cadastro, sem servidor: tudo roda localmente. O Vexi detecta seu provedor automaticamente e fala o seu idioma.
426
509
 
427
- ## 🌍 Français
510
+ ## <img src="assets/icons/globe.svg" width="22" height="22" alt=""/> Français
428
511
 
429
512
  **Vexi** est un agent de codage IA open source qui vit dans votre terminal. Installez-le en une seule commande (`npm install -g vexi-cli`), collez votre clé API une fois et commencez immédiatement. Pas de compte, pas de serveur : tout s'exécute localement. Vexi détecte automatiquement votre fournisseur et parle votre langue.
430
513
 
@@ -432,7 +515,7 @@ To add support for a new key format, edit a single file: `src/providers/detect.t
432
515
 
433
516
  <div align="center">
434
517
 
435
- **MIT License** · Made with by the Vexi community
518
+ **MIT License** · Made with <img src="assets/icons/zap.svg" width="16" height="16" alt="" style="vertical-align:text-bottom"/> by the Vexi community
436
519
 
437
520
  `npm install -g vexi-cli`
438
521