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.
Install · Recording modes · Commands · Config · Data layout · Formats & interop · Limitations · API reference
# 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
| Mode | What it captures | How |
|---|---|---|
| Wrapper | A command in a fresh pty | screendoc record <cmd> (bash rcfile + inline OSC 90 markers) |
| Ambient | Your running interactive shell | screendoc on / screendoc off (PROMPT_COMMAND hooks, bash/zsh/fish) |
| tmux pane | One pane of a live tmux session | screendoc record --tmux [pane] (pipe-pane) |
| tmux group | Every pane of a tmux session | screendoc record --tmux-group <session> (linked sessions via group) |
| Command | What it does |
|---|---|
record | Record a command, a tmux pane, or a whole tmux session |
on / off | Ambient start / stop |
chapter | Add a manual chapter marker |
render | GIF/MP4/WebM/AV1/cast/self-contained HTML player (--web); --chapters (one video per chapter), --frames (still PNGs), --idle-limit (gap compression), --speed, --fps |
serve | Local web player (chapters, speed, seek, keyboard shortcuts, .cast download) |
play | Replay the cast in your terminal (--fast to skip waits, --from/--to for a time window) |
import | Ingest an asciinema v2/v3 cast (plain or gzip) as a session (--json machine output) |
search | Find commands / output across sessions |
redact | Mask secrets in place: ad-hoc regex, --secret (built-in credential detectors), --rules file (ANSI-safe, --json summary) |
list / status / rm / rename / prune | Session lifecycle & retention (prune --json machine output) |
config | show / get / set the user config |
stop | Finalize a background tmux recording |
doctor / completions | Environment check / shell completions |
~/.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
~/.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
asciinema play and the asciinema.org web player),
GIF / MP4 / WebM(VP9) / AV1 via ffmpeg, and the local web player.screendoc import accepts asciinema
v2 (JSON-array) and v3 (JSON-lines, relative timestamps) casts,
rewriting them into a screendoc session you can render/chapter/search.bash (the generated hook
rcfile); other shells use ambient hooks or tmux.ffmpeg; cast import/export and
the web player do not.MIT OR Apache-2.0 · github.com/GlobalTechInfo/screendoc