mux = multiplex your sessions
d = daemon (Unix tradition)daemon
Free & Open Source

AI coding agent that lives in your terminal

Connect any model from any provider. Claude, GPT, Mistral, Grok, Fireworks, Ollama, and any OpenAI compatible API. Branch, fork, undo, and resume sessions anywhere.

curl -fsSL https://raw.githubusercontent.com/batalabs/muxd/main/install.sh | sh

Features

41 Built In Tools

File ops, bash, grep, web search, HTTP, SMS, git, todos, patches, plan mode, memory, hub dispatch, custom tools, consult, subagents, and LSP code intelligence. The agent picks the right tool.

Learn more

Any Model

Connect Claude, GPT, Mistral, Grok, Fireworks, Ollama, or any OpenAI compatible API. Switch models during a session. Assign cheaper ones for titles and compaction.

Learn more

Branch & Fork

Fork any conversation to explore an alternative approach without losing your original thread. Compare strategies side by side and resume whichever branch works best.

Learn more

Git Undo / Redo

Every agent turn creates a git checkpoint. Roll back any change with /undo or reapply with /redo. You stay in control of every line the agent writes to your codebase.

Learn more

Mobile, Hub & Web

Connect from your phone with the muxd iOS app, manage machines through a hub coordinator, or monitor everything from the web dashboard. Scan a QR code to pair and chat from anywhere.

Learn more

Project Memory

Persist project specific facts across sessions. The agent remembers your conventions, architecture decisions, and gotchas. With a hub, memory syncs across all your nodes.

Learn more

Always On Daemon

The muxd-daemon runs as a background service that survives terminal closes, SSH disconnects, and reboots. Titles sessions automatically, schedules recurring tasks, and keeps running headless.

Learn more

Second Opinion

Uncertain about an approach? The agent asks a different model for a second opinion. Response shown in a separate view with a crystal ball emoji. Configure any model as the reviewer.

Learn more

Smart Compression

Tiered context compaction at 60k, 75k, and 90k tokens. Tool results compressed first, then old turns, then a full summary. Preserves key decisions while cutting costs.

Learn more

Inline Diffs

Every file edit shows a styled red and green diff right in the chat stream. See exactly what the agent changed without switching to your editor. Large diffs truncated automatically.

Learn more

Read Any Document

Attach or reference PDFs, Word docs, Excel spreadsheets, PowerPoint slides, HTML, CSV, JSON, and XML files. The agent extracts text automatically. No plugins required.

Learn more

Code Intelligence

Go-to-definition, references, hover, diagnostics, and symbol search via LSP. Supports Go, TypeScript, Python, Rust, and C/C++. Language auto-detected from file extension.

Learn more

An agent that extends itself

Ask for a tool. muxd builds and runs it.

muxd
create a tool that checks if my API is healthy
Calling tool_create
✓ Tool "api_health" created and saved

Create with one prompt

Describe what you need. The agent writes the command template, defines parameters, and registers it. All in one step.

Run now, persist later

New tools can run in the same turn and can be saved for future sessions.

Same security model

Custom tools follow the same safety model and are blocked when bash is disabled.

See custom tools docs

How muxd works

A direct, local first agent loop. No cloud middlemen.By default, your code stays on your machine.

Your Workflow

Multiple ways to connect.

Terminal TUImuxd MobileHubDaemon API

muxd Daemon

PromptModelToolsResult

Local SQLite

Private session memory

41 Built In Tools

Bash, Web, Git, LSP & more

Direct API

Any LLM

Direct calls to Claude, GPT, Mistral, Grok, Fireworks, Ollama, or any compatible endpoint. No middleman.

100% Local

Your Files

Changes happen securely on your machine with Git checkpoints for easy undo/redo.

Scale across machines with Hub

Run the muxd-hub coordinator to manage daemons across multiple machines. Connect from any TUI, mobile app, or web browser through a single endpoint.

Connect Anywhere

One hub endpoint for all your machines.

Terminal TUImuxd MobileWeb Dashboard

muxd Hub

AuthRouteProxy

Token Auth

Auto-swaps credentials

Heartbeats

Node health monitoring

dev-server

muxd-daemon

staging

muxd-daemon

prod-worker

muxd-daemon

Manage from anywhere

The muxd iOS app connects to your daemons and hubs. Chat with your agent, switch between machines, and monitor sessions on the go.

muxd mobile app showing connected clients and hub

Manage all your machines

muxd mobile app chat with rich markdown rendering

Chat with rich formatting

Download on the App Store

Your code stays on your machine

Zero telemetry. Zero data collection. Sessions live in local SQLite. API calls go directly to your chosen provider.

muxd is local first: no cloud service sits between you and your model, and nothing is phoned home. Your source code, conversations, and API keys stay local unless you explicitly connect remote daemons or hubs. Sessions are stored in local SQLite, and the codebase is fully open source under Apache 2.0.