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.

Client setup guide →

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.

Hub setup guide →

What's in the docs