v0.1.16 · macOS & Linux · MIT · written in Rust

Everyone brings their
own terminal.

p2pmux is a peer-to-peer terminal multiplexer. Every pane runs on the machine of whoever opened it — their shell, their toolchain, their env, their AI subscription. Hop into a teammate's pane and you get a real shell on their machine, without ever holding their keys.

$ curl -fsSL https://p2pmux.com/install.sh | sh
Source on GitHub →

One binary. Nothing to sign up for, no account, no server of ours in the data path. The script is served as plain text so you can read it first.

userA@mac — p2pmux
userB joins a p2pmux session with a ten-character code, opens a pane on their own machine, then takes control of userA's pane and runs a command in it
Two real clients. userB joins with the ten-character code, opens a pane of their own, then takes control of userA's pane and runs a command in it. The pane titles say who hosts what.

Ten characters is the whole invite.

Ctrl+S gives you a line ready to paste into a chat window. Your teammate runs it on their own machine, on their own network, and lands in your grid. A Mac and a Linux box work the same session; nobody has to match anybody.

The code is good for six hours, and it is backed by a ticket that contacts no service at all — for when our rendezvous is down.

$ p2pmux                    # you host; Ctrl+S shows the line to send
$ p2pmux join 4KP7Q-M2XRW   # them, on their own machine

Every other way collapses onto one box.

SSH, tmux, tmate, screen sharing, cloud dev environments — one machine runs everything, one person's toolchain is the only one in the room, and one person's keys pay for it. Whoever joins arrives empty-handed.

p2pmux keeps the machines separate and joins the surface instead. You bring your laptop, your dotfiles, your language versions and your Claude subscription. Your teammate brings theirs. Both setups are live in the same grid at once, and either of you can reach into the other's.

Concretely: your teammate opens a pane on your machine and runs Claude Code on your subscription — they drive it, you pay for it, they never see the key. The pane beside it is on their box, with their Python env and their GPU, and you drive that one without installing a thing.

EVERYTHING ELSE one machine one set of keys everyone else arrives empty-handed P2PMUX one shared surface three machines three toolchains three subscriptions

Every agent you're running. Every machine you own. One screen.

Bare p2pmux opens the inbox: every Claude Code, Codex, Cursor, Pi and OpenCode process running on every machine in the session, sorted by which one is blocking you. Press Enter on a row and you are typing in that terminal — on whichever machine it lives on. Ctrl+O brings you back.

sam@laptop — p2pmux
                                                                    │ 
 Agents · 1 needs you                                               │ MACHINES · 4
›● desktop    claude                           needs you      2m14s │ 
   wants to run: rm -rf node_modules                                │ ● laptop
   work/api · tab 1 · pane 1                                        │   this machine · 1 agent
                                                                    │ 
 ✓ laptop     claude                           done          31m04s │ ○ oldbox
   6 files changed, tests pass                                      │   asleep
   scratch/demo · tab 3 · pane 1                                    │ 
                                                                    │ ◇ desktop
 ⠋ droplet    opencode                         running        8m41s │   joined this session · 1…
   running the migration against staging                            │ 
   srv/checkout · tab 2 · pane 1                                    │ ◇ droplet
                                                                    │   joined this session · 1…
                                                                    │ 
                                                                    │ ─────────────────────────
                                                                    │ a  add a machine
 enter open   m pick machine   a add machine   n new terminal   q quit
01

Not just this laptop

Your desktop, your droplets, your teammate's box. Agent supervision that stops at the edge of one machine stops one machine too early.

02

Hooks, never guesswork

needs you comes from the agent's own hooks — never from guessing at output timing. Run p2pmux setup once; p2pmux doctor checks it.

03

Honest about what it can't see

An agent with no hooks wired up says state unknown — no hooks on its own row, rather than being guessed about.

04

Agents outside p2pmux too

A bot under systemd, something in a stray tmux — it shows up in the inbox with what it is doing, and Enter opens its own chat client on its own machine.

What you actually get.

A real multiplexer, not a screen share. Tabs, splits, nesting, scrollback, mouse — with the panes scattered across everybody's hardware.

01

Panes belong to their owner

Every pane is a PTY on its owner's machine, with that machine's PATH, env and subscriptions. Host and guest are per pane, not per person.

02

Control, never a forced takeover

Take control of any free pane by typing into it, or hand yours over. Active typing is protected, so nobody can yank the keyboard out from under you.

03

Zellij-like layout, shared live

Tabs, panes and nested splits, mirrored to everyone in the room. Up to 8 members, 9 tabs, and 8 panes to a tab.

04

Encrypted, direct when it can be

End-to-end encrypted peer-to-peer, over an iroh relay only when NAT requires it. The tab bar tells you which you got: direct 55ms or relayed 120ms.

05

Outlives the machine that started it

If the coordinator's laptop closes, every pane on every other machine keeps running and keeps taking input. After five minutes the earliest-joined survivor takes the role over.

06

Pair once, rejoin forever

p2pmux pair associates two machines you own, permanently. After that, bare p2pmux rejoins on either with no code typed at all.

Presence gives every member a colour, and shows who is on which tab and watching which pane. Full walkthrough — keys, control leases, mouse, scrollback, agent hooks and every config key — is in the usage docs.

Read this before you share a code.

A p2pmux session is a fully trusted shared shell. Anyone with the join code can see every pane and can obtain interactive control of the terminals in it — run commands, read output, touch any file that user account can touch.

Processes and credential files stay on the pane host's machine and are never uploaded to peers. That is a real boundary, and it is the point of the design. It is not a sandbox: a controller can still use your credentials, or print one to the screen, through the shell you handed them.

So treat the code like a password, and share it only with people you would hand an unlocked laptop to. For anyone else, use a separate low-privilege account and keep production credentials out of shared panes. Both halves, in detail →

Install.

macOS and Linux, Apple Silicon, Intel and arm64. One binary, no daemon to configure.

The install script

$ curl -fsSL https://p2pmux.com/install.sh | sh

It fetches a binary and its SHA256 from GitHub Releases and checks the hash before installing. Served as text/plain, so you can read it in a browser first — the binaries never come from this domain, only from GitHub.

Homebrew

$ brew tap pelazas/tap
$ brew trust pelazas/tap
$ brew install p2pmux

Homebrew 6 will not load a formula from a third-party tap until you trust it, so the middle line is not optional there. On Homebrew 5 that command does not exist — skip it.

From source

$ cargo install p2pmux --locked

Linux builds link glibc 2.35 or newer — Ubuntu 22.04, Debian 12, Fedora 36 and up. A musl system has to build from source.

Then

$ p2pmux                       # the inbox, and a session
$ p2pmux setup                 # wire up agent hooks, once
$ p2pmux join 4KP7Q-M2XRW      # one somebody sent you

p2pmux --version says what you are running. Sessions already running keep the binary they started with, so p2pmux kill <name> and start again to pick up a new version.

Early, but real. v0.1.16 runs sessions between machines on different networks and different continents. Found a rough edge? Open an issue — a specific report of what broke is the most useful thing anyone can send right now.