# ZMX
ZMX is session attach/detach for the terminal. Start a shell, walk away, come back and reattach with the session and its output intact. It does session persistence, and nothing else. Created by neurosnap, sponsored by pico.sh, written in Zig, [[MIT License]].
## What it does
- Attach and detach from shell sessions without killing them
- **Native terminal scrollback restoration**, so reattaching gives you back real scrollback rather than a repainted screen
- Multiple clients on the same session at once
- Send commands to a session remotely
- Read scrollback history as plain text
- macOS and [[Linux]]
Architecture is small: one daemon per session, each with its own Unix socket, and terminal state restored through `libghostty-vt` (the terminal engine from [[Ghostty]]), which captures and replays output and state when a client reconnects.
Install via binaries, Homebrew, mise, nixpkgs, community packages for Alpine, Arch, openSUSE and Gentoo, or build from source with Zig.
## What it deliberately doesn't do
No window management. No tabs. No splits. Those are your window manager's job.
That's the whole design argument, and it's aimed at [[TMux]]. TMux bundles session persistence with a full multiplexer: panes, layouts, a keybinding language, its own copy mode.
ZMX takes the persistence and hands everything else back to software that already does it well. On a tiling setup, the window manager is better at splits than tmux is, and the terminal is better at scrollback than tmux is.
A reason to be careful: this is a young project doing one job, against a tool that has been on every server for twenty years. If you need a multiplexer on a remote box you don't control, tmux is still the answer because it's already there.
## References
- Documentation: https://zmx.sh
- Source code: https://github.com/neurosnap/zmx
- Blog posts: https://bower.sh/?tag=zmx
- IRC chat (#pico.sh on Libera): https://web.libera.chat/gamja?autojoin=#pico.sh
## Related
- [[Ghostty]]
- [[Zellij]]
- [[quotawake]]
- [[Linux]]
- [[Open Source]]
- [[MIT License]]