// persistent sessions
Persistent sessions
rekord session runs a named terminal program as a detached background session reachable over an owner-only unix socket (<root>/<name>.sock, mode 0600). Any later command — from any process — drives the same live session. The session keeps its final screen after the program exits, until you stop it. Like all rekord sessions, it is recorded for export / replay / handoff.
Lifecycle
Launch a detached session:
$ rekord session start --name demo --cols 80 --rows 24 -- htop
Drive it from separate commands:
$ rekord session status --name demo $ rekord session send --name demo "q" $ rekord session send --name demo --key ctrl-c $ rekord session show --name demo # current screen (text) $ rekord session show --name demo --format json $ rekord session wait --name demo --text "Done" --timeout 30s $ rekord session wait --name demo --idle 500ms $ rekord session wait --name demo --exit
Inspect and tear down:
$ rekord session list $ rekord session stop --name demo
Commands
| command | description |
|---|---|
| start | Launch a detached session after --. Flags: --name, --cols, --rows, --cwd. |
| send | Send text (positional) and/or --key (repeatable). |
| show | Print the current frame (--format text|json). |
| wait | --text, --idle <dur>, or --exit; --timeout. |
| status / list | Show one or all running sessions. |
| stop | Terminate and finalize the recording. |
All commands accept --root (default ~/.rekord/sessions).
▋ note
Recorded under --root like any session, so afterward: rekord export <id> --to markdown, rekord replay <id>, rekord handoff <id>.