nex-code 0.3.13 → 0.3.18
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 +104 -14
- package/dist/nex-code.js +355 -275
- package/package.json +24 -8
package/README.md
CHANGED
|
@@ -8,17 +8,21 @@
|
|
|
8
8
|
```
|
|
9
9
|
|
|
10
10
|
<p align="center">
|
|
11
|
-
<b>
|
|
12
|
-
|
|
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
|
-
<img src="https://img.shields.io/badge/tests-
|
|
25
|
+
<img src="https://img.shields.io/badge/tests-1825-blue.svg" alt="Tests: 1825">
|
|
22
26
|
</p>
|
|
23
27
|
|
|
24
28
|
---
|
|
@@ -64,15 +68,40 @@ npm update -g nex-code
|
|
|
64
68
|
|
|
65
69
|
## Why nex-code?
|
|
66
70
|
|
|
67
|
-
| | nex-code |
|
|
68
|
-
|
|
69
|
-
| **
|
|
70
|
-
| **
|
|
71
|
-
| **
|
|
72
|
-
| **
|
|
73
|
-
| **
|
|
74
|
-
| **
|
|
75
|
-
| **
|
|
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
|
+
| **Browser agent (headless)** | ✅ Playwright-based | ❌ | ⚠️ Experimental | ❌ |
|
|
82
|
+
| **Grounded web search** | ✅ Perplexity/DDG | ❌ | ✅ Google grounded | ❌ |
|
|
83
|
+
| **GitHub Actions tools** | ✅ native | ❌ | ❌ | ❌ |
|
|
84
|
+
| **Open-source** | ✅ MIT | ❌ | ✅ Apache 2.0 | ✅ |
|
|
85
|
+
| **Runtime dependencies** | **2** (axios, dotenv) | Many | Many | Heavy (Python) |
|
|
86
|
+
| **Startup time** | **~100ms** | ~400ms | ~300ms | Slow |
|
|
87
|
+
| **Test coverage** | 1825 tests, 84% | — | — | — |
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
## Ollama Cloud — The Free-by-Default Model Tier
|
|
92
|
+
|
|
93
|
+
nex-code was built with Ollama Cloud as its primary provider. No subscription, no billing surprises.
|
|
94
|
+
Use powerful open models like **Qwen3 Coder**, **Kimi K2.5**, **Devstral**, and **DeepSeek R1** for free.
|
|
95
|
+
|
|
96
|
+
| Model | Context | Best For |
|
|
97
|
+
|---|---|---|
|
|
98
|
+
| `qwen3-coder:480b` | 131K | Code generation, tool calling |
|
|
99
|
+
| `kimi-k2.5` | 256K | Large repos, reasoning |
|
|
100
|
+
| `devstral-2:123b` | 131K | Reliable tool calling |
|
|
101
|
+
| `devstral-small-2:24b` | 131K | Fast, efficient |
|
|
102
|
+
| `qwen3.5:35b-a3b` | 256K | MoE, very fast |
|
|
103
|
+
|
|
104
|
+
Switch anytime: `/model ollama:qwen3-coder:480b` or add your `OLLAMA_API_KEY` to `.env`.
|
|
76
105
|
|
|
77
106
|
---
|
|
78
107
|
|
|
@@ -116,6 +145,7 @@ OLLAMA_API_KEY=your-key # Ollama Cloud (Qwen3 Coder, Qwen3.5, DeepSeek R1,
|
|
|
116
145
|
OPENAI_API_KEY=your-key # OpenAI (GPT-4o, GPT-4.1, o1, o3, o4-mini)
|
|
117
146
|
ANTHROPIC_API_KEY=your-key # Anthropic (Claude Sonnet 4.6, Opus 4.6, Haiku 4.5)
|
|
118
147
|
GEMINI_API_KEY=your-key # Google Gemini (3.1 Pro Preview, 2.5 Pro/Flash, 2.0 Flash)
|
|
148
|
+
PERPLEXITY_API_KEY=your-key # Perplexity (optional — enables grounded web search)
|
|
119
149
|
# No key needed for local Ollama — just have it running
|
|
120
150
|
```
|
|
121
151
|
|
|
@@ -188,10 +218,47 @@ nex-code -yolo
|
|
|
188
218
|
|
|
189
219
|
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
220
|
|
|
221
|
+
**Vision / Screenshot → Code** — drop an image path anywhere in your message and nex-code will send it to a vision-capable model automatically:
|
|
222
|
+
```
|
|
223
|
+
> /path/to/screenshot.png implement this UI in React
|
|
224
|
+
> describe the layout in mockup.png and generate the CSS
|
|
225
|
+
```
|
|
226
|
+
Supported formats: PNG, JPG, GIF, WebP, BMP. Works with Anthropic, OpenAI, Gemini, and Ollama vision models (llava, qwen2-vl, etc.).
|
|
227
|
+
|
|
191
228
|
### YOLO Mode
|
|
192
229
|
|
|
193
230
|
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`.
|
|
194
231
|
|
|
232
|
+
### Headless / Programmatic Mode
|
|
233
|
+
|
|
234
|
+
Run nex-code non-interactively from scripts, CI pipelines, or other processes:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Inline prompt
|
|
238
|
+
nex-code --task "refactor src/index.js to use async/await" --yolo
|
|
239
|
+
|
|
240
|
+
# Prompt from file (avoids shell-escaping issues with special characters)
|
|
241
|
+
nex-code --prompt-file /tmp/task.txt --yolo
|
|
242
|
+
|
|
243
|
+
# Delete the file after reading
|
|
244
|
+
nex-code --prompt-file /tmp/task.txt --delete-prompt-file --yolo
|
|
245
|
+
|
|
246
|
+
# JSON output for programmatic parsing
|
|
247
|
+
nex-code --prompt-file /tmp/task.txt --yolo --json
|
|
248
|
+
# → {"success":true,"response":"..."}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
| Flag | Description |
|
|
252
|
+
|------|-------------|
|
|
253
|
+
| `--task <prompt>` | Run a single prompt and exit |
|
|
254
|
+
| `--prompt-file <path>` | Read prompt from a UTF-8 file and run headless |
|
|
255
|
+
| `--delete-prompt-file` | Delete the prompt file after reading (use with `--prompt-file`) |
|
|
256
|
+
| `--auto` | Skip confirmations (non-interactive, no REPL banner) |
|
|
257
|
+
| `--yolo` | Skip all confirmations including dangerous commands |
|
|
258
|
+
| `--json` | Output `{"success":true,"response":"..."}` to stdout |
|
|
259
|
+
| `--max-turns <n>` | Override the agentic loop iteration limit |
|
|
260
|
+
| `--model <spec>` | Use a specific model (e.g. `anthropic:claude-sonnet-4-6`) |
|
|
261
|
+
|
|
195
262
|
---
|
|
196
263
|
|
|
197
264
|
## Providers & Models
|
|
@@ -260,6 +327,7 @@ Type `/` to see inline suggestions as you type. Tab completion is supported for
|
|
|
260
327
|
| `/undo` | Undo last file change |
|
|
261
328
|
| `/redo` | Redo last undone change |
|
|
262
329
|
| `/history` | Show file change history |
|
|
330
|
+
| `/review [file]` | Code review on current diff or a specific file |
|
|
263
331
|
| `/exit` | Quit |
|
|
264
332
|
|
|
265
333
|
---
|
|
@@ -283,10 +351,21 @@ The agent has 17 built-in tools:
|
|
|
283
351
|
| `git_diff` | Git diff with optional path filter |
|
|
284
352
|
| `git_log` | Git commit history with configurable count |
|
|
285
353
|
| `web_fetch` | Fetch content from a URL |
|
|
286
|
-
| `web_search` |
|
|
354
|
+
| `web_search` | Grounded search via Perplexity (if `PERPLEXITY_API_KEY` set) or DuckDuckGo |
|
|
287
355
|
| `ask_user` | Ask the user a question and wait for input |
|
|
288
356
|
| `task_list` | Create and manage task lists for multi-step operations |
|
|
289
357
|
| `spawn_agents` | Run parallel sub-agents with auto model routing |
|
|
358
|
+
| `browser_open` | Open URL in headless browser, return text + links (JS-heavy pages) |
|
|
359
|
+
| `browser_screenshot` | Screenshot a URL → saved file + vision-ready path |
|
|
360
|
+
| `browser_click` | Click element by CSS selector or visible text |
|
|
361
|
+
| `browser_fill` | Fill form field and optionally submit |
|
|
362
|
+
| `gh_run_list` | List GitHub Actions workflow runs |
|
|
363
|
+
| `gh_run_view` | View run details and step logs |
|
|
364
|
+
| `gh_workflow_trigger` | Trigger a workflow dispatch event |
|
|
365
|
+
|
|
366
|
+
**Interactive commands** (vim, top, htop, ssh, tmux, fzf, etc.) are automatically detected and spawned with full TTY passthrough — no separate handling required.
|
|
367
|
+
|
|
368
|
+
**Browser tools** require Playwright (`npm install playwright && npx playwright install chromium`). nex-code works without it — browser tools return a helpful install message if missing.
|
|
290
369
|
|
|
291
370
|
Additional tools can be added via [MCP servers](#mcp) or [Skills](#skills).
|
|
292
371
|
|
|
@@ -746,7 +825,7 @@ npm test # Run all tests with coverage
|
|
|
746
825
|
npm run test:watch # Watch mode
|
|
747
826
|
```
|
|
748
827
|
|
|
749
|
-
|
|
828
|
+
47 test suites, 1825 tests, 84% statement / 77% branch coverage.
|
|
750
829
|
|
|
751
830
|
CI runs on GitHub Actions (Node 18/20/22).
|
|
752
831
|
|
|
@@ -772,6 +851,17 @@ npm install -g nex-code # global install
|
|
|
772
851
|
npx nex-code # or run without installing
|
|
773
852
|
```
|
|
774
853
|
|
|
854
|
+
## Roadmap
|
|
855
|
+
|
|
856
|
+
See [ROADMAP.md](ROADMAP.md) for planned features — VS Code extension, browser agent, PTY support, and more.
|
|
857
|
+
Community contributions are welcome on all roadmap items.
|
|
858
|
+
|
|
859
|
+
---
|
|
860
|
+
|
|
775
861
|
## License
|
|
776
862
|
|
|
777
863
|
MIT
|
|
864
|
+
|
|
865
|
+
<!-- Keywords: ollama cli, ollama coding assistant, claude code alternative, gemini cli alternative,
|
|
866
|
+
agentic coding cli, open source ai terminal, free coding ai, qwen3 coder cli, devstral terminal,
|
|
867
|
+
kimi k2 cli, multi-provider ai cli, local llm coding tool -->
|