MCPcopy Index your code
hub / github.com/andyrewlee/amux

github.com/andyrewlee/amux @v0.0.19

Chat with this repo
repository ↗ · DeepWiki ↗ · release v0.0.19 ↗ · + Follow
3,575 symbols 17,568 edges 494 files 1,270 documented · 36%
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

Screenshot 2026-01-20 at 1 00 23 AM

TUI for easily running parallel coding agents

Latest release License Go version Discord

Quick start · How it works · Features · Configuration

amux TUI preview

What is amux?

amux is a terminal UI for running multiple coding agents in parallel with a workspace-first model that can import git worktrees.

Prerequisites

amux requires tmux (minimum 3.2). Each agent runs in its own tmux session for terminal isolation and persistence.

Quick start

brew tap andyrewlee/amux
brew install amux

Or via the install script:

curl -fsSL https://raw.githubusercontent.com/andyrewlee/amux/main/install.sh | sh

Or with Go:

go install github.com/andyrewlee/amux/cmd/amux@latest

Then run amux to open the dashboard.

How it works

Each workspace tracks a repo checkout and its metadata. For local workflows, workspaces are typically backed by git worktrees on their own branches so agents work in isolation and you can merge changes back when done.

Architecture quick tour

Start with internal/app/ARCHITECTURE.md for lifecycle, PTY flow, tmux tagging, and persistence invariants. Message boundaries and command discipline are documented in internal/app/MESSAGE_FLOW.md.

Features

  • Parallel agents: Launch multiple agents within main repo and within workspaces
  • No wrappers: Works with Claude Code, Codex, Gemini, Amp, OpenCode, and Droid
  • Keyboard + mouse: Can be operated with just the keyboard or with a mouse
  • All-in-one tool: Run agents, view diffs, and access terminal

Configuration

Platform Support

AMUX requires tmux and is supported on Linux/macOS. Windows is not supported.

Create .amux/workspaces.json in your project to run setup commands for new workspaces:

{
  "setup-workspace": [
    "npm install",
    "cp $ROOT_WORKSPACE_PATH/.env.local .env.local"
  ]
}

Workspace metadata is stored in ~/.amux/workspaces-metadata/<workspace-id>/workspace.json, and local worktree directories live under ~/.amux/workspaces/<project>/<workspace>.

Development

git clone https://github.com/andyrewlee/amux.git
cd amux
make run

Operations

  • Logs are written to ~/.amux/logs/amux-YYYY-MM-DD.log (default retention 14 days). Override retention with AMUX_LOG_RETENTION_DAYS.
  • Perf profiling: set AMUX_PROFILE=1 to emit periodic timing/counter snapshots; adjust cadence with AMUX_PROFILE_INTERVAL_MS (default 5000).
  • pprof: set AMUX_PPROF=1 (or a port like 6061) to expose net/http/pprof on 127.0.0.1.
  • Debug signals: set AMUX_DEBUG_SIGNALS=1 and send SIGUSR1 to dump goroutines into the log.
  • PTY tracing: set AMUX_PTY_TRACE=1 or a comma-separated assistant list; traces write to the log dir (or OS temp dir if logging is disabled).

Extension points exported contracts — how you extend this code

SessionFetcher (Interface)
SessionFetcher is the subset of tmux operations needed by activity detection. [7 implementers]
internal/app/activity/types.go
CriticalExternalMsg (Interface)
CriticalExternalMsg marks messages that must bypass the normal lossy external message queue and go through the critical [3 …
internal/ui/common/external_msg.go
PanicHandler (FuncType)
PanicHandler receives panic details from recovered goroutines.
internal/safego/safego.go
Option (FuncType)
Option configures supervisor worker behavior.
internal/supervisor/supervisor.go
ResponseWriter (FuncType)
ResponseWriter is called when the terminal needs to send a response back to the PTY
internal/vterm/vterm.go
TmuxOps (Interface)
TmuxOps defines tmux operations used by the app. [3 implementers]
internal/app/services.go
NonEvictingCriticalExternalMsg (Interface)
NonEvictingCriticalExternalMsg marks critical messages that should drop themselves when the critical queue is full inste [2 …
internal/ui/common/external_msg.go
WorkspaceStore (Interface)
WorkspaceStore is the minimal interface used by the app for workspace metadata. [2 implementers]
internal/app/services.go

Core symbols most depended-on inside this repo

ID
called by 389
internal/data/workspace.go
Write
called by 296
internal/vterm/vterm.go
New
called by 278
internal/vterm/vterm.go
Contains
called by 177
internal/ui/common/hit.go
Run
called by 170
internal/app/services.go
Error
called by 144
internal/git/operations.go
NewWorkspace
called by 116
internal/data/workspace.go
Warn
called by 87
internal/logging/logger.go

Shape

Function 2,030
Method 1,216
Struct 277
TypeAlias 35
Interface 10
FuncType 7

Languages

Go100%

Modules by API surface

internal/messages/messages.go67 symbols
internal/app/app_tmux_activity_test.go50 symbols
internal/app/services.go40 symbols
internal/ui/sidebar/terminal.go32 symbols
internal/ui/center/model_tab.go31 symbols
internal/tmux/tmux.go29 symbols
internal/tmux/tmux_integration_test.go28 symbols
internal/vterm/vterm_scroll.go26 symbols
internal/vterm/prepend_scrollback_test.go26 symbols
internal/ui/sidebar/tabs.go26 symbols
internal/ui/common/settings.go26 symbols
internal/git/operations.go26 symbols

For agents

$ claude mcp add amux \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact