vexi-cli 0.5.1 → 0.5.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 CHANGED
@@ -12,7 +12,7 @@
12
12
  **Open-source AI coding agent for your terminal.**
13
13
  Bring your own key · Zero config · Multilingual · 100% local
14
14
 
15
- [![npm](https://img.shields.io/npm/v/vexi?color=2979FF)](https://www.npmjs.com/package/vexi)
15
+ [![npm](https://img.shields.io/npm/v/vexi-cli?color=2979FF)](https://www.npmjs.com/package/vexi-cli)
16
16
  [![license](https://img.shields.io/badge/license-MIT-2979FF)](LICENSE)
17
17
  [![node](https://img.shields.io/badge/node-%E2%89%A518-2979FF)](package.json)
18
18
 
@@ -25,7 +25,7 @@ Bring your own key · Zero config · Multilingual · 100% local
25
25
  ## Install
26
26
 
27
27
  ```bash
28
- npm install -g vexi
28
+ npm install -g vexi-cli
29
29
  vexi
30
30
  ```
31
31
 
@@ -239,7 +239,7 @@ saving.
239
239
 
240
240
  | | Vexi | OpenCode | Claude Code | Cursor |
241
241
  | --- | --- | --- | --- | --- |
242
- | Install | `npm i -g vexi` | binary/script | `npm i -g` | desktop app |
242
+ | Install | `npm i -g vexi-cli` | binary/script | `npm i -g` | desktop app |
243
243
  | BYOK (any provider) | ✅ 5 providers, auto-detect | ✅ | ❌ Anthropic only | partial |
244
244
  | Works fully offline/local | ✅ no server, no account | ✅ | ❌ account | ❌ account |
245
245
  | Native-language code explanations | ✅ ar/es/pt/fr | ❌ | ❌ | ❌ |
@@ -292,19 +292,19 @@ To add support for a new key format, edit a single file: `src/providers/detect.t
292
292
 
293
293
  ## 🌍 العربية
294
294
 
295
- **Vexi** — وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر يعمل في الطرفية. ثبّته بأمر واحد (`npm install -g vexi`)، الصق مفتاح API الخاص بك مرة واحدة، وابدأ فورًا. لا تسجيل، لا خادم، كل شيء يعمل محليًا على جهازك. يشرح Vexi أي كود بالعربية الفصحى (`vexi explain auth.ts --ar`) في ملفات HTML تدعم الاتجاه من اليمين لليسار بشكل مثالي، ويتعلّم أسلوبك البرمجي الشخصي من جلساتك السابقة (`vexi learn`).
295
+ **Vexi** — وكيل برمجة بالذكاء الاصطناعي مفتوح المصدر يعمل في الطرفية. ثبّته بأمر واحد (`npm install -g vexi-cli`)، الصق مفتاح API الخاص بك مرة واحدة، وابدأ فورًا. لا تسجيل، لا خادم، كل شيء يعمل محليًا على جهازك. يشرح Vexi أي كود بالعربية الفصحى (`vexi explain auth.ts --ar`) في ملفات HTML تدعم الاتجاه من اليمين لليسار بشكل مثالي، ويتعلّم أسلوبك البرمجي الشخصي من جلساتك السابقة (`vexi learn`).
296
296
 
297
297
  ## 🌍 Español
298
298
 
299
- **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`), 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.
299
+ **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.
300
300
 
301
301
  ## 🌍 Português
302
302
 
303
- **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`), 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.
303
+ **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.
304
304
 
305
305
  ## 🌍 Français
306
306
 
307
- **Vexi** est un agent de codage IA open source qui vit dans votre terminal. Installez-le en une seule commande (`npm install -g vexi`), 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.
307
+ **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.
308
308
 
309
309
  ---
310
310
 
@@ -312,6 +312,6 @@ To add support for a new key format, edit a single file: `src/providers/detect.t
312
312
 
313
313
  **MIT License** · Made with ⚡ by the Vexi community
314
314
 
315
- `npm install -g vexi`
315
+ `npm install -g vexi-cli`
316
316
 
317
317
  </div>
package/dist/agent.js CHANGED
@@ -17,6 +17,7 @@
17
17
  import { basename } from 'node:path';
18
18
  import { platform } from 'node:os';
19
19
  import { input, select, confirm } from '@inquirer/prompts';
20
+ import * as nodeRl from 'node:readline';
20
21
  import ora from 'ora';
21
22
  import { loadConfig, saveConfig, CONFIG_PATH } from './config.js';
22
23
  import { createProvider, detectProvider, sanitizeKey, PROVIDER_INFO, ProviderError, } from './providers/index.js';
@@ -28,6 +29,56 @@ import { McpManager, parseToolCall } from './mcp/client.js';
28
29
  import { loadMcpConfig } from './mcp/config.js';
29
30
  import { ARABIC_RTL_NOTE, getStrings, t } from './i18n/index.js';
30
31
  import { accent, dim, err, ok, printBanner, printStatusLine, userPrompt, vexiLabel, warn } from './ui/index.js';
32
+ /**
33
+ * Read a user message with multi-line paste support.
34
+ * Creates a fresh readline interface per call so it never conflicts
35
+ * with inquirer's internal readline. Lines pasted together arrive
36
+ * within ms of each other; a 30 ms debounce collects them all.
37
+ */
38
+ function readMessage(prompt) {
39
+ return new Promise((resolve, reject) => {
40
+ // Inquirer may have paused stdin — resume before creating our interface.
41
+ process.stdin.resume();
42
+ const lines = [];
43
+ let settled = false;
44
+ let timer = null;
45
+ const iface = nodeRl.createInterface({
46
+ input: process.stdin,
47
+ output: process.stdout,
48
+ terminal: true,
49
+ });
50
+ const finish = () => {
51
+ if (settled)
52
+ return;
53
+ settled = true;
54
+ iface.removeListener('line', onLine);
55
+ iface.removeListener('close', onClose);
56
+ iface.close();
57
+ resolve(lines.join('\n'));
58
+ };
59
+ const onLine = (line) => {
60
+ lines.push(line);
61
+ if (timer)
62
+ clearTimeout(timer);
63
+ timer = setTimeout(finish, 30);
64
+ };
65
+ const onClose = () => {
66
+ if (!settled) {
67
+ settled = true;
68
+ iface.removeListener('line', onLine);
69
+ reject(Object.assign(new Error('stdin closed'), { name: 'ExitPromptError' }));
70
+ }
71
+ };
72
+ iface.on('SIGINT', () => {
73
+ settled = true;
74
+ iface.close();
75
+ reject(Object.assign(new Error('ExitPromptError'), { name: 'ExitPromptError' }));
76
+ });
77
+ iface.on('line', onLine);
78
+ iface.once('close', onClose);
79
+ process.stdout.write(prompt + ' ');
80
+ });
81
+ }
31
82
  export async function runAgent(opts) {
32
83
  const s = getStrings(opts.lang);
33
84
  printBanner(opts.version);
@@ -129,7 +180,7 @@ export async function runAgent(opts) {
129
180
  while (true) {
130
181
  let line;
131
182
  try {
132
- line = await input({ message: userPrompt, theme: { prefix: '' } });
183
+ line = await readMessage(userPrompt);
133
184
  }
134
185
  catch {
135
186
  // Ctrl+C / closed stdin
package/dist/cli.js CHANGED
@@ -32,7 +32,7 @@ import { createProvider, PROVIDER_INFO } from './providers/index.js';
32
32
  import { openInDefaultApp } from './utils/open.js';
33
33
  import { detectSystemLang, getStrings, normalizeLang, t, SUPPORTED_LANGS } from './i18n/index.js';
34
34
  import { accent, dim, err, ok } from './ui/index.js';
35
- export const VERSION = '0.5.0';
35
+ export const VERSION = '0.5.2';
36
36
  /** Resolve the active language: --lang flag > saved config > system locale. */
37
37
  async function resolveLang(flag) {
38
38
  if (flag) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vexi-cli",
3
- "version": "0.5.1",
3
+ "version": "0.5.3",
4
4
  "description": "Open-source AI coding agent for your terminal. Bring your own key, zero config, multilingual.",
5
5
  "type": "module",
6
6
  "bin": {