hty watch
Connect to a running session and render its terminal screen in real time inside your terminal. Strictly read-only — you cannot send input.
Multiple terminals can watch the same session simultaneously without any coordination required.
If you pass a --name that doesn’t exist yet, watch will block and start streaming the moment a later hty run --name <that-name> spawns the session. This makes “launch a watcher first, then kick off the command” scripts reliable without polling.
Reference
hty watch [SESSION]
Attach to a session read-only and paint its rendered screen live to
your terminal. Ctrl-C or Ctrl-Q to detach.
SESSION may be a UUID prefix or the session's --name. If omitted and
exactly one session is running, that one is used.
If SESSION is a name that doesn't exist yet, watch will wait for it
to be created by a later `hty run --name SESSION -- …` and start
streaming the moment that session spawns.
Example
# Terminal A: start the program
hty run --name demo -- vim /tmp/notes.txt
# Terminal B: observe it live
hty watch demo
# Or the other way around — start the watcher first, then spawn
hty watch demo & # blocks until "demo" exists
hty run --name demo -- vim /tmp/notes.txtUse hty watch in CI to stream session output to your build log while your script drives the session with hty send and hty wait. Because watch makes no changes, it is safe to run in parallel with any automation.
Last updated on