Getting Started
muxd is an AI coding agent that lives in your terminal. It connects to LLM APIs (Anthropic Claude, OpenAI, Mistral, Grok/xAI, Google AI, Z.AI, Fireworks AI, DeepInfra, Ollama, and any OpenAI-compatible API) to help you read, write, and edit code through a streaming TUI interface.
Sessions are persisted in a local SQLite database so you can resume, branch, and search conversations across terminal sessions.
Architecture
muxd has three binaries. Run them all on one machine for local dev, or distribute them across servers for a team setup.
| Binary | Role |
|---|---|
muxd | Terminal TUI client |
muxd-daemon | Agent server (sessions, tools, model calls) |
muxd-hub | Hub coordinator (nodes, workers, web dashboard) |
All three share one config file at ~/.config/muxd/config.json.
Install
Linux / macOS:
curl -fsSL https://raw.githubusercontent.com/batalabs/muxd/main/install.sh | bash
Windows (PowerShell):
irm https://raw.githubusercontent.com/batalabs/muxd/main/install.ps1 | iex
From source (Go 1.25+):
git clone https://github.com/batalabs/muxd.git
cd muxd
go build -o /usr/local/bin/muxd .
go build -o /usr/local/bin/muxd-hub ./cmd/muxd-hub
go build -o /usr/local/bin/muxd-daemon ./cmd/muxd-daemon
Prerequisites: git (for undo/redo) and an API key for at least one provider.
Quick start
One machine: daemon + TUI
Everything local. Two terminals, no hub.
# Terminal 1: start the daemon
muxd-daemon
# Terminal 2: start the TUI (auto-discovers the daemon)
muxd
Set your API key inside the TUI:
/config set anthropic.api_key <your-key>
With a hub: multi-machine
# Server: start the hub (prints token + QR code)
MUXD_HUB_BIND=0.0.0.0 muxd-hub
# Server: start the daemon (registers with hub)
MUXD_HUB_URL=http://localhost:4097 \
MUXD_HUB_NODE_TOKEN=<token> \
MUXD_BIND=0.0.0.0 \
muxd-daemon
# Your laptop: connect to the hub
muxd --remote <server-ip>:4097 --token <token>
Open http://<server-ip>:4097 in your browser for the web dashboard.
What's in the docs
- Client setup — local daemon, CLI flags, TUI features, service install
- Hub setup — multi-machine coordination, web UI, workers, Docker
- Commands — full slash command reference
- Configuration — API keys, model aliases, env vars, pricing
- Tools — all 41 built-in agent tools
- Features — deep-dives on activity, permissions/transfers, memory, hub dispatch, and more
- MCP Servers — extend the agent with external tool servers
- Architecture — codebase internals for contributors
- Undo / Redo — how git-based checkpoints work
- Project Memory — persist project facts across sessions
- Contributing — build, test, and code style guide