It appears on the home page and opens for votes when its launch week starts.
Mercury CLI
Terminal coding agent with a debugger and syntax-tree rewrites
FreeCLIOpen SourceAI3 impressionslaunches Dec 11 comment
Comments
>log in to comment
Mercury CLI is an open-source coding agent for the terminal. One developer, @dubsthedev, built it in seven months: 59 public releases so far. The part to try first is the debugger. When a test fails, the agent launches it into a debug session, stops at a breakpoint and reads the live value before it changes any code. The clip on this page is one such run. Two things he wants to hear: which language or debug adapter it should handle next, and anything in the install that tripped you up.
Mercury CLI is an open-source (Apache-2.0) coding agent for the terminal on macOS, Linux and Windows, built by @dubsthedev.
- Debugger: when a test fails, the agent launches it into a debug session, stops at a breakpoint and reads the live value. debugpy and js-debug ship in the install; dlv, lldb-dap and gdb 14+ are found on PATH.
- Syntax-tree search and rewrite in 57 languages, with a diff shown before anything is written.
- Language servers: TypeScript and Pyright ship in the install for go-to-definition and previewed renames.
- Models: cloud providers or local servers (Ollama, LM Studio, vLLM, llama.cpp), switched with /model in the middle of a chat.
- Several sessions side by side, Profiles with separate settings and memory, and work handed to crewmates on other models.
Install (git is the one prerequisite):
curl -fsSL https://mercury-cli.ai/install | sh
irm https://mercury-cli.ai/install.ps1 | iex
brew install Whq02/mercury/mercury (macOS, Linux x64)
npm install -g mercury-tech-cli
More CLI tools →80 free dev tools →
- Run AI coding agents directly in your terminal
- Edit code, run tests and use a built‑in debugger
- Run parallel sessions and mix model providers
Mercury CLI is an open-source terminal AI coding agent with debugging, test automation, and syntax-tree editing.
- for
- Developers who work in the terminal and want AI assistance for coding, testing and debugging.
- pricing
- open source
- license
- Apache-2.0
Key features
- Debugger — Launches failed tests directly into a Debug Adapter Protocol session with breakpoints and live variable inspection.
- Syntax-tree Search & Edit — Structural search (AstSearch) and rewrite (AstEdit) across 57 languages with a diff preview before changes.
- Multi-model Support — Switch between OpenAI, Anthropic, Google, local models (Ollama, LM Studio, vLLM, llama.cpp) mid-chat.
- Language Server Integration — Built-in Pyright and TypeScript LS; uses clangd, rust-analyzer, gopls, etc., when on PATH.
- Test Automation — Discovers, runs and reruns failed tests for pytest, unittest, node:test, vitest, jest, Go and cargo.
- Session Memory & Scheduling — Persistent project memory, scheduled prompts, and hybrid retrieval with on-device embeddings.
Use cases
- Debug a failing Python or Node test directly from the terminal.
- Perform a structural code refactor across a codebase using AstEdit.
- Run local LLMs for code generation without sending data to the cloud.
- Get go-to-definition and hover info via integrated language servers while coding.
- Schedule recurring AI-driven code reviews or linting sessions.
Mercury CLI vs alternatives
OpenCode | Aider | Mastra | n8n | ||
|---|---|---|---|---|---|
| Best for | Terminal-native AI coding assistant | Open-source terminal AI coding | Terminal AI pair programming | TypeScript AI agent framework | AI workflow automation |
| Pricing | Open source | Free | Free | Free | Subscription |
| DevHunt upvotes | 1 | 0 | 0 | 1 | 0 |
| Launched | Dec 2026 | — | — | — | — |
- Mercury CLI vs OpenCode: OpenCode is also an open-source terminal AI coding agent but focuses on a different architecture and feature set.
- Mercury CLI vs Aider: Aider provides AI pair programming in the terminal without built-in debugging or syntax-tree editing.
- Mercury CLI vs Mastra: Mastra is a TypeScript framework for building AI agents, not a terminal-based coding assistant.
- Mercury CLI vs n8n: n8n automates workflows with AI but does not offer an integrated terminal coding environment.
Mercury CLI FAQ
Do I need any dependencies to install Mercury CLI?+
Only git is required; installation scripts are provided for macOS, Linux, Windows, Homebrew and npm.
Can I use my own locally hosted model?+
Yes, you can run models via TensorFold, Ollama, LM Studio, vLLM or llama.cpp and switch with the /model command.
What languages are supported for syntax-tree search and rewrite?+
Structural search and edit work in 57 languages; the pattern is written in the target language itself.
How does the debugger integrate with existing test frameworks?+
When a test fails, Mercury CLI automatically launches the debugger for pytest, unittest, node:test, vitest, jest, Go or cargo.
Is there a way to keep sessions and git worktrees alive in the background?+
Yes, sessions persist with background git worktree management and can be woken up on a schedule.
What authentication is needed for cloud model providers?+
Sign in once per provider; multiple accounts stay signed in simultaneously and can be switched within a session.
Summarized by DevHunt from mercury-cli.ai · Nov 28, 2026. Details may change; check the official site.
OpenCode
Aider
Mastra
n8n


