scr
Original:🇺🇸 English
Translated
Automated terminal screenshots. Run CLI/TUI commands, script interactions, capture PNGs. Use when generating documentation, testing terminal apps, or capturing command output sequences.
9installs
Sourceyarlson/scr
Added on
NPX Install
npx skill4agent add yarlson/scr scrTags
Translated version includes tags in frontmatterSKILL.md Content
View Translation Comparison →Capture terminal screenshots by running commands through ttyd + headless Chrome, executing scripted keypresses, saving PNG sequences.
Syntax
scr [flags] <command> [script]Flags
| Flag | Default | Purpose |
|---|---|---|
| | Output directory |
| | Screenshot interval |
| | Timeout |
| | ttyd port |
| | Verbose |
Script Actions
| Action | Syntax | Behavior |
|---|---|---|
| Type | | Type text (50ms/char default); supports spaces + ASCII punctuation |
| Type speed | | Type with custom per-char delay |
| Sleep | | Pause for duration (ms or s) |
| Key | | Press key once |
| Key repeat | | Press key N times |
| Key delay | | Delay before keypress |
| Ctrl combo | | Send control character |
Supported Keys
EnterTabEscapeSpaceBackspaceDeleteUpDownLeftRightHomeEndPageUpPageDownCommon Patterns
Static capture (no interaction)
bash
scr "ls -la"
scr "git status"
scr "cat README.md"Type and execute
bash
scr bash "Type 'echo hello' Enter"
scr bash "Type \"echo 'hello / ?'\" Enter"
scr bash "Type 'npm test' Enter Sleep 5s"Menu navigation (fzf, gum, etc.)
bash
scr "seq 1 20 | fzf" "Down 5 Enter"
scr "gum choose A B C" "Down Down Enter"Editors
bash
scr vim "Type 'i' Type 'Hello' Escape Type ':wq' Enter"
scr nano "Type 'Hello' Ctrl+X Type 'y' Enter"REPLs
bash
scr python3 "Type 'print(1+1)' Enter Sleep 500ms Ctrl+D"
scr node "Type '2+2' Enter Sleep 300ms Type '.exit' Enter"Long-running processes
bash
scr htop "Sleep 3s Ctrl+C"
scr -t 120s "npm run build" "Sleep 60s"Custom output
bash
scr -o ./docs/images "git log --oneline"
scr -i 200ms bash "Type 'ls' Enter"Error Handling
Parse errors include position:
Error: parse script: position 23: expected quoted string after TypeUnknown key:
Error: unknown key 'Foo' at position 15; valid keys: Enter, Tab, ...Prerequisites
Requires in PATH. If installed via Homebrew, is installed automatically as a dependency; otherwise install separately.
ttydttydttydChrome/Chromium must be available (chromedp auto-detects).
Output
Screenshots saved as , , etc.
screenshot_001.pngscreenshot_002.pngCapture sequence:
- Initial terminal state
- Periodic snapshots (per )
--interval - Final state after script completes