nex-code 0.3.11 → 0.3.14

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.
Files changed (3) hide show
  1. package/README.md +71 -19
  2. package/dist/nex-code.js +237 -213
  3. package/package.json +23 -7
package/README.md CHANGED
@@ -8,14 +8,18 @@
8
8
  ```
9
9
 
10
10
  <p align="center">
11
- <b>Agentic coding CLI — open-source and multi-provider.</b><br>
12
- Use OpenAI, Anthropic, Google Gemini, Ollama Cloud, or local models. Your choice.
11
+ <b>The open-source coding CLI for Ollama Cloud — and every other provider.</b><br>
12
+ Free by default with Ollama. Switch to OpenAI, Anthropic, or Gemini anytime.<br>
13
+ A lightweight, powerful alternative to Claude Code and Gemini CLI.
13
14
  </p>
14
15
 
15
16
  <p align="center">
16
17
  <a href="https://www.npmjs.com/package/nex-code"><img src="https://img.shields.io/npm/v/nex-code.svg" alt="npm version"></a>
18
+ <a href="https://www.npmjs.com/package/nex-code"><img src="https://img.shields.io/npm/dm/nex-code.svg" alt="npm downloads"></a>
19
+ <a href="https://github.com/hybridpicker/nex-code/stargazers"><img src="https://img.shields.io/github/stars/hybridpicker/nex-code.svg" alt="GitHub Stars"></a>
17
20
  <a href="https://github.com/hybridpicker/nex-code/actions/workflows/ci.yml"><img src="https://github.com/hybridpicker/nex-code/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
18
21
  <a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg" alt="License: MIT"></a>
22
+ <img src="https://img.shields.io/badge/Ollama_Cloud-supported-brightgreen.svg" alt="Ollama Cloud: supported">
19
23
  <img src="https://img.shields.io/badge/node-%3E%3D18-brightgreen.svg" alt="Node >= 18">
20
24
  <img src="https://img.shields.io/badge/dependencies-2-green.svg" alt="Dependencies: 2">
21
25
  <img src="https://img.shields.io/badge/tests-1752-blue.svg" alt="Tests: 1752">
@@ -64,15 +68,37 @@ npm update -g nex-code
64
68
 
65
69
  ## Why nex-code?
66
70
 
67
- | | nex-code | aider | Cursor |
68
- |---|---|---|---|
69
- | **Open-source** | MIT | Apache 2.0 | Proprietary |
70
- | **Multi-provider** | 5 providers, swap at runtime | Multi-provider | Multi-provider |
71
- | **Free local models** | Ollama (no API key) | Ollama | |
72
- | **Runtime dependencies** | 2 (axios, dotenv) | Heavy | Electron |
73
- | **Test coverage** | 1752 tests, 85% coverage | | |
74
- | **Tool tiers** | Auto-adapts tools per model | Fixed | Fixed |
75
- | **No lock-in** | `/model openai:gpt-4o` `/model local:llama3` | Config change | Config change |
71
+ | | **nex-code** | Claude Code | Gemini CLI | Aider |
72
+ |---|---|---|---|---|
73
+ | **Free with Ollama** | Native, first-class | ⚠️ Workaround | | ✅ |
74
+ | **Ollama Cloud support** | 47+ models, native | ⚠️ API-compat only | | |
75
+ | **Multi-provider runtime swap** | 5 providers, no restart | ❌ Claude-only | Gemini-only | |
76
+ | **Tool tiers (adapts to model)** | essential/standard/full | | | |
77
+ | **5-layer open-model auto-fix** | | | | ⚠️ |
78
+ | **Undo / Redo** | | | | |
79
+ | **Cost tracking + budgets** | | | | |
80
+ | **Pre-push secret detection** | ✅ | ❌ | ❌ | ❌ |
81
+ | **Open-source** | ✅ MIT | ❌ | ✅ Apache 2.0 | ✅ |
82
+ | **Runtime dependencies** | **2** (axios, dotenv) | Many | Many | Heavy (Python) |
83
+ | **Startup time** | **~100ms** | ~400ms | ~300ms | Slow |
84
+ | **Test coverage** | 1752 tests, 85% | — | — | — |
85
+
86
+ ---
87
+
88
+ ## Ollama Cloud — The Free-by-Default Model Tier
89
+
90
+ nex-code was built with Ollama Cloud as its primary provider. No subscription, no billing surprises.
91
+ Use powerful open models like **Qwen3 Coder**, **Kimi K2.5**, **Devstral**, and **DeepSeek R1** for free.
92
+
93
+ | Model | Context | Best For |
94
+ |---|---|---|
95
+ | `qwen3-coder:480b` | 131K | Code generation, tool calling |
96
+ | `kimi-k2.5` | 256K | Large repos, reasoning |
97
+ | `devstral-2:123b` | 131K | Reliable tool calling |
98
+ | `devstral-small-2:24b` | 131K | Fast, efficient |
99
+ | `qwen3.5:35b-a3b` | 256K | MoE, very fast |
100
+
101
+ Switch anytime: `/model ollama:qwen3-coder:480b` or add your `OLLAMA_API_KEY` to `.env`.
76
102
 
77
103
  ---
78
104
 
@@ -188,6 +214,13 @@ nex-code -yolo
188
214
 
189
215
  The agent decides autonomously whether to use tools or just respond with text. Simple questions get direct answers. Coding tasks trigger the agentic tool loop.
190
216
 
217
+ **Vision / Screenshot → Code** — drop an image path anywhere in your message and nex-code will send it to a vision-capable model automatically:
218
+ ```
219
+ > /path/to/screenshot.png implement this UI in React
220
+ > describe the layout in mockup.png and generate the CSS
221
+ ```
222
+ Supported formats: PNG, JPG, GIF, WebP, BMP. Works with Anthropic, OpenAI, Gemini, and Ollama vision models (llava, qwen2-vl, etc.).
223
+
191
224
  ### YOLO Mode
192
225
 
193
226
  Skip all confirmation prompts — file changes, dangerous commands, and tool permissions are auto-approved. The banner shows a `⚡ YOLO` indicator. Toggle at runtime with `/autoconfirm`.
@@ -260,6 +293,7 @@ Type `/` to see inline suggestions as you type. Tab completion is supported for
260
293
  | `/undo` | Undo last file change |
261
294
  | `/redo` | Redo last undone change |
262
295
  | `/history` | Show file change history |
296
+ | `/review [file]` | Code review on current diff or a specific file |
263
297
  | `/exit` | Quit |
264
298
 
265
299
  ---
@@ -288,6 +322,8 @@ The agent has 17 built-in tools:
288
322
  | `task_list` | Create and manage task lists for multi-step operations |
289
323
  | `spawn_agents` | Run parallel sub-agents with auto model routing |
290
324
 
325
+ **Interactive commands** (vim, top, htop, ssh, tmux, fzf, etc.) are automatically detected and spawned with full TTY passthrough — no separate handling required.
326
+
291
327
  Additional tools can be added via [MCP servers](#mcp) or [Skills](#skills).
292
328
 
293
329
  ---
@@ -328,11 +364,12 @@ Automatic bracketed paste mode: pasting multi-line text into the prompt is detec
328
364
 
329
365
  ### Ctrl+C Cancellation
330
366
  Pressing Ctrl+C during a running request immediately cancels the active HTTP stream and returns to the prompt:
331
- - An `AbortController` signal flows from the SIGINT handler through the agent loop to the provider's HTTP request
367
+ - An `AbortController` signal flows from the readline SIGINT handler through the agent loop to the provider's HTTP request
332
368
  - All providers (Ollama, OpenAI, Anthropic, Gemini, local) destroy the response stream on abort
333
369
  - No EPIPE errors after cancellation (stdout writes are EPIPE-guarded)
334
- - 2x Ctrl+C during processing force-exits the process
370
+ - During processing: first Ctrl+C aborts the task and returns to prompt; second Ctrl+C force-exits
335
371
  - At the idle prompt: first Ctrl+C shows `(Press Ctrl+C again to exit)`, second Ctrl+C exits (hint resets after 2 s)
372
+ - readline intercepts Ctrl+C on TTY (`rl.on('SIGINT')`) to prevent readline close → `process.exit(0)` race
336
373
 
337
374
  ### Diff Preview
338
375
  Every file change is shown in a diff-style format before being applied:
@@ -384,13 +421,14 @@ Persistent project memory that survives across sessions:
384
421
  Also loads `NEX.md` from project root for project-level instructions.
385
422
 
386
423
  ### Plan Mode
387
- Analyze before executing — the agent creates a plan, you review and approve:
424
+ Analyze before executing — the agent explores the codebase with read-only tools, produces a structured plan, then you approve before any changes are made:
388
425
  ```
