darce-cli

darce-cli is an open-source terminal coding agent created by Amer Sarhan. Built in TypeScript with an Ink-powered terminal UI, it provides an interactive assistant designed for rapid startup and low-latency interaction directly from the developer console. In daily use, darce-cli runs as an interactive TUI supporting streaming Markdown rendering, syntax highlighting, multiline prompts, and slash commands. It interfaces with language models primarily through OpenRouter using Server-Sent Events (SSE) streaming and retry handling. The tool routes requests across models such as Qwen 3 Coder (default), Grok 4.1 Fast, Claude, and DeepSeek, allowing engineers to switch active models dynamically via a Ctrl+M keyboard picker. File and shell modifications are executed through seven built-in, Zod-validated tools: Bash, Read, Write, Edit, Glob, Grep, and WebFetch. What differentiates darce-cli from heavier coding assistants is its focus on fast startup times (sub-200ms cold start via lazy imports) combined with essential workflow utilities like git-aware context capture, automated context compaction, per-model cost tracking, session persistence, and configurable auto-approve modes. The project is open-source under a public repository structure and designed to connect to user-provided OpenRouter credentials for per-token execution costs.

Tags: ai agent, cli, coding agent, developer tools, terminal

Visit darce-cli

Key features

  • Ink Terminal User Interface — Provides streaming Markdown rendering, code syntax highlighting, multiline input, and interactive Ctrl+M model selection. - 7 Built-in Agent Tools — Implements Zod-validated tools for Bash command execution, file Read/Write/Edit operations, Glob directory walks, Grep searching, and WebFetch scraping. - OpenRouter Multi-Model Routing — Supports dynamically switching between models like Qwen 3 Coder, Grok 4.1 Fast, Claude, and DeepSeek with SSE streaming and retry logic. - Git-Aware Context & Compaction — Automatically extracts local Git state into prompt context and compacts long conversation histories to fit context windows. - Session & Cost Tracking — Persists conversation sessions across runs and calculates token spend per model in real time. - Fast Cold Startup — Bundled via tsup with lazy loading to achieve sub-200ms cold startup in terminal environments.

Use cases

Use Case: Terminal-Based Code Exploration and Edits Developers can search their workspace using Grep and Glob tools, review source files with Read, and apply targeted file modifications through the Edit tool directly within an interactive terminal session.

Use Case: Automated Testing and Command Execution Engineers can instruct the agent to run unit tests and linters via the Bash tool, analyze stack traces, and iteratively update code to resolve failures in interactive or auto-approve mode.

Use Case: Dynamic Multi-Model Workflows Developers can initiate quick edits using fast, cost-effective models like Grok or Qwen and swap to Claude or DeepSeek mid-session using the Ctrl+M picker when tackling complex architectural reasoning.

Who it is for

Designed for command-line-centric developers who want a lightweight, fast-starting AI assistant with direct access to OpenRouter models and local file operations. It is not intended for developers seeking IDE graphical integrations or managed SaaS interfaces with no API configuration.

Install guide

Installation Install globally via npm (or run directly via your package manager): bash npm install -g darce-cli Alternatively, install from source: bash git clone https://github.com/AmerSarhan/darce-cli.git cd darce-cli npm install npm run build

First Run Export your OpenRouter API key before launching the agent: bash export OPENROUTER_API_KEY="your-openrouter-api-key" darce

Example Session Launch darce inside your repository and issue a prompt to refactor or inspect code: bash darce # Inside the interactive prompt: > Find all instances of deprecated axios calls in src/ and refactor them to native fetch Press Ctrl+M at any time to switch active models between Qwen, Grok, Claude, or DeepSeek.

Part of CLI Coding Agents

Categories: AI Coding Agents, Code Assistants, Developer Tools

Related CLI agents

  • Warp — Warp is an AI-integrated terminal emulator and CLI workspace built by warpdotdev. Engineered in Rust with native GPU rendering, Warp…
  • Amazon Q Developer CLI — Amazon Q Developer CLI is an open-source command-line coding assistant developed by Amazon Web Services (AWS). Built primarily in Rust,…
  • CLAII — CLAII is an open-source terminal-based AI coding assistant developed by agencyswarm. Built in Python, it serves as a lightweight CLI…
  • Even — Even is an agent-native desktop workspace and orchestration environment developed by Todience, Inc. It integrates a native terminal, an embedded…
  • Repomon — Repomon is an open-source developer harness and repository companion tool created by Ali Hamza Azam. Built with a Rust core…
  • Construct — Construct is an open-source terminal-based orchestrator and multi-harness manager developed by the construct-worlds organization. It functions as a meta-tool and…
  • AI Tools
  • Categories
  • Industries
  • CLI Coding Agents
  • MCP Servers
  • MCP Categories