loading…
Search for a command to run...
loading…
Run 400B+ open coding models on your codebase without the hardware bill. Ollama Cloud first — OpenAI, Anthropic, and Gemini when you need them.
Run 400B+ open coding models on your codebase without the hardware bill. Ollama Cloud first — OpenAI, Anthropic, and Gemini when you need them.
An open-model-first CLI coding assistant for production development workflows.
nex-code is a terminal coding assistant built around affordable open-model workflows. It works directly in real repositories, reasons through tasks in phases, and routes work across Ollama, Ollama Cloud, local models, and optional premium providers.
Most coding assistants are optimized for short demos: generate a file, suggest a snippet, answer a question. Real development work is different. It involves understanding an existing repository, planning changes, editing carefully, running verification, and working with the operational tools around the code.
nex-code exists to close that gap. It is designed as a serious CLI-first system that can:
The result is not just "chat in the terminal." It is a CLI workflow engine for software delivery that keeps model cost visible.
nex-code treats coding tasks as execution flows rather than single prompts.
This matters because the failure mode of many coding assistants is not generation quality alone. It is premature action. A useful assistant must know when to inspect first, when to change code, and when to stop and verify before claiming success.
Different models are good at different things. Some are better at fast repo exploration, some at careful implementation, and some at structured verification or longer-context reasoning.
nex-code is built around that reality while treating open and affordable models as first-class defaults. Instead of binding the entire session to one model, it can route work by phase, task type, provider availability, and configured budget. In practice, this means:
The goal is not provider abstraction for its own sake. The goal is to make model choice operational, reliable, and cost-aware.
run_in_background, polled with bash_output and stopped with kill_shell while the agent keeps workingedit_file rejects ambiguous matches (with the conflicting line numbers) instead of silently changing every occurrence; replace_all opts into bulk renamesnode --check) and a broken file is flagged in the tool result itself, before the next test run.nex/agents/*.md (tool allowlist, model, system prompt) and spawn them via spawn_agents alongside the built-in explore/review/implement types.nex/tasks.json; finished lists are discarded automaticallyAs of v0.5.33+, nex-code handles scoped edits on real-world projects — targeted
changes to specific file sections — with production reliability. This was validated
against jarvis-agent (a 1400+ file Django/Alpine.js project with 3155-line templates).
Small models (devstral-small-2:24b, 128K context) would stall permanently on
projects with >50 files. The compactor would purge context, the model would try to
re-read lost content, and the overlap guard would block every re-read. After 5
consecutive blocked calls the loop guard aborted — zero edits made.
Deadlock escape ordering (commits 00872ef, 567f0c5): The deadlock escape
valve now fires before the overlap detection, allowing one targeted re-read after
super-nuclear compression. Previously it was placed inside if (!blocked) — unreachable
because the overlap check always blocked first.
Context-window-aware routing (commits c525151, 5a0ef70, 207bfdd and follow-ups):
scoped-edit task category detected via patterns like "add a field to", "inside the X div"getOllamaRecommendations() applies context-window bonus: +8pts for ≥256K, +12pts for ≥1MautoUpdateRouting guards scoped-edit: rejects 128K winners with a warningdevstral-small-2:24b 82→74, deepseek-v4-flash:cloud 90→92, qwen3.5:35b-a3b 84→88deepseek-v4-flash:cloud (1M context) — 2/2 full successes on test fixture, 1/1 on real jarvis-agentdevstral-small-2:24b-cloud (128K) — now produces scoped edits instead of stalling (was 0/1 before fix)| Model | Context | Speed | Cost |
|---|---|---|---|
qwen3.5:35b-a3b |
262K | fast | free (local) |
deepseek-v4-flash:cloud |
1M | fast | cloud |
qwen3-coder-next |
262K | balanced | cloud |
At a high level, nex-code is organized as an orchestration layer on top of model providers and developer tools.
CLI and session layer Accepts prompts, commands, flags, and session state from the terminal or editor integration.
Agent loop Runs the task through a controlled execution cycle: inspect, plan, act, verify, and retry when needed.
Routing and provider layer Resolves which provider and model should handle the next step, based on configuration, task type, and fallback logic.
Tool execution layer Exposes filesystem, shell, Git, browser, SSH, Docker, Kubernetes, and related capabilities to the agent.
Verification layer Runs tests, evaluates outcomes, and decides whether the task is complete or needs another pass.
In practice, this makes nex-code closer to a local orchestration system than a thin wrapper around an LLM API.
A typical developer flow with nex-code looks like this:
nex-code inspects the project structure, relevant files, and surrounding context.Example prompts:
explain why the user creation flow is failing in production
add input validation to the createUser handler and update the tests
refactor this module to async/await and verify the endpoint behavior
review the recent changes and look for regressions before I push
The global Desktop launcher can run reproducible headless Desktop scenarios:
nex-code-app --e2e \
--open-project /path/to/project \
--prompt-file /tmp/prompt.txt \
--model ollama:deepseek-v4-flash:cloud \
--timeout-ms 180000 \
--json \
--auto-confirm \
--expect-file src/main.js \
--expect-contains "expected output"
This launches the Electron app with isolated E2E state, opens the project via the normal Desktop project path, submits the prompt through the renderer command input, waits for a terminal session state, verifies optional expectations, and exits non-zero on stalled, error, timeout, or failed expectation results.
See Desktop Workflow Verification for the full flag reference and JSON result shape.
The terminal remains the most capable interface for real development work. nex-code is designed to operate where developers already inspect code, run tests, check diffs, and manage environments.
The product assumes a professional engineering workflow: existing repositories, mixed tooling, imperfect environments, partial context, and the need to verify outcomes. It is meant to assist a developer, not replace the surrounding engineering discipline.
A credible coding assistant must handle more than code generation. It needs to interact with source control, infrastructure, shells, CI-like verification, and operational context. nex-code is built around those constraints instead of treating them as edge cases.
Quick start:
npx nex-code
Or install globally:
npm install -g nex-code
nex-code
Basic requirements:
Typical environment configuration:
OLLAMA_API_KEY=your-key
DEFAULT_PROVIDER=ollama
DEFAULT_MODEL=qwen3-coder:480b
# Optional premium fallbacks:
DEEPSEEK_API_KEY=your-key
OPENAI_API_KEY=your-key
ANTHROPIC_API_KEY=your-key
GEMINI_API_KEY=your-key
On first launch, nex-code guides setup interactively and recommends Ollama Cloud or local Ollama first. Use /models coding for cost-aware model recommendations, /budget to cap premium spend, and /fallback to decide when paid providers may be used.
The long-term value of nex-code is not only broader model support. It is better orchestration.
Likely areas of continued investment include:
The direction is clear: make model-assisted development behave more like a disciplined engineering system and less like an isolated chat interface, while keeping costs controllable.
Выполни в терминале:
claude mcp add nex-code --env ANTHROPIC_API_KEY="" --env DEEPSEEK_API_KEY="" --env DEFAULT_MODEL="" --env DEFAULT_PROVIDER="" --env GEMINI_API_KEY="" --env OLLAMA_API_KEY="" --env OPENAI_API_KEY="" -- npx -y nex-codepro-tip
Поставил Nex Code? Скажи Claude: «запомни почему я установил Nex Code и что хочу попробовать» — попадёт в твой Vault.
как это работает →CSA PROJECT - FZCO © 2026 IFZA Business Park, DDP, Premises Number 31174 - 001
Безопасность
Проверь перед установкойЗапросит:
ANTHROPIC_API_KEYDEEPSEEK_API_KEYGEMINI_API_KEYOLLAMA_API_KEYOPENAI_API_KEYАвтоматическая эвристика по публичным данным — не гарантия безопасности.