SCREENDOC

Record your terminal session once, publish it everywhere: GIF MP4 WebM/AV1 asciinema .cast web player — plus command boundaries, exit codes, and chapters in one structured journal.

Contents

Install · Recording modes · Commands · Config · Data layout · Formats & interop · Limitations · API reference

Install

# from source (needs Rust ≥1.99; ffmpeg for video)
git clone https://github.com/GlobalTechInfo/screendoc && cd screendoc
./scripts/install.sh          # release build → ~/.local/bin

# fully static Linux binary (no glibc dependency)
./scripts/build-static.sh

# verify
screendoc doctor

Recording modes

ModeWhat it capturesHow
WrapperA command in a fresh pty screendoc record <cmd> (bash rcfile + inline OSC 90 markers)
AmbientYour running interactive shell screendoc on / screendoc off (PROMPT_COMMAND hooks, bash/zsh/fish)
tmux paneOne pane of a live tmux session screendoc record --tmux [pane] (pipe-pane)
tmux groupEvery pane of a tmux session screendoc record --tmux-group <session> (linked sessions via group)

Commands

CommandWhat it does
recordRecord a command, a tmux pane, or a whole tmux session
on / offAmbient start / stop
chapterAdd a manual chapter marker
renderGIF/MP4/WebM/AV1/cast/self-contained HTML player (--web); --chapters (one video per chapter), --frames (still PNGs), --idle-limit (gap compression), --speed, --fps
serveLocal web player (chapters, speed, seek, keyboard shortcuts, .cast download)
playReplay the cast in your terminal (--fast to skip waits, --from/--to for a time window)
importIngest an asciinema v2/v3 cast (plain or gzip) as a session (--json machine output)
searchFind commands / output across sessions
redactMask secrets in place: ad-hoc regex, --secret (built-in credential detectors), --rules file (ANSI-safe, --json summary)
list / status / rm / rename / pruneSession lifecycle & retention (prune --json machine output)
configshow / get / set the user config
stopFinalize a background tmux recording
doctor / completionsEnvironment check / shell completions

Config

~/.config/screendoc/config.toml (all keys optional):

fps = 20          # video frame rate
gif_fps = 15
speed = 1.0       # playback multiplier
cols = 120        # default terminal size (wrapper)
rows = 30
port = 4999       # web player port
cell_width = 12   # raster cell size
cell_height = 24
idle_limit = 2.0  # compress idle gaps longer than this (0 = off)
theme = "xterm"   # xterm | dracula | nord | tokyo | solarized

Data layout

~/.screendoc/
├── current                  # active session pointer
└── sessions/<id>/
    ├── meta.json           # shell, size, mode, group, duration, title
    ├── events.jsonl        # structured journal (source of truth #1)
    ├── markers.jsonl       # hook-appended markers (ambient/tmux)
    ├── raw.cast            # asciinema byte stream (source of truth #2)
    └── frames/             # rendered stills / per-chapter stills

Formats & interop

Limitations

MIT OR Apache-2.0 · github.com/GlobalTechInfo/screendoc