Free CLI Coding Agent with Cache-First Cost Control – DeepSeek Reasonix

An open-source, low-cost Al coding agent for DeepSeek with MCP, skills, memory, hooks, and reviewable edits.

Reasonix is a free, open-source AI coding agent that runs in your terminal or desktop app and uses the DeepSeek API for code editing, shell-assisted workflows, MCP tools, memory, skills, hooks, and long coding sessions.

Most AI coding agents treat the model’s prefix cache as an incidental property. Reasonix builds the entire session loop around DeepSeek’s byte-stable cache mechanic.

A real-world case study shows 435 million input tokens processed in a single day at a 99.82% cache hit rate, with total cost at roughly $12 compared to an estimated $61 for the same workload without cache optimization.

That ratio matters in multi-hour coding sessions, where context grows large, and round trips accumulate fast.

Features

  • Runs as a terminal AI coding agent or a desktop app.
  • Supports reviewable SEARCH/REPLACE edits before files change.
  • Gates shell commands through approval and workspace permissions.
  • Connects MCP servers through stdio, SSE, and Streamable HTTP.
  • Supports project and global skills through Markdown playbooks.
  • Stores memory across global and project scopes.
  • Supports hooks on lifecycle events such as tool use, prompt submit, and session stop.
  • Includes configurable web search through Mojeek, SearXNG, or Metaso.
  • Builds a semantic index through local Ollama embeddings or OpenAI-compatible embedding endpoints.
  • Supports macOS, Linux, and Windows terminal workflows.

Reasonix vs Claude Code

Reasonix and Claude Code are both CLI-based AI agents that inspect a codebase, edit files, run commands, and help with development tasks from a coding workflow. The real difference is the model stack, cost profile, extension surface, and product maturity.

Choose Claude Code when you want the strongest mainstream coding-agent experience, official Anthropic model access, IDE support, cloud surfaces, and a mature product ecosystem.

Choose Reasonix when you already want to use DeepSeek, prefer an open-source terminal agent, and care more about long-session API cost control than a polished cross-platform product.

ReasonixClaude Code
Model backendDeepSeek only.Claude models through Anthropic or supported providers.
LicenseMIT open source.Proprietary product.
Cost modelRequires a DeepSeek API key. Long sessions can benefit from prefix-cache behavior.Requires Claude subscription, Claude Console access, or supported cloud-provider access.
Best fitDevelopers who want DeepSeek-first terminal coding with open-source control.Developers who want the strongest Claude-based coding workflow across more surfaces.
Setup pathInstall through npm or run with npx.Install through native installer, Homebrew, WinGet, or supported platform flows.
Primary interfaceTerminal CLI and DesktopTerminal CLI, web, desktop, VS Code, JetBrains, Slack, and CI/CD surfaces.
File editingUses SEARCH/REPLACE review and /apply before changes hit disk.Edits files directly with permission controls and review workflows.
Shell commandsSupports gated shell execution and workspace permissions.Supports command execution with permissions and safety controls.
MCP supportSupports stdio, SSE, and Streamable HTTP MCP servers.Supports MCP servers and broader official MCP workflows.
SkillsSupports Markdown skills, inline skills, and subagent skills.Supports skills, custom commands, bundled skills, and plugin-based extension.
MemorySupports project and global memory.Uses CLAUDE.md, CLAUDE.local.md, auto memory, and project memory files.
HooksSupports PreToolUse, PostToolUse, UserPromptSubmit, and Stop hooks.Supports lifecycle hooks, including session, prompt, tool-use, notification, and stop events.
Web searchSupports configurable search through Mojeek, SearXNG, or Metaso.Supports search and related Claude Code workflows.
Local model supportNo. Reasonix is DeepSeek-only.No local-model-first workflow. Claude Code centers on Claude access.
Desktop appPrerelease desktop client.More mature official surface coverage.
Main limitationDeepSeek-only backend and paid API usage.Proprietary ecosystem and higher-cost premium model path.

Reasonix is not a full Claude Code alternative for every developer. Claude Code remains the safer default when model quality, product maturity, IDE support, and official Anthropic workflows matter most.

Use Reasonix when these points match your workflow:

  • You already use DeepSeek API for coding work.
  • You want an open-source coding agent.
  • You prefer terminal workflows over IDE-first assistants.
  • You want reviewable SEARCH/REPLACE edits before file changes.
  • You care about MCP, hooks, skills, and project memory.
  • You want lower long-session cost as a core design goal.

Use Claude Code when these points matter more:

  • You want the strongest Claude model experience.
  • You need VS Code or JetBrains integration.
  • You want official desktop, web, Slack, or CI/CD surfaces.
  • You prefer a more mature product ecosystem.
  • You want built-in Claude Code skills, plugins, and official workflows.
  • You work on tasks where Claude’s reasoning quality matters more than DeepSeek API cost.

How to Use Reasonix

