nex-code 0.3.57 → 0.3.59

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 +79 -38
  2. package/dist/nex-code.js +385 -349
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  ```
2
2
  ██▄▄██ nex-code v0.3.54
3
- █▀██▀█ qwen3-coder:480b · /help
3
+ █▀██▀█ devstral-2:123b · /help
4
4
  ▀████▀
5
5
  ```
6
6
 
@@ -66,47 +66,88 @@ npm update -g nex-code
66
66
 
67
67
  ## Why nex-code?
68
68
 
69
- | | **nex-code** | Claude Code | Gemini CLI | Aider |
70
- |---|---|---|---|---|
71
- | **VS Code extension** | Built-in sidebar panel | | | |
72
- | **Free with Ollama** | ✅ Native, first-class | ⚠️ Workaround | ❌ | ✅ |
73
- | **Ollama Cloud support** | 47+ models, native | ⚠️ API-compat only | | |
74
- | **Multi-provider runtime swap** | ✅ 5 providers, no restart | ❌ Claude-only | ❌ Gemini-only | ✅ |
75
- | **Tool tiers (adapts to model)** | ✅ essential/standard/full | ❌ | ❌ | ❌ |
76
- | **5-layer open-model auto-fix** | ✅ | ❌ | ❌ | ⚠️ |
77
- | **Undo / Redo (persistent)** | ✅ Survives restart | | ❌ | ❌ |
78
- | **Cost tracking + budgets** | | | ❌ | ❌ |
79
- | **Pre-push secret detection** | | | ❌ | ❌ |
80
- | **Browser agent (headless)** | ✅ Playwright-based | ❌ | ⚠️ Experimental | ❌ |
81
- | **Grounded web search** | Perplexity/DDG | ❌ | ✅ Google grounded | ❌ |
82
- | **GitHub Actions tools** | ✅ native | ❌ | ❌ | ❌ |
83
- | **SSH server management** | native (AlmaLinux/macOS) | | | |
84
- | **Docker tools** | ✅ local + remote via SSH | ❌ | ❌ | ❌ |
85
- | **Deploy tool (rsync)** | named configs | | | |
86
- | **Open-source** | ✅ MIT | ❌ | ✅ Apache 2.0 | ✅ |
87
- | **Runtime dependencies** | **2** (axios, dotenv) | Many | Many | Heavy (Python) |
88
- | **Startup time** | **~100ms** | ~400ms | ~300ms | Slow |
89
- | **Plugin API** | registerTool + hooks | ❌ | ❌ | ❌ |
90
- | **Skill marketplace** | ✅ Install from git | ❌ | ❌ | ❌ |
91
- | **Audit logging** | JSONL + sanitization | ❌ | ❌ | ❌ |
92
- | **Test coverage** | 3074 tests, 85% | — | — | — |
69
+ **Provider-agnostic by design.** Run fully free with a local Ollama server, use Ollama Cloud's 47+ models on a flat-rate plan, or connect OpenAI, Anthropic, or Gemini switch at runtime with `/model`, no restart needed. The fallback chain automatically retries failed requests on the next configured provider.
70
+
71
+ **Open-model first.** nex-code was built around open models, not locked to any single vendor. Tool tiers (`essential / standard / full`) adapt automatically to the model's capability level, so smaller models don't receive tool schemas they can't handle. A 5-layer auto-fix loop catches and retries malformed tool calls without user intervention.
72
+
73
+ **Smart model routing.** The built-in `/benchmark` system tests all configured models against 33 real nex-code tool-calling tasks across 5 task categories. The results feed a routing table so nex-code can automatically switch to the best model for the detected task type:
74
+
75
+ | Detected task | Routed model (example) |
76
+ |---|---|
77
+ | Frontend / CSS / React | `qwen3-coder:480b` |
78
+ | Sysadmin / Docker / nginx | `devstral-2:123b` |
79
+ | Data / SQL / migrations | `devstral-2:123b` |
80
+ | Agentic swarms | `minimax-m2.7:cloud` |
81
+ | General coding | `devstral-2:123b` (default) |
82
+
83
+ **Built-in VS Code extension.** A sidebar chat panel with streaming output, collapsible tool cards, and native VS Code theme support shipped in the same repo, no separate install.
84
+
85
+ **Lightweight.** 2 runtime dependencies (`axios`, `dotenv`). Starts in ~100ms. No Python, no heavy runtime, no daemon process.
86
+
87
+ **Infrastructure tools built in:**
88
+ - SSH server management (AlmaLinux, macOS, any Linux)
89
+ - Docker tools local and remote via SSH
90
+ - Kubernetes overview (`/k8s`)
91
+ - GitHub Actions tools (trigger, monitor runs)
92
+ - Named deploy configs (`rsync`-based, `/deploy`)
93
+ - Browser agent via Playwright (optional, not bundled)
94
+ - Grounded web search via Perplexity or DuckDuckGo
95
+
96
+ **Developer safety:**
97
+ - Pre-push secret detection — blocks commits that contain API keys or tokens
98
+ - Full audit log (JSONL + sanitization)
99
+ - Undo/Redo with persistence across restarts
100
+ - Cost tracking and per-provider budget limits
101
+ - Plan mode — analysis-only pass before any file changes
102
+
103
+ **Extensible.** Plugin API (`registerTool` + lifecycle hooks), skill system (install from any git URL), MCP server support.
104
+
105
+ **Tested.** 3074 tests, 85% coverage, CI on every push.
93
106
 
94
107
  ---
95
108
 
