# muxscale — Full Documentation

> Unblock your coding agents from your iPhone, iPad, or Apple Watch, straight to your own Mac or Linux machines over your own Tailscale network.

Canonical URL: https://muxscale.com/
GitHub (MIT-licensed daemon): https://github.com/moaazsidat/muxscale
Contact: hello@muxscale.com

---

## What muxscale Is

Coding agents run for minutes and then block — on a permission prompt, a clarifying question, or a failing check. muxscale connects your iPhone, iPad, and Apple Watch directly to the coding agents running on your own Mac and Linux machines so you can:

1. **See what needs you first**: Every running agent across all your machines appears in one list, sorted by sessions waiting for approval or input.
2. **Approve tool calls safely**: Permission prompts stay held open on your machine until you decide. Your tap goes back as the agent's native allow/deny decision rather than blind keystrokes.
3. **Reply without misfires**: Every reply is pinned to the question or turn it answers. If the agent moved on while you were typing, muxscale shows what changed before sending.
4. **Pick up already-running sessions**: No need to restart agents under a wrapper. muxscale discovers sessions already open in iTerm2, kitty, or tmux (or started with `muxscale run` / shims) with their full transcript.
5. **Drop into a live terminal or side-by-side shell**: Type directly keystroke-by-keystroke into the agent's own terminal or open your own shell in the agent's working directory, with zsh autosuggestions, completion, sticky Ctrl/Alt keys, and copy/paste.
6. **Browse project files and diffs**: Inspect what the agent changed and read project files from your phone.
7. **Unblock from Apple Watch**: Review waiting sessions on your wrist, pick question options with the Digital Crown, or dictate a reply (transcribed on-device by your iPhone) and double-tap to send or allow.

---

## Requirements

