feat: live collaborative terminal sharing - #35
Draft
neurosnap wants to merge 1 commit into
Draft
Conversation
neurosnap
commented
Aug 17, 2026
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 18, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
force-pushed
the
push-nksmnzwzvwuz
branch
2 times, most recently
from
August 19, 2026 18:57
f5b2ff3 to
c4abee2
Compare
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
This uses libghostty's experimental snapshot api to stream a terminal to/from a subprocess via stdin/stdout pipes. It supports saving and restoring snapshots from a file or even terminal sharing. It shares the entire terminal state and scrollback history of libghostty.Terminal. Link: ghostty-org/ghostty#13534
neurosnap
force-pushed
the
push-nksmnzwzvwuz
branch
from
August 19, 2026 18:57
c4abee2 to
a1e8ebf
Compare
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 19, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 20, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
neurosnap
added a commit
to neurosnap/zmx
that referenced
this pull request
Aug 30, 2026
…stream This allows zmx to directly inject terminal state into terminal emulators that speak libghostty's snapshot api. This only impacts terminal rehydration of clients when they first attach to a zmx session. What does this mean? Terminal emulators that support loading libghostty snapshots directly can receive a perfect recreation of zmx's session instead of relying on us re-printing the ansi bytestream into every client that connects to a zmx session. Right now only `monstar` has experimental support for the snapshot api, but this is how it would work: ```bash zmx attach snap.1 // do some terminal stuff // close terminal and then use monstar: monstar --attach="zmx attach -s snap.1" // zmx will directly load the underlying `libghostty.Terminal` into `monstar` ``` Link: rockorager/monstar#35
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This uses libghostty's experimental snapshot api to stream a terminal to/from a subprocess via stdin/stdout pipes. It supports saving and restoring snapshots from a file or even terminal sharing across a network. It shares the entire terminal state and scrollback history of
libghostty.Terminal.Link: ghostty-org/ghostty#13534
Link: neurosnap/zmx#243
Demo:
monstar-share.mp4