repos / zmx

session persistence for terminal processes
git clone https://github.com/neurosnap/zmx.git

commit
990a98f
parent
2ca203a
author
Eric Bower
date
2025-12-02 11:52:51 -0500 EST
docs: readme
1 files changed,  +7, -8
M README.md
+7, -8
 1@@ -11,7 +11,6 @@ Reason for this tool: [You might not need `tmux`](https://bower.sh/you-might-not
 2 - Persist terminal shell sessions (pty processes)
 3 - Ability to attach and detach from a shell session without killing it
 4 - Native terminal scrollback
 5-- Manage shell sessions
 6 - Multiple clients can connect to the same session
 7 - Re-attaching to a session restores previous terminal state and output
 8 - Works on mac and linux
 9@@ -55,7 +54,7 @@ zmx attach mux dvtm         # run a multiplexer inside zmx
10 
11 ## shell prompt
12 
13-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.
14+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.
15 
16 We recommend checking for that env var inside your prompt and displaying some indication there.
17 
18@@ -82,7 +81,7 @@ todo.
19 
20 ## philosophy
21 
22-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 tiling manager for your os windows and a tiling manager for your terminal windows.
23+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 tiling manager for your os windows and a tiling manager for your terminal windows.  Further, in order to use modern terminal features, your terminal emulator **and** `tmux` need to have support for them.  This holds back the terminal enthusiast community and feature development.
24 
25 Instead, we focus this tool specifically on session persistence and defer window management to your os wm.
26 
27@@ -170,20 +169,20 @@ At this point, nothing is configurable.  We are evaluating what should be config
28 
29 ### libghostty-vt
30 
31-We use libghostty-vt to restore the previous state of the terminal when a client re-attaches to a session.
32+We use `libghostty-vt` to restore the previous state of the terminal when a client re-attaches to a session.
33 
34 How it works:
35 
36 - user creates session `zmx attach term`
37 - user interacts with terminal stdin
38 - stdin gets sent to pty via daemon
39-- daemon sends pty output to client *and* ghostty-vt
40-- ghostty-vt holds terminal state and scrollback
41+- daemon sends pty output to client *and* `ghostty-vt`
42+- `ghostty-vt` holds terminal state and scrollback
43 - user disconnects
44 - user re-attaches to session
45-- ghostty-vt sends terminal snapshot to client stdout
46+- `ghostty-vt` sends terminal snapshot to client stdout
47 
48-In this way, ghostty-vt doesn't sit in the middle of an active terminal session, it simply receives all the same data the client receives so it can re-hydrate clients that connect to the session.  This enables users to pick up where they left off as if they didn't disconnect from the terminal session at all.
49+In this way, `ghostty-vt` doesn't sit in the middle of an active terminal session, it simply receives all the same data the client receives so it can re-hydrate clients that connect to the session.  This enables users to pick up where they left off as if they didn't disconnect from the terminal session at all.  It also has the added benefit of being very fast, the only thing sitting in-between you and your PTY is a unix socket file.
50 
51 ## prior art
52