Mercury CLI
Terminal-native AI coding agent environment with multi-provider models, a real debugger, test runner, language servers and parallel sessions.
At a Glance
About Mercury CLI
Mercury CLI (npm package mercury-tech-cli) is a terminal AI coding agent for software repositories on macOS, Linux and Windows. The agent reads a codebase, edits files, runs builds and tests, and steps through failures in a debugger while showing each step. Users choose the model provider, tools and permissions per session.
What It Is
Mercury CLI is a terminal-native environment for AI-assisted development. Sessions keep their conversation, model, permissions and workspace, and several can run in parallel. Any session can dispatch crewmates in isolated git worktree checkouts on other providers' models. The docs state that the CLI, the TypeScript and Python SDKs and the VS Code extension are open source under Apache-2.0.
Tools the agent uses
- A Debug tool that speaks the Debug Adapter Protocol, with breakpoints, stepping, stack and variable inspection.
- A Test tool that discovers, runs and reruns tests for pytest, unittest, node:test, vitest, jest, Go and cargo, and sends a failing test into the debugger.
- Structural search and edit (AstSearch, AstEdit) that match code by its parsed shape.
- Language server access (LspRead) for definitions, references, hover, symbols and call hierarchy. Pyright is bundled, and others are used when on PATH.
- A desktop driver that lets the model see the screen and operate the mouse and keyboard on macOS and Windows.
- Web search that works without an API key.
Providers and local models
Users sign in once per company and stay signed in to many providers, including OpenAI, Anthropic, Google, DeepSeek, OpenRouter and Hugging Face, switching mid-session. Local models run through TensorFold, Ollama, LM Studio, vLLM or llama.cpp, on a local network server, or on rented GPU pods.
Memory, automation and extension
Each project keeps a memory with pinned rules and branch-relevant facts, retrieved with on-device semantic embeddings. Sessions can be scheduled to wake at set times. Extensions add commands, agents, hooks and servers. It can run headless, in VS Code or ACP editors, via the SDK, and as an MCP server. A mercury tune command trains a LoRA adapter on project sessions.
Community Discussions
Be the first to start a conversation about Mercury CLI
Share your experience with Mercury CLI, ask questions, or help others learn from your insights.
Pricing
Open Source
Free, open-source CLI and SDKs. Hosted model usage, provider subscriptions and rented GPU infrastructure are paid separately where applicable.
- Apache-2.0 license
- Local CLI for macOS, Linux and Windows
- Bring your own model provider credentials
- Support for local and self-hosted models
- Parallel agent sessions and isolated Git worktrees
Capabilities
Key Features
- Parallel sessions with a session board
- Crew of agents in isolated git worktrees
- Multi-provider model support with per-session switching
- Debug Adapter Protocol debugger
- Test runner for pytest, jest, vitest, Go, cargo and more
- Structural code search and edit
- Language server integration
- Local model hosting via TensorFold, Ollama, llama.cpp
- Screen and desktop control
- Keyless web search
- Persistent project memory with hybrid recall
- Scheduled sessions
- Permission modes and workspace trust
- Extensions and MCP/skills presets
- Model fine-tuning on sessions (mercury tune)
- Advisor second-model notes
- Apollo Mode spec-to-prototype
- TypeScript and Python SDKs
