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 (Zhipu), 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.
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+):
go install github.com/batalabs/muxd@latest
Prerequisites: git (for undo/redo) and an API key for at least one provider.
Two ways to run muxd
Client
The default mode. Run muxd on a single machine — your laptop, desktop, or a remote client. The TUI connects to a local daemon over HTTP/SSE.
muxd # new session
muxd -c # resume latest session
muxd --daemon # headless daemon mode
Use client mode when you have one machine running muxd, or when connecting to a single remote daemon from your phone or another terminal.
Hub
Run a hub coordinator to manage multiple muxd instances across machines. The hub tracks registered nodes, proxies requests between them, and aggregates logs — all from a single TUI.
muxd --hub # start hub coordinator
muxd --remote host:4097 --token x # connect to hub from another machine
muxd --hub-info # show hub connection details
Use hub mode when you have muxd running on multiple machines and want centralized management.
What's in the docs
- Commands: full slash command reference
- Configuration: API keys, model aliases, pricing
- Tools: all 37 built-in agent tools
- 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