New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

darce-cli

Package Overview
Dependencies
Maintainers
1
Versions
45
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

darce-cli

The coding agent you can undo: 250+ models in your terminal, parallel swarms, model racing, and /undo for everything, even shell commands.

Source
npmnpm
Version
0.17.0
Version published
Weekly downloads
4.4K
Maintainers
1
Weekly downloads
 
Created
Source

Darce

Darce

The coding agent you can undo.
An open-source AI agent for your terminal. It writes code and runs commands with 250+ models,
and /undo rolls back everything it did, even files rm, mv and npm install changed.

npm downloads GitHub stars MIT license Discord

Darce on Product Hunt

Website · Docs · Quick start · How it compares · Discord

Darce flags rm -rf as destructive and asks first; after approval it deletes four files, then /undo restores all four and the tests pass again

A real session, not a mockup: Darce asks before rm -rf, deletes four files when told yes, and /undo brings all four back.

Quick start

npx darce-cli

That's it. No account, no API key, no card: the first run gives you a free trial straight away. Run darce signup when you want a free account with a daily allowance and your history kept. Needs Node.js 22+ on macOS, Linux or Windows.

To install it for good: npm install -g darce-cli, then run darce in any project.

Why people switch to Darce

🔁 Let it run, because everything comes back. Most agents can undo their own file edits. Darce snapshots your project before every step, so /undo also reverses what its shell commands did: a folder rm deleted, a file mv moved, a lockfile an install rewrote. /rewind (or Esc twice) scrubs back to any earlier point. Undo only reverses what Darce did: edits you made in between stay, a commit Darce made is taken back off your branch, and removed files go to .git/darce-trash rather than disappearing.

✋ It only stops you when it matters. Every command is scored before it runs. If /undo can reverse it, it just runs. Deploys, migrations, git push and anything outside your project wait for a yes, with the reason shown. Scripts with harmless names get read first.

🧠 Any top model, one account, no API keys. Claude, GPT, Gemini, Qwen, DeepSeek, Kimi, GLM, Grok and 240 more, filtered to models that can actually drive an agent. Switch mid-task with Shift+↑/↓. You stop at your limit and are never billed extra.

🏁 Race models, split work across agents. /derby runs one task on three models in separate git worktrees so you can keep the best answer. /swarm splits a big task into parallel agents and merges them back in one step, and /undo still works after both.

💡 It explains the bug. When a fix depends on something the code doesn't show (an async ordering trap, a React rule, SQL injection), Darce adds one short WHY note so you catch it next time. Routine edits stay quiet.

See everything it touches

/brain opens a live map of your project in the browser. The file Darce is editing sits in the middle, with what it imports on the left and what depends on it on the right. Every edit lights up its reach, the exact diff shows below, and the activity column lists each step. It runs on your machine only.

/brain while Darce renames a function across five files: each file it edits opens in the middle with its imports on the left and its dependents highlighted on the right, the diff below, and every step in the activity column

Catch the generated look before you ship

/taste renders your app in Chrome and opens a window that pins what reads as templated: purple gradients, gradient headlines, emoji standing in for icons, filler copy like "seamlessly leverage", made-up proof, and the framework's stock palette used as-is. It also reads the page's style system (palette, type scale, radii) and how the code is built (the same class list pasted in eight files, components holding a whole screen of state). Pick Fix or Keep for each item, and Darce does the fixing while the window shows its progress, asks for approvals right there, and ends on a before/after you can drag across. When Darce writes UI itself, it runs the same checks on every edit and cleans up after itself.

/taste on a generated-looking landing page: pins drop on the purple gradients, gradient headline, emoji icons and filler copy; the System tab flags the stock Tailwind palette; Darce fixes all 28 while the window shows each step; a before/after slider ends on Before 28, Now 0

/swarm splits a task into threads that run at the same time, each in its own worktree, then merges them:

