A single-binary Go CLI that discovers tmux sessions running Claude Code and lets you attach from your phone over SSH.
- Go 1.24+ (for building from source)
- tmux installed on the host machine
- An SSH client on your phone (Terminus, Blink Shell, Prompt 3)
# Clone and build
git clone <repo-url>
cd remote-tmux-access
make build
# Copy to your PATH
cp rta /usr/local/bin/
# Or install directly via Go
go install .1. Enable SSH on your Mac
rta setup sshThis checks whether Remote Login is enabled and walks you through fixing anything that's off. It's read-only — it won't change your system config, just tells you what to do.
2. Auto-launch on SSH login
rta setupThis adds a small block to your .zshrc that runs rta automatically when you SSH in. Local terminal sessions are unaffected. To undo:
rta setup --undo3. Connect from your phone
Open Terminus (or any SSH app) on your iPhone and SSH into your Mac:
ssh youruser@your-mac-ip
rta launches automatically and shows your tmux sessions:
Claude Code Sessions
> webapp ~/projects/webapp
api-server ~/projects/api
Other tmux Sessions
scratch ~/tmp
[Enter] attach [r] refresh [q] quit
Select a session and press Enter — you're in.
rtaLaunches the TUI session picker. If only one Claude Code session exists, it attaches directly — no menu needed.
rta attach webapp # exact or substring match
rta attach web # matches "webapp"rta status # table output
rta status --json # JSON outputExample output:
SESSION CLAUDE DIR ATTACHED
webapp * ~/projects/webapp yes
api-server * ~/projects/api
scratch ~/tmp
rta Launch TUI (or auto-attach if one Claude session)
rta attach <name> Attach by name (substring match)
rta status List sessions (one per line)
rta status --json List sessions as JSON
rta setup Add auto-launch to shell profile
rta setup --undo Remove auto-launch
rta setup ssh Check SSH server configuration
- Queries
tmux list-sessionsto find all sessions - For each session, gets the pane PIDs via
tmux list-panes - Walks the process tree (single
pscall) looking forclaudedescendants - Presents sessions in a Bubble Tea TUI, sorted by Claude detection
- On selection, hands terminal control to
tmux attach-sessionviasyscall.Exec
Detaching (Ctrl-b d) returns you to the rta menu. The tmux session keeps running.
rta assumes direct network access (LAN, VPN, or Tailscale). For access over the public internet, layer one of:
- Tailscale — zero-config mesh VPN, works great with iOS
- Cloudflare Tunnel — expose SSH without opening ports
- SSH port forwarding —
ssh -Rthrough a jump host