389
- /plan refactor the auth module
390
- /plan status
391
- /plan approve
392
- /auto semi-auto # set autonomy level
426
+ /plan refactor the auth module # enter plan mode
427
+ /plan status # show plan progress
428
+ /plan approve # approve and exit plan mode (all tools re-enabled)
429
+ /auto semi-auto # set autonomy level
393
430
  ```
431
+ Plan mode is **hard-enforced**: only read-only tools (`read_file`, `list_directory`, `search_files`, `glob`, `grep`, `web_search`, `web_fetch`, `git_status`, `git_diff`, `git_log`, `git_show`, `ask_user`) are available. Any attempt to call a write tool is blocked at the API level — the LLM cannot make changes even if it tries. The plan text is saved to `.nex/plans/current-plan.md` for review.
394
432
 
395
433
  ### Undo / Redo
396
434
  In-session undo/redo for all file changes (write, edit, patch):
@@ -515,10 +553,13 @@ Models are auto-classified, or override per-model in `.nex/config.json`:
515
553
  "deepseek-r1": "essential",
516
554
  "local:*": "essential",
517
555
  "qwen3-coder": "full"
518
- }
556
+ },
557
+ "maxIterations": 100
519
558
  }
520
559
  ```
521
560
 
561
+ `maxIterations` sets the agentic loop limit project-wide (default: 50). The `--max-turns <n>` CLI flag overrides it per run.
562
+
522
563
  Tiers are also used by sub-agent routing — when a sub-agent auto-selects a model, its tool set is filtered to match that model's tier.
523
564
 
524
565
  ---
@@ -767,6 +808,17 @@ npm install -g nex-code # global install
767
808
  npx nex-code # or run without installing
768
809
  ```
769
810
 
811
+ ## Roadmap
812
+
813
+ See [ROADMAP.md](ROADMAP.md) for planned features — VS Code extension, browser agent, PTY support, and more.
814
+ Community contributions are welcome on all roadmap items.
815
+
816
+ ---
817
+
770
818
  ## License
771
819
 
772
820
  MIT
821
+
822
+ <!-- Keywords: ollama cli, ollama coding assistant, claude code alternative, gemini cli alternative,
823
+ agentic coding cli, open source ai terminal, free coding ai, qwen3 coder cli, devstral terminal,
824
+ kimi k2 cli, multi-provider ai cli, local llm coding tool -->