A terminal-based AI agent. Supports Anthropic, OpenAI-compatible, and GLM providers. Runs on Linux, macOS, and Windows.
curl -fsSL https://raw.githubusercontent.com/Coremail/cmagent/main/install.sh | shInstalls to ~/.local/bin/cmagent. If that directory is not in your PATH, the
installer will tell you what to add to your shell profile.
Run in PowerShell:
irm https://raw.githubusercontent.com/Coremail/cmagent/main/install.ps1 | iexInstalls to %LOCALAPPDATA%\cmagent\cmagent.exe and adds it to your user PATH.
Download the binary for your platform directly from the Releases page, extract the archive, and place the binary somewhere on your PATH.
| Platform | File |
|---|---|
| Linux x86_64 | cmagent-linux-x86_64.tar.gz |
| macOS aarch64 | cmagent-macos-aarch64.tar.gz |
| Windows x86_64 | cmagent-windows-x86_64.zip |
Each archive contains a single binary (cmagent or cmagent.exe) and a
.sha256 checksum file.
# First-time setup: configure a provider (e.g. Anthropic)
cmagent init
# Interactive chat
cmagent
# Single message
cmagent -m "Explain this codebase"
# Use a specific agent profile
cmagent --agent codingcmagent updateChecks GitHub for a newer release, downloads the correct binary for your
platform, verifies the checksum, and replaces the running executable in place.
Add --yes to skip the confirmation prompt.
Config lives in ~/.cmagent/. Run cmagent init to set up providers and
preferences interactively, or cmagent config to edit settings at any time.
Provider credentials are stored as environment variables. For Anthropic:
export ANTHROPIC_API_KEY="sk-ant-..."See cmagent doctor to verify your setup.
cmagent opens an interactive TUI. cmagent -m "..." runs a single message
and exits. Both modes read from ~/.cmagent/ and write conversation history
to a local SQLite database.
cmagent gateway starts a local HTTP API server (default port 3100). The
gateway exposes a REST and WebSocket interface so other tools, scripts, or
web frontends can send messages and receive streaming responses.
# Start the gateway
cmagent gateway --port 3100
# Connect the TUI to a remote gateway instead of a local provider
cmagent tui --remote http://host:3100 --token <token>User accounts and bearer tokens are managed with cmagent gateway user add.
cmagent acp starts a stdio-based server that speaks the Agent Client
Protocol. Use this to embed cmagent as a subprocess inside another
application or IDE extension. The host sends JSON messages over stdin and
reads streaming responses from stdout.
cmagent acp --agent coding- No runtime dependencies — single static binary.
- Browser tools (
browser_query,browser_act,browser_eval) require Chrome or Chromium on the host.
MIT