Loading...
Loading...
Play .cast terminal recordings in iTerm2. TRIGGERS - asciinema play, .cast file, play recording, recording playback.
npx skill4agent add terrylica/cc-skills asciinema-playerPlatform: macOS only (requires iTerm2)
| Aspect | Browser Player | iTerm2 CLI |
|---|---|---|
| Large files (>100MB) | Crashes (memory limit) | Streams from disk |
| Memory usage | 2-4GB for 700MB file | Minimal |
| Startup time | Slow (download + parse) | Instant |
| Native feel | Web-based | True terminal |
| Component | Required | Installation |
|---|---|---|
| iTerm2 | Yes | |
| asciinema CLI | Yes | |
Note: This skill is macOS-only. Linux users should rundirectly in their terminal.asciinema play
# Check iTerm2 is installed
ls -d /Applications/iTerm.app 2>/dev/null && echo "iTerm2: OK" || echo "iTerm2: MISSING"
# Check asciinema CLI
which asciinema && asciinema --versionQuestion: "Required dependencies are missing. Install them?"
Header: "Setup"
Options:
- Label: "Install all (Recommended)"
Description: "Will install: {list of missing: iTerm2, asciinema}"
- Label: "Cancel"
Description: "Abort - cannot proceed without dependencies"# Install iTerm2
brew install --cask iterm2
# Install asciinema CLI
brew install asciinema# Search for .cast files in common locations
fd -e cast . --max-depth 5 2>/dev/null | head -20
# Also check common locations
ls -lh ~/scripts/tmp/*.cast 2>/dev/null
ls -lh ~/.local/share/asciinema/*.cast 2>/dev/null
ls -lh ./tmp/*.cast 2>/dev/null# Get file size and line count for selected file
ls -lh {file_path}
wc -l {file_path}Question: "Play this recording?"
Header: "Confirm"
Options:
- Label: "Yes, play {filename}"
Description: "{size}, {line_count} events"
- Label: "Choose different file"
Description: "Browse for other recordings"Question: "Which recording would you like to play?"
Header: "Recording"
Options:
- Label: "{filename} ({size})"
Description: "{line_count} events"
- ... (up to 4 most recent)Question: "Select playback speed:"
Header: "Speed"
Options:
- Label: "2x (fast)"
Description: "Good for review, see everything"
- Label: "6x (very fast)"
Description: "Quick scan of long sessions"
- Label: "16x (ultra fast)"
Description: "Rapid skim for 700MB+ files"
- Label: "Custom"
Description: "Enter your own speed multiplier"Question: "Select additional playback options:"
Header: "Options"
multiSelect: true
Options:
- Label: "Limit idle time (2s)"
Description: "Cap pauses to 2 seconds max (recommended)"
- Label: "Loop playback"
Description: "Restart automatically when finished"
- Label: "Resize terminal"
Description: "Match terminal size to recording dimensions"
- Label: "Pause on markers"
Description: "Auto-pause at marked points (for demos)"asciinema play# Example with all options
asciinema play -s 6 -i 2 -l -r /path/to/recording.cast-s {speed}-i 2-l-r-mosascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s {speed} {options} {file_path}"
end tell
end tell
end tell'## Playback Started
**Recording:** `{filename}`
**Speed:** {speed}x
**Options:** {options_summary}
### Keyboard Controls
| Key | Action |
| -------- | --------------------------------- |
| `Space` | Pause / Resume |
| `Ctrl+C` | Stop playback |
| `.` | Step forward (when paused) |
| `]` | Skip to next marker (when paused) |
### Tips
- Press `Space` to pause anytime
- Use `.` to step through frame by frame
- `Ctrl+C` to exit when done1. [Preflight] Check iTerm2 installed
2. [Preflight] Check asciinema CLI installed
3. [Preflight] AskUserQuestion: install missing deps (if needed)
4. [Preflight] Install dependencies (if confirmed)
5. [Selection] Get file info (size, events)
6. [Selection] AskUserQuestion: confirm file selection
7. [Settings] AskUserQuestion: playback speed
8. [Settings] AskUserQuestion: additional options (multi-select)
9. [Launch] Build asciinema play command
10. [Launch] Execute AppleScript to open iTerm2
11. [Launch] Display controls reference| Option | Flag | Values | Description |
|---|---|---|---|
| Speed | | 0.5, 1, 2, 6, 16... | Playback speed multiplier |
| Idle limit | | seconds (e.g., 2) | Cap idle/pause time |
| Loop | | (flag) | Continuous loop |
| Resize | | (flag) | Match terminal to recording size |
| Markers | | (flag) | Auto-pause at markers |
| Quiet | | (flag) | Suppress info messages |
tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "your command here"
end tell
end tell
end tellcreate window with default profileosascript -e 'tell application "iTerm2"
create window with default profile
tell current window
tell current session
write text "asciinema play -s 6 -i 2 /path/to/file.cast"
end tell
end tell
end tell'asciinema playbrew install --cask iterm2-i 2