rekord
Search⌘K
1
// 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

commanddescription
startLaunch a detached session after --. Flags: --name, --cols, --rows, --cwd.
sendSend text (positional) and/or --key (repeatable).
showPrint the current frame (--format text|json).
wait--text, --idle <dur>, or --exit; --timeout.
status / listShow one or all running sessions.
stopTerminate 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>.