Reasonix: A Claude-Code-Style Coding Agent on DeepSeek
- Category
- AI & Local LLM
- Posted
- July 11, 2026
- Updated
- July 11, 2026
- By
- Jacob Lloyd — written with AI assistance, post-project
- Read time
- 5 min read
In plain terms: Reasonix is a program you run in a terminal that acts like an AI coding assistant: you tell it what you want in plain English and it reads, writes, and tests code for you. Instead of a monthly subscription, it talks to DeepSeek, a very cheap pay-as-you-go AI service, so real coding help costs pennies. This article shows how to install it, wire in your key, and keep it updated automatically.
If you like the Claude Code way of working — a coding agent living in your terminal, reading files, running commands, fixing its own mistakes — but you'd rather pay fractions of a cent per task than a monthly subscription, this is the recipe: Reasonix, a Claude-Code-style CLI agent, pointed at DeepSeek's API.
tl;dr
- What it is: Reasonix, an agentic coding CLI in the Claude Code mold — subagents, skills, per-project memory — configured to use DeepSeek models instead of a paid plan.
- What it costs: pay-per-token, no subscription. For scale: a full month of my always-on agents on these same DeepSeek tiers came to $24.08.
- What you need: Node.js + npm, a DeepSeek API key, ten minutes.
- What you end up with: a terminal coding agent, a config that survives updates, and a scheduled updater so it stays current without you thinking about it.
What you end up with
You open a terminal in a project, type reasonix, and describe what you want: "add a --dry-run flag to this script and update the README." The agent reads the relevant files, edits them, runs the script to check its work, and reports back — the same loop Claude Code users know. The differences are in the plumbing:
- The brain is DeepSeek, billed per token. Two tiers cover everything: a flash model for everyday edits and glue work, and a pro reasoning model for gnarly refactors and debugging. My always-on agent stack runs on these same two tiers and cost $24.08 for a full month ($9.54 flash + $14.54 pro) — the same workload priced out at roughly $475–$915 on the flagship APIs.
- It's yours to schedule. Because there's no seat license, you can leave it grinding through long busy-work — batch refactors, test writing, documentation passes — without watching a usage meter.
- State lives in your home directory. Reasonix keeps a dotfolder (
~/.reasonix/) with its config file plus per-project session history and memory, so it remembers context per repo across runs.
Step 1: install
It's an npm global package:
npm install -g reasonix
reasonix --version
That's the entire install. If you keep Node under a nonstandard prefix, note the full path to npm — you'll want it again for the updater in step 4.
Step 2: point it at DeepSeek
Create an API key on DeepSeek's platform site (pay-as-you-go; my whole agent stack's first eleven days of July came to $2.23). Then give Reasonix three facts in its config file at ~/.reasonix/config.toml:
# ~/.reasonix/config.toml — the shape, not a paste of mine
[api]
base_url = "https://api.deepseek.com"
api_key = "sk-..." # your key; or reference an env var / key file
[models]
default = "deepseek-v4-flash" # everyday tier
smart = "deepseek-v4-pro" # reasoning tier for hard tasks
Key names vary between agent CLIs, but every one of them reduces to the same triple: base URL, key, model id(s). Two hygiene rules regardless of tool:
chmod 600anything containing the key, and never pass it on a command line (it ends up in shell history andpsoutput).- Set up both tiers. Flash-for-default, pro-for-hard is the whole cost story: most turns are cheap, and you escalate only when the model is visibly struggling.
Step 3: subagents and skills
Subagents are scoped workers the main agent spawns — "search the codebase for every caller of this function" — and on per-token billing they're also the cost lever, since workers can run the flash tier while the orchestrator thinks on pro. Skills are instruction files the agent loads on demand, so a deploy procedure or a test-writing convention gets written down once instead of re-explained every session.
Step 4: keep it updated on a schedule
Agent CLIs move fast, and a stale one misses tool fixes. Rather than remembering to update, schedule it. Mine runs every other day at 6 AM from a scheduler; the script is the interesting part, because a naive npm update -g in cron has two failure modes worth guarding:
#!/usr/bin/env bash
set -euo pipefail
LOG="$HOME/logs/update-reasonix.log"
NPM="$(command -v npm)"
# 1. Lock guard — two overlapping npm runs corrupt the install
exec 9>"${LOG%.log}.lock"
flock -n 9 || { echo "update already running"; exit 0; }
# 2. Log rotation — cron logs grow forever unless you trim them
[ -f "$LOG" ] && tail -n 5000 "$LOG" > "$LOG.tmp" && mv "$LOG.tmp" "$LOG"
echo "before: $("$NPM" list -g reasonix --depth=0 | grep reasonix)" >> "$LOG"
"$NPM" update -g reasonix >> "$LOG" 2>&1
echo "after: $("$NPM" list -g reasonix --depth=0 | grep reasonix)" >> "$LOG"
Wire it to cron or a systemd timer — either works. Logging the version before and after matters more than it looks: when the agent's behavior changes overnight, the log tells you whether an update did it.
Bonus: put it in your chat app
A terminal agent doesn't have to stay in a terminal. Because Reasonix is just a CLI on a PTY, you can stream it into a web UI with xterm.js and use it from any device on your network. My self-hosted chat app does exactly that — Reasonix appears as a "terminal bot" alongside the regular chat agents, with start/restart/stop controls. The whole setup is written up in DisPatch: a self-hosted AI chat.
Gotchas
- Reasoning models look stalled before they answer. The pro tier streams its thinking before the reply; if a wrapper or gateway around the agent has a short idle timeout, long thinks get killed mid-thought. Raise the timeout, don't blame the model.
- Never put the key in argv. Config file (chmod 600) or environment file only. Command-line flags leak via history and process lists.
- Pin your npm path in the updater. Cron runs with a minimal
PATH;npmin an interactive shell and in cron can resolve differently. Hard-code or resolve it explicitly in the script. - Lock your update job. Without
flock, a slow npm registry plus an eager schedule eventually gives you two concurrent global installs and a broken CLI. - Watch the escalation habit. Pay-per-token stays cheap only if flash is the default. If every task runs on pro "just in case," you've reinvented the subscription — track spend for the first week.
- Session folders grow. Per-project history is great until a chatty agent has months of it; prune the dotfolder's session data occasionally.
Related reading: the broader DeepSeek-everywhere wiring guide covers pointing the actual Claude Code CLI at DeepSeek's Anthropic-compatible endpoint — the same idea from the other direction.