- **Machine**: macOS or Linux computer running your coding agents.
- **Phone / Watch**: iPhone (and optional iPad / Apple Watch) via Apple TestFlight beta (sign up at https://muxscale.com/#early-access). There is no Android app yet.
- **Tailscale**: Free for personal use on your phone and machine, signed into the same Tailscale account. If your machine does not have the Tailscale app installed, `muxscale connect` starts an embedded Tailscale node and prints a sign-in link.

---

## Installation & Setup

### 1. Install the daemon

```sh
curl -fsSL https://muxscale.com/install.sh | sh
```

Installs a single signature-verified binary to `~/.local/bin/muxscale` without requiring `sudo`.

### 2. Start the daemon and configure hooks

```sh
muxscale up
```

Runs muxscale in the background (and at login) and installs hooks/extensions for installed agents:
- **Claude Code**: Adds hooks to `~/.claude/settings.json` (backs up the file first and preserves existing hooks).
- **Codex**: Adds hooks to `~/.codex/hooks.json` (trust once inside Codex via `/hooks`).
- **Antigravity**: Adds hooks to `~/.gemini/config/hooks.json` (preserves existing hooks).
- **omp**: Installs a single extension file in omp's extension folder.

Run `muxscale down` at any time to stop the daemon and cleanly remove all hooks and extensions it added.

### 3. Connect over Tailscale

```sh
muxscale connect
```

Exposes the daemon over HTTPS on your Tailscale tailnet and prints a QR code.

If `muxscale connect` reports that HTTPS is off:
1. Open Tailscale DNS settings: https://login.tailscale.com/admin/dns
2. Enable **MagicDNS** and **Enable HTTPS**.
3. On Linux, if `muxscale status` reports *access denied* for TLS certificates, run `sudo tailscale set --operator=$USER` once, then `muxscale up`.
4. Run `muxscale connect` again.

### 4. Pair your iPhone

Sign into the Tailscale app on your iPhone with the same account, open muxscale, and scan the QR code. Already-running sessions appear within seconds. You can also tap **Try it with sample sessions** on the app's first screen to explore without pairing.

---

## Supported Coding Agents

| Agent | Knows when it's your turn | Approve from phone | Reply with a sentence | Queued messages | Full transcript |
| --- | --- | --- | --- | --- | --- |
| Claude Code | Yes (native hooks) | Yes | Yes | Yes | Yes |
| Codex | Yes (native hooks) | Yes | Yes | Preview (terminal screen) | Yes |
| Antigravity | Yes (native hooks) | Yes | Yes | No | Yes |
| omp | Yes (extension) | Yes | Yes | Yes | Yes |
| OpenCode | Inferred (transcript) | No | Yes | Yes | Yes |
| Hermes Agent | Inferred (transcript) | No | Yes | No | Yes |

- **Early support**: pi, Gemini CLI, GitHub Copilot CLI, Kimi Code, Kiro CLI.
- **Generic discovery**: Any other CLI coding agent running in iTerm2, kitty, tmux, or under `muxscale run` (such as Aider, Amp, Cursor CLI, or Goose) still shows up in the session list.
- *Inferred* state is read from the agent's transcript and labeled as a guess in the app.
- Replies reach agents running in iTerm2, kitty, tmux, or under `muxscale run` / `muxscale up --shims`.

---

## Common CLI Commands

- `muxscale up`: Start the background daemon, register login startup, and install agent hooks.
- `muxscale down`: Stop the daemon and remove all hooks/extensions installed by muxscale.
- `muxscale connect`: Bind over Tailscale HTTPS and print the pairing QR code.
- `muxscale status`: Show daemon health, reachable URL, Tailscale HTTPS state, and active reply transports.
- `muxscale ls`: List all discovered coding agent sessions on this machine.
- `muxscale run <cmd>`: Launch an agent or command inside muxscale's PTY wrapper for direct replies and full screen streaming from any terminal emulator.
- `muxscale audit`: Read the local audit log of every approval and reply sent from your phone.

---

## Architecture, Privacy & Security

- **Direct device-to-device transport**: Traffic goes directly from your iPhone to your Mac/Linux daemon over your Tailscale tailnet with end-to-end WireGuard encryption and Tailscale-issued HTTPS certificates.
- **No cloud relay & no muxscale account**: muxscale's servers are never in the data path and never receive your code, prompts, transcripts, or terminal output.
- **Identity-based access control**: Tailscale identifies the connecting user and device; muxscale admits only the Tailscale logins you allow.
- **Local storage & audit trail**: Sessions, transcripts, settings, and every approval/reply audit record live in one local file on your machine.
- **Open-source daemon**: Every line of the daemon running on your machine is MIT-licensed at https://github.com/moaazsidat/muxscale.
- **Website privacy**: https://muxscale.com sets no cookies and uses cookieless Cloudflare Web Analytics. The only personal data collected by the website is the email address submitted for a TestFlight invite.

---

## Troubleshooting

### The app can't reach my computer
- Confirm Tailscale is connected on your iPhone using the same account as your computer.
- Ensure the computer is awake.
- Run `muxscale status` on the computer for exact diagnostics and remediation steps.
- For certificate errors, enable MagicDNS + HTTPS in https://login.tailscale.com/admin/dns (and on Linux run `sudo tailscale set --operator=$USER`).

### I can't reply to a session in kitty
Add the following to `kitty.conf` and restart kitty:
```conf
allow_remote_control yes
listen_on unix:/tmp/kitty
```
Alternatively, run sessions inside `tmux` or via `muxscale run`.

### An agent doesn't show up
Run `muxscale ls` on the computer to inspect discovered sessions, or email hello@muxscale.com with the agent name and how you launched it.

---

## Frequently Asked Questions

**Why do I need Tailscale?**
Your phone connects directly to your machine over your own Tailscale network, encrypted end to end, with no muxscale server in between. Tailscale also authenticates which person and device is connecting. It is free for personal use.

**What if my machine doesn't have Tailscale?**
`muxscale connect` includes an embedded Tailscale client and prints a login link. Your phone still needs the Tailscale app.

**Can muxscale see my code?**
No. Sessions, transcripts, and the audit log stay on your machine and travel only to your phone over your tailnet.

**What does it change on my machine?**
It adds hooks to Claude Code's `settings.json` (backed up first), Codex's `hooks.json`, and Antigravity's `hooks.json`, and places one extension file in omp's folder. `muxscale down` removes all of it cleanly.

**Do I have to restart agents I already have running?**
No. muxscale picks up sessions already open in iTerm2, kitty, or tmux with full history and replies. Hooks take effect for sessions started afterwards; until then, state is inferred from the transcript.

**Will it work on office or hotel Wi-Fi?**
Anywhere Tailscale works, muxscale works.