/swarm splits a task into three threads that run in parallel in their own worktrees, then merges them; 17 tests pass

How it compares

DarceClaude CodeCodex CLIOpenCodeAider
Open source✅ MIT❌✅ Apache 2.0✅ MIT✅ Apache 2.0
Models250+, one accountClaude onlyOpenAI by defaultMany, your own keysMany, your own keys
Bring your own API keysNot neededNot needed (Claude plan)Not needed (ChatGPT plan)Your keys or a subscriptionYes
Undo includes shell command changes✅❌ (docs)❌ no /undo✅❌
Asks only when it can't undo✅Permission rulesApproval modes and sandboxPermission rulesConfirms shell commands
Race models on one task✅ /derby❌❌❌❌
Parallel agents in worktrees✅ /swarmSubagents/worktreeMultiple sessions❌
Try it free, no account or key✅❌❌Free tool, needs a providerFree tool, needs a provider

Checked October 2026. The full, sourced comparison of 12 agents is at darce.dev/best-cli-coding-agents. Spotted something out of date? Open an issue.

More it can do

  • Threads. Hands research to sub-agents with their own context, several at once. /threads shows what each did.
  • Voice. /voice on and Darce speaks up during long tasks: "Before I push this, can I run the migration? It can't be undone." Quick tasks stay quiet.
  • Images. Generates icons, illustrations and hero images into your project, with transparent backgrounds on request.
  • Second opinion. /critic on has a model from another vendor review every edit. /security reviews the project or your uncommitted changes.
  • Skills and memory. Drop a SKILL.md in .darce/skills/ to teach it your team's way of working. It reads your existing Claude Code skills too, and remembers your preferences.
  • Screenshots. Paste one with Ctrl+V and Darce can see it.
  • Resume anywhere. /resume picks up any past conversation.
  • Scripts and CI. darce -p "task" prints the result and exits.

Pricing

FreeBuilderPower
Price$0$15/month$65/month
UsageDaily allowance, resets every 24 hoursAbout 7× Free, resets weeklyAbout 4× Builder, resets weekly
ModelsFast, low-cost models (Haiku, Qwen, DeepSeek, Gemini Flash…)Adds Claude Sonnet and Opus, GPT, Gemini ProEvery model

Usage is measured by what the work actually costs, so fast models go much further. Every plan gets every feature, there are no surprise bills, and you can cancel any time. Upgrade with /upgrade or at darce.dev/pricing.

Use your own OpenRouter key

Darce also runs on your own OpenRouter key, with no Darce account. Requests go straight to OpenRouter and are billed to your OpenRouter account. Add this to ~/.darcerc:

{
  "apiKey": "sk-or-v1-…",
  "apiBase": "https://openrouter.ai/api"
}

Or set DARCE_API_KEY and DARCE_API_BASE=https://openrouter.ai/api for one run. Everything in the terminal works the same, including /undo, /derby, /swarm, /taste and /brain. Image generation, voice and the second look at scripts run on Darce's server, so they need a Darce account.

Coming soon: Darce for Mac

The same agent and the same undo, in a Mac app with your files and an editor beside it, plus three gears for how much Darce teaches you as it works: Ship, Understand and Learn. Get one email when it ships.

Reference

Commands
CommandWhat it does
/undoUndo the last change, including what shell commands did (/u)
/rewindScrub through every change and rewind files and conversation (also Esc twice)
/diffEvery file Darce changed this session
/swarm <task>Split a task into parallel agents, each in its own worktree, then merge
/derby [--models a,b,c] <task>Race models on a task and apply the best result
/threads [n]This session's threads, or one thread's steps and report
/model [search]Pick or search models (Ctrl+P)
/mode auto|ask|plan|fullApproval mode (Shift+Tab cycles)
/resumeContinue a past conversation
/why on|offWHY notes (on by default)
/brainLive map of your codebase while Darce works (opens in your browser)
/taste [url]See what makes your UI look generated and choose what Darce fixes (opens a window). /taste list prints it, /taste off stops checks on edits
/voice on|offDarce talks you through long tasks (voices: erik, joe, zara, callum, charlotte)
/critic on|off [model]Second-opinion review of every edit
/security [changes]Security review of the project or your uncommitted changes
/memory [forget <text>]What Darce remembers about you and this project
/skillsAvailable skills
/suggest on|offPredict your next prompt (Tab accepts)
/compact, /clear, /costShrink context, start over, session costs
/debugTiming of requests, tools and waits in this session
/login, /account, /logoutSign in, plan and usage, switch accounts
/communityJoin the Discord