Install Reasonix globally when you want the reasonix command on your PATH.

npm install -g reasonix

Start a coding session inside a project.

reasonix code my-project

Run Reasonix once through npx when you want to try the latest package without a global install.

cd my-project
npx reasonix code

Use the shorter dsnix alias when you prefer fewer keystrokes.

npm install -g dsnix
npx dsnix@latest code

Run Reasonix inside a different project folder.

npx reasonix code --dir /path/to/project

The first run asks for a DeepSeek API key and stores it under the Reasonix config folder. Reasonix needs Node 22 or newer in the current project requirements, and it works on macOS, Linux, and Windows terminals.

Use reasonix doctor before serious project work to check Node, API key, and MCP wiring.

reasonix doctor

Use reasonix update when you want to upgrade the CLI.

reasonix update

Use reasonix chat when you want conversation without filesystem and shell tools.

reasonix chat

Use reasonix run for one-shot terminal output.

reasonix run "summarize this repository structure"

Use /apply only after reviewing proposed SEARCH/REPLACE edits.

/apply

Use /qq connect when you want QQ as a remote channel for the active session.

/qq connect

Free Access and Limits

The coding agent is free and open source under the MIT license, but it requires a paid DeepSeek API key. The model usage cost depends on DeepSeek pricing, token volume, preset choice, and cache hit rate.

Reasonix is also not a multi-provider coding agent. Choose SmallCode, Pi Coding Agent or another local-model workflow when air-gapped use, Ollama-first usage, or provider switching matters more than DeepSeek-native cache behavior.

Quick Reference

Installation Commands

CommandPurpose
npm install -g reasonixInstall Reasonix globally.
reasonix code my-projectStart code mode for a project path.
cd my-projectMove into a project folder before running npx.
npx reasonix codeRun the latest Reasonix package once.
npm install -g dsnixInstall the shorter alias package.
npx dsnix@latest codeRun Reasonix through the dsnix alias.
reasonixLaunch code mode in the current directory.
reasonix code [dir]Launch the coding agent in a directory.
reasonix code --helpShow flags for code mode.
reasonix --helpShow available commands and subcommands.
npx reasonix code --dir /path/to/projectLaunch code mode with an explicit project root.

Main CLI Commands

CommandPurpose
reasonixStart the default code workflow.
reasonix code [dir]Start the coding agent.
reasonix chatStart plain chat with no filesystem or shell tools.
reasonix run "task"Run a one-shot task and stream output.
reasonix doctorCheck Node, API key, and MCP wiring.
reasonix updateUpgrade Reasonix.
reasonix replayReplay session data.
reasonix diffInspect diffs.
reasonix eventsInspect event data.
reasonix statsInspect session or usage statistics.
reasonix indexBuild a semantic index.
reasonix mcpManage MCP tooling.
reasonix prune-sessionsClean stored session data.

Code Mode and Chat Mode

Capabilitycodechat
Filesystem toolsYesNo
edit_fileYesNo
SEARCH/REPLACE reviewYesNo
/applyYesNo
Gated shell toolYesNo
Plan modeYesNo
/todoYesNo
/skill newYesNo
/mcp addYesNo
remember and recall_memoryProject and globalGlobal only
MCP servers from configYesYes
Web searchYesYes
ask_choiceYesYes
Coding system promptYesGeneric
Session scopePer directoryShared default

Slash Commands Mentioned

CommandPurpose
/applyApply reviewed SEARCH/REPLACE edits.
/todoUse plan or task tracking inside code mode.
/skill newCreate a project skill.
/skill new --globalCreate a global skill.
/skill listList available skills.
/skill show <name>Print a skill body.
/skill <name> [args]Run a skill with optional arguments.
/skill openspec-propose <task>Run an OpenSpec skill workflow after setup.
/mcpOpen the interactive MCP hub.
/mcp addAdd MCP tooling inside code mode.
/mcp disable <name>Disable an MCP server on next launch.
/mcp enable <name>Re-enable a disabled MCP server.
/mcp reconnect <name>Reconnect a live MCP server.
/memory listList global and project memories.
/memory show <name>Show a memory entry.
/memory forget <name>Delete one memory entry.
/memory clear <scope> confirmClear a memory scope.
/permissions listShow the workspace shell allowlist.
/permissions add <prefix>Add an approved shell prefix.
/permissions rm <prefix|index>Remove an approved shell prefix.
/permissions clear confirmClear the workspace allowlist.
/search-engine mojeekUse Mojeek for web search.
/search-engine searxngUse local SearXNG at the default endpoint.
/search-engine searxng http://192.168.1.5:8888Use a custom SearXNG endpoint.
/search-engine metasoUse Metaso for web search.
/qq connectConnect QQ to the active session.
/proUse DeepSeek V4 Pro for the next turn.
/preset maxUse Pro for the whole session.
/helpShow in-session help.

MCP Commands and Formats