96
- ## Ollama Cloud — The Free-by-Default Model Tier
109
+ ## Ollama Cloud — Recommended Model Setup
97
110
 
98
111
  nex-code was built with Ollama Cloud as its primary provider. No subscription, no billing surprises.
99
- Use powerful open models like **Qwen3 Coder**, **Kimi K2.5**, **Devstral**, and **DeepSeek R1** for free.
112
+ Rankings are based on nex-code's own `/benchmark` 15 tool-calling tasks against real nex-code schemas.
113
+
114
+ ### Flat-Rate / Pay-as-you-go
115
+
116
+ <!-- nex-benchmark-start -->
117
+ <!-- Updated: 2026-03-20 — run `/benchmark --discover` after new Ollama Cloud releases -->
100
118
 
101
- | Model | Context | Best For |
102
- |---|---|---|
103
- | `qwen3-coder:480b` | 131K | Code generation, tool calling |
104
- | `kimi-k2.5` | 256K | Large repos, reasoning |
105
- | `devstral-2:123b` | 131K | Reliable tool calling |
106
- | `devstral-small-2:24b` | 131K | Fast, efficient |
107
- | `qwen3.5:35b-a3b` | 256K | MoE, very fast |
119
+ | Rank | Model | Score | Avg Latency | Context | Best For |
120
+ |---|---|---|---|---|---|
121
+
122
+
123
+ > Rankings are nex-code-specific: tool name accuracy, argument validity, schema compliance.
124
+ > Toolathon (Minimax SOTA) measures different task types — run `/benchmark --discover` after model releases.
125
+ <!-- nex-benchmark-end -->
126
+
127
+ ### Recommended `.env` for Ollama Cloud (Flat-Rate)
128
+
129
+ ```env
130
+ DEFAULT_PROVIDER=ollama
131
+ DEFAULT_MODEL=devstral-2:123b # nex-code benchmark winner (84/100, 1.5s)
132
+
133
+ # Sub-agent routing
134
+ NEX_HEAVY_MODEL=qwen3-coder:480b # complex multi-step coding
135
+ NEX_STANDARD_MODEL=devstral-2:123b # routine tasks
136
+ NEX_FAST_MODEL=devstral-small-2:24b # quick lookups, fast sub-agents
137
+ ```
138
+
139
+ ### Run the benchmark yourself
140
+
141
+ ```bash
142
+ /benchmark # full run: 15 tasks × 5 models
143
+ /benchmark --quick # fast run: 7 tasks × 3 models
144
+ /benchmark --discover # detect new Ollama Cloud models, benchmark + auto-update README
145
+ /benchmark --models=minimax-m2.7:cloud,qwen3-coder:480b
146
+ /benchmark --history # show OpenClaw nightly trend
147
+ ```
108
148
 
109
- Switch anytime: `/model ollama:qwen3-coder:480b` or add your `OLLAMA_API_KEY` to `.env`.
149
+ Switch anytime: `/model devstral-2:123b` or update `DEFAULT_MODEL` in `.env`.
150
+ Auto-discovery runs weekly via the scheduled improvement task and updates this table automatically.
110
151
 
111
152
  ---
112
153
 
@@ -155,7 +196,7 @@ PERPLEXITY_API_KEY=your-key # Perplexity (optional — enables grounded web se
155
196
 
156
197
  # Optional tuning
157
198
  DEFAULT_PROVIDER=ollama # Active provider on startup
158
- DEFAULT_MODEL=qwen3-coder:480b # Active model on startup
199
+ DEFAULT_MODEL=devstral-2:123b # Active model on startup (see /benchmark for ranking)
159
200
  FALLBACK_CHAIN=anthropic,openai # Providers tried on failure (comma-separated)
160
201
  NEX_STALE_WARN_MS=60000 # Warn if no tokens received for N ms (default: 60000)
161
202
  NEX_STALE_ABORT_MS=120000 # Abort and retry stream after N ms of silence (default: 120000)
@@ -299,7 +340,7 @@ npm run package # syncs version, builds, and creates .vsix
299
340
  |---------|---------|-------------|
300
341
  | `nexCode.executablePath` | `nex-code` | Path to the nex-code binary |
301
342
  | `nexCode.defaultProvider` | `ollama` | LLM provider |
302
- | `nexCode.defaultModel` | `qwen3-coder:480b` | Model name |
343
+ | `nexCode.defaultModel` | `devstral-2:123b` | Model name |
303
344
  | `nexCode.anthropicApiKey` | — | Anthropic API key |
304
345
  | `nexCode.openaiApiKey` | — | OpenAI API key |
305
346
  | `nexCode.ollamaApiKey` | — | Ollama Cloud API key |
@@ -400,7 +441,7 @@ Type `/` to see inline suggestions as you type. Tab completion is supported for
400
441
  | `/review [--strict] [file]` | Deep code review: 3-phase protocol (broad scan → grep deep-dive → report), score table, diff fix snippets. `--strict` forces ≥3 critical findings. |
401
442
  | `/k8s [user@host]` | Kubernetes overview: namespaces + pod health (remote via SSH optional) |
402
443
  | `/setup` | Interactive setup wizard — configure provider, API keys, web search |
403
- | `/benchmark` | Show model benchmark results (7-day trend) |
444
+ | `/benchmark [--quick\|--discover\|--history]` | Rank models on nex-code tool-calling tasks, auto-update routing |
404
445
  | `/install-skill <url>` | Install a skill from a git repo |
405
446
  | `/search-skill <query>` | Search GitHub for nex-code skills |
406
447
  | `/remove-skill <name>` | Remove an installed skill |