Zmx: Session Persistence for Terminal Processes

https://news.ycombinator.com/rss Hits: 2
Summary

zmx session persistence for terminal processes Reason for this tool: You might not need tmux features Persist terminal shell sessions (pty processes) Ability to attach and detach from a shell session without killing it Native terminal scrollback Multiple clients can connect to the same session Re-attaching to a session restores previous terminal state and output Works on mac and linux This project does NOT provide windows, tabs, or splits install Requires zig v0.15 Clone the repo Run build cmd zig build -Doptimize=ReleaseSafe --prefix ~ /.local # be sure to add ~/.local/bin to your PATH usage Important Press ctrl+\ to detach from the session. Usage: zmx <command> [args] Commands: [a]ttach <name> [command...] Create or attach to a session [d]etach Detach all clients from current session (ctrl+\ for current client) [l]ist List active sessions [k]ill <name> Kill a session and all attached clients [h]elp Show this help message examples zmx attach dev # start a shell session zmx attach dev nvim . # start nvim in a persistent session zmx attach build make -j8 # run a build, reattach to check progress zmx attach mux dvtm # run a multiplexer inside zmx shell prompt When you attach to a zmx session, we don't provide any indication that you are inside zmx . We do provide an environment variable ZMX_SESSION which contains the session name. We recommend checking for that env var inside your prompt and displaying some indication there. fish functions -c fish_prompt _original_fish_prompt 2> /dev/null function fish_prompt --description ' Write out the prompt ' if set -q ZMX_SESSION echo -n " [ $ZMX_SESSION ] " end _original_fish_prompt end bash todo. zsh todo. philosophy The entire argument for zmx instead of something like tmux that has windows, panes, splits, etc. is that job should be handled by your os window manager. By using something like tmux you now have redundent functionality in your dev stack: a window manager for your os and a window manager for your terminal. Further...

First seen: 2025-12-04 05:05

Last seen: 2025-12-04 06:05