← Back to archive

Repo of the Day

GitHub - pelazas/p2pmux: Multiplayer terminal multiplexer where multiple users and machines can connect to a same session

Published: Sep 7, 2026

Open repository ↗

Multiplayer terminal multiplexer where multiple users and machines can connect to a same session - pelazas/p2pmux

Summary

p2pmux is a peer-to-peer terminal multiplexer written in Rust that lets multiple people on different machines share one session. Every pane is a real PTY on the machine of whoever opened it, so a teammate can drive a shell on your laptop without you handing over SSH keys. It uses iroh for networking and ratatui for the TUI.

What it is useful for

Live pair programming and debugging where you want someone else to see and type in your terminal without standing up a shared server. Because each pane is hosted on its owner's machine, that machine's toolchain, environment, and AI subscriptions are the ones in use, which the README calls out as deliberate. The project also documents remote teaching, since either side can take control of a pane. A session supports up to 8 members, 9 tabs, and 8 panes per tab.

A documented feature is the agent inbox: Ctrl+O lists detected coding agents across every machine in the session alongside a grid of panes, so you can jump to the terminal sitting next to an agent that is blocking you.

How engineers can use it

On macOS or Linux (x86_64 or arm64) the README documents this installer:

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

Homebrew (brew tap pelazas/tap && brew trust pelazas/tap && brew install p2pmux) and cargo install p2pmux --locked (Rust 1.91 or newer) are also documented. Linux builds need glibc 2.35 or newer; musl systems must build from source, and Windows is not supported.

Two terminals on one machine:

p2pmux create
p2pmux join 4KP7Q-M2XRW

Ctrl+S copies the join line so you can paste it into chat. For machines you own, run p2pmux pair on the new box and p2pmux pair <code> on the other, after which p2pmux rejoins on either without a code. If the coordinator's machine closes, panes on other machines keep running; the earliest-joined survivor takes over after five minutes. Join codes expire after six hours, and the tab bar shows direct or relayed depending on whether iroh's relay was used.

The README is explicit about the trust model: the join code acts as a password. Anyone with it gets an interactive shell on the panes they can reach, with no sandbox. Processes and credential files never leave the host, but a controller can still run commands as that user. Treat the code accordingly or use a separate low-privilege account. The project is marked early, peers must share a protocol pin, and compatibility is tracked in CHANGELOG.md. License is MIT.