By the ZoomCap team.We make ZoomCap, which appears in this article. Prices and features were checked on each vendor's own site on September 29, 2026. Where we could not test a tool ourselves, we say so. How we test
Short answer
The fastest way to a terminal demo people can read: record with ZoomCap's CLI. Run npx zoomcap record on macOS or Linux X11 and it zooms in on your typing automatically, which click-only recorders can't do in a terminal. The video never leaves your computer, the editor is free to try in the browser, and the CLI is $29 once. Bump the font to 18px first.
Pick something else only for docs where readers copy commands out of the player (asciinema, or VHS for scripted GIFs that regenerate in CI), or if you record on Windows.
There are two ways to record a terminal, and most bad terminal demos come from picking the wrong one. This guide covers both, including how to record a terminal session on Mac and Linux, how to record a terminal to a GIF, and which approach fits which destination. Commands for asciinema, VHS and script are from each project's own documentation; ZoomCap commands are from our docs.
Option 1: record the text (asciinema, VHS)
asciinema doesn't record pixels. It records the character stream of your session and replays it in a web player. The files are tiny, the “video” is crisp at any size, and viewers can pause and copy-paste commands straight out of the recording. That last property is hard to beat for documentation. VHS takes the same idea further: you script the entire session in a .tape file and it renders a deterministic GIF or video, which suits demos that regenerate in CI whenever your CLI's output changes.
Use text-based recording when the destination is:
- Documentation or a README where readers copy commands
- A tutorial that must stay current (VHS plus CI regenerates it)
- Anywhere file size matters and a web player is embeddable
The limit: text recorders only see the terminal. If your demo opens a browser, a GUI or a second app, none of that appears.
Option 2: record the pixels (real video)
Text-based recording stops working the moment your demo isn't purely text. A launch video that cuts from terminal to browser. A CLI that opens a UI. A social clip that needs to autoplay as MP4. A homepage hero. A Product Hunt gallery asset. For all of these you need actual video, and that is where the problems start, because raw terminal footage is some of the worst-looking screen recording there is.
How to record a terminal session on Mac
As text
- Install asciinema:
brew install asciinema. - Start recording:
asciinema rec demo.cast. A new shell starts inside the recording. - Run your demo, then type
exitor press Ctrl+D to stop. - Replay locally with
asciinema play demo.cast, embed the player in your docs, or convert to a GIF (below).
No install at all: macOS ships the BSD script command. script -r session.log records with timing, and script -p session.log plays it back. It is fine for a personal log and awkward to share, which is why asciinema exists.
As video
- ZoomCap's CLI: run
npx zoomcap recordfrom any terminal. On macOS 15+ it records at 60fps by default with system audio and mic through ScreenCaptureKit; older macOS versions fall back to ffmpeg and record video only. A ● REC item sits in the menu bar while it runs, and typing bursts become zooms without any editing. - Shift+Command+5, choose “Record Selected Portion”, and draw around the terminal window. Free and built in; no zoom, no editing. Our Mac screen recording guide covers every option.
- OBS Studio: free, with a window capture source for just the terminal. You add zooms in an editor afterwards.
How to record a terminal session on Linux
As text
- Install asciinema from your package manager (for example
sudo apt install asciinema) or from asciinema.org. asciinema rec demo.cast, run the demo, thenexit.- Or use util-linux's
script --timing=time.log session.logand replay withscriptreplay --timing=time.log session.log.
As video
- ZoomCap's CLI:
npx zoomcap recordrecords X11 sessions and tracks clicks and typing for automatic zoom. It records video only: no Wayland and no system audio yet, so record a voiceover separately if you need one. - Your desktop's built-in recorder: GNOME, for example, has screen recording in its screenshot tool. Fine for a quick clip, no editing.
- ffmpeg on X11:
ffmpeg -f x11grab -framerate 30 -i :0.0 terminal.mp4records the display with no UI at all. Add-video_sizeand an offset to capture just a region. - OBS: free and reliable on X11 and Wayland, with no editor or automatic zoom.
More Linux options, including Wayland-native ones, are in our Linux recorder roundup.
Why raw terminal video fails: the legibility math
Your terminal font is maybe 13px on a 2560px-wide display. X's inline player shows that recording at roughly 500px wide on a phone, so your text is now under 3 pixels tall. Nobody is reading that. This is the main reason terminal demos get scrolled past: not the content, the size.
You have three fixes, in ascending order of quality:
- Record a smaller region. Capture a 1280px window, not the full display. Better, but still static.
- Bump the font before recording. 18–20px minimum for anything viewed on a phone. Do this regardless of what else you do.
- Zoom to the action. Show the full frame for context, then move in close on the command being typed and its output. This is what makes a demo watchable rather than merely legible.
If the result still looks soft, our list of reasons screen recordings look blurry covers scaling and compression.
The catch: click-based auto-zoom can't see a terminal
Here is the detail most write-ups of auto-zoom screen recorders skip: almost all of them key their zooms off mouse clicks. A terminal session is keyboard-driven. There is little to click, so there is little to zoom to, and the feature does nothing on exactly the content that needs it most.
Why ZoomCap for terminal demos
This is why ZoomCap also triggers on typing: it detects a burst of keystrokes (timing only, never which keys), closes in on where you last clicked, holds while you work, and releases when you pause. It does not follow the text caret, so click once into the terminal pane before you type and the zoom lands on the right place. ZoomCap is itself a CLI, which suits terminal demos: npx zoomcap record and you are recording.
We make ZoomCap, so weigh this accordingly. The CLI is part of the paid plans: $29 once or $12.49 a month. The free plan gives you the browser recorder and editor with 2 watermarked exports a month, but the browser recorder only sees clicks inside its own tab, so terminal recordings made there need zooms placed by hand. There is no Windows CLI yet, no motion blur, and speed changes apply to the whole video. Recordings are edited and encoded on your computer and never uploaded to us; the data flow is on our security page, and paid plans have a 14-day refund if it doesn't work for you.
How to record a terminal to a GIF
A GIF is still the default for READMEs and issue threads because it autoplays everywhere. Three ways to get one, from most to least deterministic:
1. VHS: script it, get a GIF
Install with brew install vhs (it needs ttyd and ffmpeg; other installs are on the VHS README). Then write demo.tape:
Output demo.gif
Set FontSize 28
Set Width 1200
Set Height 600
Type "npx mytool --help"
Sleep 500ms
Enter
Sleep 3sRun vhs demo.tape and you get demo.gif. Change the Output line to .mp4 or .webm for video. vhs record > demo.tape writes a tape from a session you type live, which you can then tidy up.
2. asciinema plus agg
Record with asciinema rec demo.cast, then convert with asciinema's GIF generator: agg demo.cast demo.gif. You can set the font size and theme on the command line, which keeps text legible at README widths.
3. Record video, then convert
When the demo includes anything other than the terminal, record video and export a GIF. ZoomCap exports GIF directly from the editor, and our free MP4 to GIF converter runs in the browser. With ffmpeg, generate a palette first so the text doesn't band:
ffmpeg -i demo.mp4 -vf "fps=12,scale=800:-1:flags=lanczos,palettegen" palette.png
ffmpeg -i demo.mp4 -i palette.png -lavfi "fps=12,scale=800:-1:flags=lanczos[x];[x][1:v]paletteuse" demo.gifKeep terminal GIFs to about 10–15fps and 800px wide; text doesn't need more frames, and size balloons fast. GitHub's limits and embed markdown are in adding a demo GIF to your README, and palette settings in more depth in turning a screen recording into a GIF.
A recordable-terminal checklist
- Font at 18px or more, and a high-contrast theme (not a 40%-opacity translucent one)
- A short prompt:
~/project $, not a three-line powerline - Clean history, and
clearbefore starting - Window at roughly 16:9 proportions so the crop doesn't waste space
- Hide tokens and hostnames: set a throwaway prompt and unset secrets from your environment
- Type at natural speed; trim the dead air in the edit
- Rehearse once; the second take is almost always tighter
The decision table
| Tool | Records | Output | Price (checked Sep 2026) | Platforms | Main tradeoff |
|---|---|---|---|---|---|
| ZoomCap CLI | Pixels plus click and typing timing | MP4 up to 4K, GIF | $29 once or $12.49/mo; free browser plan | macOS and Linux (X11) | Zooms on typing automatically; no Windows CLI, video-only on Linux |
| asciinema | Text stream, live | .cast (web player); GIF via agg | Free, open source | macOS, Linux | Copyable and tiny, but terminal only |
| VHS | Scripted text session | GIF, MP4, WebM | Free, open source | macOS, Linux, Windows | Deterministic and CI-friendly, but you script every keystroke |
script | Text stream, live | Log plus timing file | Built in | macOS, Linux | Nothing to install, hard to share |
| Shift+Command+5 | Pixels | MOV | Built in | macOS | Free, but no zoom or editing |
| OBS Studio | Pixels | MKV, MP4 and more | Free, open source | Windows, macOS 12+, Linux | The best free capture and streaming tool; no editor or automatic zoom |
And by destination:
| Destination | Use | Why |
|---|---|---|
| Docs / README reference | asciinema | Copy-paste, tiny files, always crisp |
| Auto-regenerating CLI docs | VHS | Scripted, deterministic, CI-friendly |
| Launch video / homepage | ZoomCap (real video with typing zoom) | Mixed terminal and UI, needs MP4, needs to look finished |
| Social clips | ZoomCap (real video with typing zoom) | Autoplay MP4, phone-sized player, legibility critical |
| README hero GIF | Either | VHS for pure CLI; video to GIF when a UI is involved |
The workflow we use for real video
- Open two terminals: one for the demo, one for ZoomCap. Run
npx zoomcap doctoronce to check permissions, andnpx zoomcap displaysif you have more than one screen. npx zoomcap recordin the second terminal. On macOS 15+ that is a 60fps capture with system audio and mic.- Click into the demo terminal and run the demo. Typing bursts and clicks become zooms automatically.
- Stop: on macOS, ⌃⌥S works from any app; otherwise switch back to the ZoomCap terminal and press
q. - The editor opens in the browser: re-aim or delete any zoom, trim the fumbles, cut the dead air, add a background and captions. Speed-up applies to the whole video (1.5× or 2×), so cut long waits rather than speeding up one section.
- Export MP4 from 720p up to 4K, or GIF for a README. Encoding runs locally; nothing is uploaded. MP4/H.264 is the right compatibility master; add a WebM sibling only when you control the player. Settings by channel are in MP4 vs MOV vs WebM.
When the job is docs rather than a demo, use asciinema. The best terminal-recording setup is both approaches, each where it belongs. For more on recording from the command line, see command-line screen recorders with auto zoom.
Frequently asked questions
How do I record a terminal session on a Mac?
For a video, run npx zoomcap record: ZoomCap's CLI records the screen and zooms in on your typing automatically. Shift+Command+5 also records the terminal window, without zoom. For a text recording, run asciinema rec demo.cast (install with brew install asciinema), or use the built-in script -r session.log and replay it with script -p. Bump the terminal font to 18px or more first.
How do I record a terminal session on Linux?
For text, use asciinema rec demo.cast, or util-linux's script --timing=time.log session.log and replay it with scriptreplay. For video, use OBS, your desktop's built-in screen recorder, or ffmpeg's x11grab on X11. ZoomCap's CLI records Linux X11 sessions with automatic zoom on clicks and typing, video only (no Wayland or system audio yet).
How do I record the terminal to a GIF?
The simplest route is VHS: write a .tape file with Output demo.gif and run vhs demo.tape. If you already have an asciinema recording, convert it with agg demo.cast demo.gif. For a pixel recording, export a GIF from your editor or convert the MP4 with ffmpeg using a generated palette, keeping it to about 10-15fps and 800px wide.
asciinema or VHS: which should I use?
Use asciinema to capture a real session you type live, especially for docs where viewers copy commands from the player. Use VHS when you want a scripted, repeatable recording that regenerates in CI and outputs a GIF, MP4 or WebM directly. Neither can show a browser or a GUI, so switch to real video when the demo leaves the terminal.
Does ZoomCap see what I type in the terminal?
No. For typing zoom, the CLI records only the timing of key presses, never which keys you pressed, and the video is recorded, edited and encoded on your computer without being uploaded to us. The data flow is on our security page. The CLI is part of the paid plans ($29 once or $12.49 a month).
Record your terminal demo
Try the editor free in your browser with nothing to install, then run npx zoomcap record for automatic zoom on your typing. The CLI, unlimited exports and no watermark are $29 once on the pricing page.