Record, play back, and export your terminal sessions — straight from the command line.
CLI Recorder is a terminal session recorder that captures everything you do in your terminal. Install it globally, run rec from any directory, and use your terminal normally. Every keystroke, command output, and color is saved to a standard asciicast v2 file. Play recordings back in the terminal, convert them to GIF or MP4, and manage everything from an interactive dashboard.
- Record terminal sessions with full color and formatting support
- Play back recordings directly in the terminal with speed control
- Export to GIF with a single command (via agg)
- Export to MP4 for sharing anywhere (via agg + ffmpeg)
- Interactive dashboard to browse, play, and export recordings
- Themes — switch between Default, Dracula, Monokai, Ocean, Solarized, and Rosé Pine
- Mid-recording dashboard — type
dashboardduring a recording to manage files without interrupting the session - Cross-platform — works on Windows, macOS, and Linux
- Asciicast v2 compatible — works with asciinema, agg, svg-term-cli, and more
git clone https://github.com/aymenhmaidiwastaken/cli-recorder.git
cd cli-recorder
npm install
npm linkrec is now available globally from any directory.
rec # Record to recording.cast
rec demo.cast # Record to a specific file
rec --shell bash demo.cast # Record using a specific shell
rec --shell powershell demo.cast # Record using PowerShellUse your terminal normally while recording. Type exit or press Ctrl+D to stop.
rec play demo.cast # Play a recording
rec play --speed 2 demo.cast # Play at 2x speed
rec play --max-wait 1 demo.cast # Cap gaps between frames to 1srec info demo.cast File: demo.cast
Size: 2.4 KB
Duration: 8.3s
Terminal: 90x30
Events: 47 (47 output)
Shell: /bin/bash
Recorded: 3/25/2026, 11:01:18 PM
rec gif demo.cast # Convert to demo.gif
rec gif --speed 1.5 demo.cast # Convert with speed multiplier
rec gif demo.cast output.gif # Custom output pathRequires agg (cargo install agg). The active theme controls GIF colors — the default theme produces a clean black background with white text.
Available through the dashboard. Requires agg + ffmpeg.
rec dashboardThe interactive dashboard lets you:
- Start new recordings
- Browse all
.castfiles in the current directory - View recording info (duration, size, terminal dimensions)
- Play back recordings
- Export to GIF or MP4
- Switch themes
Navigate with arrow keys, Enter to select, q to go back.
You can also type dashboard during an active recording session. The dashboard opens without being captured in the recording, and the session resumes when you exit.
Switch between 6 built-in themes from the dashboard:
| Theme | Description |
|---|---|
| Default | Clean black terminal with white text |
| Dracula | Dark purple palette |
| Monokai | Classic warm colors |
| Ocean | Cool blue tones |
| Solarized | Ethan Schoonover's Solarized Dark |
| Rosé Pine | Soft pink and muted tones |
Themes apply to both the dashboard UI and GIF/MP4 exports. Your choice is saved to ~/.rec/config.json.
CLI Recorder outputs standard asciicast v2 files (.cast). These are compatible with:
- asciinema — upload and share recordings
- agg — convert to GIF
- svg-term-cli — convert to SVG
- Any tool that reads asciicast v2
CLI Recorder spawns a real PTY shell using node-pty and captures all terminal output with timestamps. Your terminal looks and behaves exactly the same — same colors, same prompt, same shell. The only difference is everything gets written to a .cast file in the background.
rec [file] Record a session (default: recording.cast)
rec play <file> Play back a recording
rec gif <file> [out] Convert recording to GIF (requires agg)
rec info <file> Show recording details
rec dashboard Interactive dashboard
rec --help Show help
Options:
--shell <path> Shell to use (default: system shell)
--speed <n> Playback / GIF speed multiplier (default: 1)
--max-wait <sec> Max delay between frames in playback (default: 2)
MIT