ItemFormat or Command
MCP flagnpx reasonix code --mcp "fs=npx -y @mcp/server-filesystem /tmp"
MCP inspectnpx reasonix mcp inspect "git=uvx mcp-server-git"
MCP listnpx reasonix mcp list
Stdio string formatname=command arg1 arg2
SSE URL formatremote=https://example.com/mcp/sse
Anonymous SSE URLhttps://other.example.com/mcp
Streamable HTTP formatedge=streamable+https://edge.example.com/mcp

Configuration Files and Paths

Path or FilePurpose
~/.reasonix/config.jsonGlobal Reasonix config on macOS and Linux.
%USERPROFILE%\.reasonix\config.jsonGlobal Reasonix config on Windows.
<project>/.reasonix/Project-level overrides.
<project>/.reasonix/settings.jsonProject hooks config.
~/.reasonix/settings.jsonGlobal hooks config.
<project>/.reasonix/skills/Project skills.
~/.reasonix/skills/Global skills.
<project>/.claude/skills/<name>/SKILL.mdClaude-format project skills.
~/.claude/skills/Claude-format global skills.
~/.reasonix/memory/global/Global memory entries.
~/.reasonix/memory/<project-hash>/Project memory entries.
REASONIX.mdRepo-level project instruction file.

Top-Level Config Keys

KeySupported Values or Purpose
apiKeyDeepSeek API key.
baseUrlDeepSeek API base URL.
langen or zh.
presetauto, flash, or pro.
editModereview, auto, or yolo.
reasoningEfforthigh or max.
themelight, dark, or auto.
searchEnables or disables web search tools.
webSearchEnginemojeek, searxng, or metaso.
webSearchEndpointCustom endpoint for search backends.
mcpLegacy MCP string entries.
mcpServersCanonical MCP server objects.
mcpDisabledMCP servers skipped at startup.
projectsPer-workspace project overrides.
semanticEmbedding provider config.
sessionSession config value.

Edit Modes

ModeBehavior
reviewQueues edits and gates shell commands.
autoApplies edits and still gates shell commands.
yoloSkips edit and shell gates. Use only in a sandbox.

MCP Server Object Keys

KeyUse
commandStdio command.
argsStdio command arguments.
envEnvironment variables for stdio servers.
transportsse or streamable-http.
urlHTTP server URL.
headersHeaders for HTTP transports.
disabledDeclarative server toggle.

Skill Frontmatter

KeySupported Values or Purpose
nameSkill name.
descriptionOne-line skill description.
runAsinline or subagent.
allowed-toolsTool allowlist for subagent mode.
modelSubagent model override that must start with deepseek-.
max-itersSubagent tool-call budget from 1 to 32.

Memory Entry Fields

FieldPurpose
nameMemory entry name.
descriptionMemory summary.
typeuser, feedback, project, or reference.
scopeGlobal or project memory scope.
createdCreation date.
BodyThe remembered fact in Markdown.

Hook Events

EventBehavior
PreToolUseRuns before a tool call. Exit 2 blocks the tool.
PostToolUseRuns after a tool call. Non-zero exit warns only.
UserPromptSubmitRuns before user input enters the loop. Exit 2 blocks the prompt.
StopRuns on /quit or session exit. Non-zero exit warns only.

Semantic Index Config

ProviderKey Fields
ollamabaseUrl, model.
openaiCompatbaseUrl, apiKey, model.

Pros

  • MIT open-source license.
  • DeepSeek-native cache stability.
  • Terminal-first coding workflow.
  • MCP, skills, and hooks.
  • Persistent per-workspace sessions.
  • Review mode before edits.
  • Desktop option.

Cons

  • Paid DeepSeek API required.
  • DeepSeek-only backend.
  • No IDE replacement.
  • Node setup required.

Alternatives and Related Resources

FAQs

Q: Is Reasonix free?
A: Reasonix is free to install and MIT licensed, but it requires a paid DeepSeek API key to run. API usage is billed by DeepSeek at standard token rates. The cache-first loop keeps costs low on long sessions, but every session incurs API charges.

Q: What operating systems does Reasonix support?
A: Reasonix supports macOS, Linux, and Windows. On Windows it works in PowerShell, Git Bash, and Windows Terminal.

Q: What is the difference between reasonix code and reasonix chat?
A: code mode gives the agent access to filesystem tools, a shell tool, and SEARCH/REPLACE edit review before changes apply. chat mode runs a lighter session with MCP servers and web search available but no disk or shell access. Use code for real coding tasks and chat when you want a model thinking partner with no file risk.

Q: Can Reasonix connect to MCP servers?
A: Yes. MCP servers attach through stdio, SSE, or Streamable HTTP.

Leave a Reply

Your email address will not be published. Required fields are marked *

Get the latest & top AI tools sent directly to your email.

Subscribe now to explore the latest & top AI tools and resources, all in one convenient newsletter. No spam, we promise!