Keys: Esc stops Darce without quitting, Shift+Enter adds a line, Up/Down walks history, Ctrl+R searches it, Ctrl+O shows a step's full output.

Approval modes and safety
ModeRead-only stepsEdits and builds in the projectNetwork, installs, unknown commandsDestructive (rm -rf, sudo, force-push…)
auto (default)runrunaskask
askrunaskaskask
planrunblockedblockedblocked
fullrunrunrunrun
  • Commands Darce runs don't see environment variables that look like credentials (*_KEY, *_TOKEN, *_SECRET, DATABASE_URL…). Allow one with "passEnv": ["GH_TOKEN"] in ~/.darcerc.
  • Known secret formats are redacted from tool output before anything reaches a model.
  • Scripts the rules would run unasked (npm run x, node scripts/x.js, make y) get a second look first: Darce reads the real package.json script, and asks a fast classifier (TypeSafe Jev, via api.darce.dev) whether running it changes anything outside your machine, given the command, the script line and the start of the file it runs. It can only make Darce more careful. Turn it off with "riskCheck": false.
  • A repository's own .darcerc, instruction files and skills can't change your approval mode, endpoints or keys, and your own skills take precedence over a repository's.
  • Your key, history and sessions are stored readable only by you.
Models

The picker (/model) opens with your recent models, then OpenRouter's live most-popular ranking. It lists models that can drive a coding agent: tool calling, a 64k+ context, current generation. Any other model still works by name:

/model sonnet-5.5        # switch by name
/model kimi              # search; switches if there's one match
darce --model openai/gpt-5.6-sol
Config

Everything is optional; darce sets up ~/.darcerc on first run.

{
  "mode": "auto",
  "router": { "default": "anthropic/claude-haiku-5.5" },
  "gears": ["qwen/qwen3-coder-next", "qwen/qwen3-coder", "deepseek/deepseek-v4-pro", "anthropic/claude-sonnet-5.5"],
  "derbyModels": ["anthropic/claude-sonnet-5.5", "openai/gpt-5.6-sol", "google/gemini-3.1-pro-preview"],
  "critic": false,
  "why": true,
  "passEnv": ["GH_TOKEN"]
}
Skills

A skill is a folder with a SKILL.md:

---
name: deploy
description: How this team deploys the API. Use when asked to ship or release.
---
1. Run `make test`.
2. ...

Darce looks in ~/.darce/skills/ and ~/.claude/skills/ first, then the project's .darce/skills/ and .claude/skills/, and installed Claude Code plugins.

Community

Darce is built in public by one developer, Amer Sarhan, and it's in early beta. Questions, ideas, bugs, or something you built with it: join the Discord or type /community inside Darce. CHANGELOG.md has what's new.

If Darce saved you from a bad rm -rf, a ⭐ helps other people find it.

Contributing

git clone https://github.com/AmerSarhan/darce-cli.git
cd darce-cli
npm install
npm run dev     # run from source
npm test        # the test suite
npm run build

Issues and pull requests are welcome. Good first issues are labelled good first issue.

Star History Chart

MIT License · darce.dev

Star History Chart

MIT License · darce.dev

Keywords

coding-agent

FAQs

Package last updated on 15 Oct 2026

Related posts