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
For demo videos, use ZoomCap's CLI. One command, npx zoomcap record, records your screen on macOS or Linux X11, zooms on your clicks and your typing, and opens the editor automatically with the zooms already placed. It's $29 once, and recordings never leave your computer. If your demo is text-only inside a terminal, use asciinema or VHS instead; for a raw file with no editing, screencapture or ffmpeg are built in or free.
A command-line screen recorder is useful for two kinds of people: developers who live in a terminal and don't want another app in the dock, and anyone who wants to script a recording or regenerate the same demo every release. This guide starts with the one-command recorder that finishes the video for you, then covers every other way to record the screen from the terminal on macOS and Linux, with the exact commands and what each one can't do.
How we checked this. We make ZoomCap and run its CLI on macOS and Linux X11 ourselves, so the ZoomCap commands and behaviour below are tested. The screencapture, ffmpeg, asciinema and VHS commands come from each tool's own manual. OpenScreen's CLI details come from its GitHub README and CLI reference, checked September 2026; we did not script it end to end. Our general method is on the how we test page.
Command-line screen recorders compared
Two questions sort these. Do you want pixels or text? Video recorders capture what's on the screen; text recorders capture what a terminal printed. And do you want the recorder to finish the video (zoom, cursor, background), or just hand you a raw file to edit elsewhere?
| Tool | Start command | Price (checked Sep 2026) | Platforms | Audio | Auto-zoom trigger | Main tradeoff | Source |
|---|---|---|---|---|---|---|---|
| ZoomCap CLI | npx zoomcap record | $29 once or $12.49/month (the CLI is not on the free plan) | macOS and Linux (X11) | System audio and mic on macOS 15+; none on Linux | Clicks and typing bursts, placed automatically in the editor | Finished demo from one command; no Windows or Wayland yet | Tested by us |
| screencapture | screencapture -v out.mov | Free, built in | macOS | Mic with -g | None | Raw file, no editing at all | macOS manual |
| ffmpeg (avfoundation) | ffmpeg -f avfoundation -i "1:0" out.mp4 | Free, open source | macOS | Mic; system audio needs a virtual device | None | Full control, but you edit elsewhere | ffmpeg docs |
| ffmpeg (x11grab) | ffmpeg -f x11grab -i :0.0 out.mp4 | Free, open source | Linux X11 | Yes, via -f pulse | None | No Wayland; you edit elsewhere | ffmpeg docs |
| asciinema | asciinema rec demo.cast | Free, open source | macOS, Linux | No | Not applicable (text) | Terminal text only, no GUI | asciinema docs |
| VHS | vhs demo.tape | Free, open source | macOS, Linux, Windows | No | Not applicable (scripted) | Scripted terminal only, no GUI | VHS README |
| OpenScreen CLI | openscreen record | Free for personal and commercial use, no watermark, no account (MIT) | macOS, Windows, Linux; also a CLI for scripts and CI | Mic and system audio flags | Recorded clicks, with --auto-zoom at export | Needs the desktop app; Linux portal picker opens every run | GitHub README and CLI docs |
Why ZoomCap for demo videos: one command, zooms already placed
ZoomCap's CLI records the screen while logging every mouse move and click and the timing of key presses. When you stop, it opens ZoomCap's editor in your browser with the recording loaded and zooms already placed: clicks and bursts of typing are clustered into zooms that move in, hold while you work and release when you pause. The cursor is redrawn smoothly and you can resize it afterwards.
- Nothing to install.
npx zoomcap recordruns without installing an app first, which suits a borrowed machine or a clean dev box. - Zoom on typing, not just clicks. A burst of typing becomes a zoom that holds while you type. It aims at the last place you clicked before typing (usually the field or pane you're in). For terminal and IDE demos, which are mostly typing, that's the zoom you keep.
- The editor opens by itself. Adjust any zoom, add a background, captions or music, then export an MP4 up to 4K or a GIF. No ffmpeg expressions, no keyframes.
- System audio on macOS without extra drivers (macOS 15+), unlike ffmpeg's avfoundation route.
- No picker dialog on Linux X11. Once you've signed in, a recording starts from a script without a dialog.
- Private. Recordings are edited and exported on your computer and never uploaded. The CLI hands the file to the editor over localhost, and it stores the timing of key presses, never which keys you pressed. The data flow is on our security page.
Price. The CLI is part of the paid plans: $29 once or $12.49 a month, with a free plan (browser recorder and editor, 2 exports a month with a small watermark) you can try first. Over three years that's $295 less than Screen Studio's $108-a-year plan. Payments go through Dodo Payments, and if it doesn't work for you and we can't fix it, you can ask for a refund within 14 days (refund terms).
Limits: no Windows CLI, no Wayland, no audio on Linux, no motion blur, speed changes apply to the whole video only (1×, 1.5× or 2×), no window-only or region-only CLI capture yet, and no hosted share links. You export a file and share it yourself.
Setup, step by step
- Check you have Node 18 or newer (
node -v).npxcomes with it. Nothing else installs permanently. - Run the check:
npx zoomcap doctor. It reports your OS version, session type on Linux, ffmpeg, displays and any missing permission. It doesn't need sign-in. - Grant permissions (macOS). Give your terminal app Screen Recording, Accessibility (plus Input Monitoring on newer macOS) and, optionally, Microphone in System Settings → Privacy & Security, then restart the terminal. Without Accessibility the recording still works but there's no click data, so no automatic zoom. On Linux X11 there's nothing to grant.
- Pick a display if you have more than one:
npx zoomcap displayslists them, and--display 1chooses one. - Record:
npx zoomcap record. The first run opens a browser tab to sign in and connects the terminal to your account; after that it goes straight to a countdown. - Stop with
qor Ctrl+C in the terminal,⌃⌥Sfrom any app, or the ● REC menu-bar item on macOS 15+. Press⌃⌥Zmid-take to force a zoom at that moment. - Edit and export. The editor opens with your zooms in place. Adjust or delete any zoom, add a background, captions or music, then export an MP4 (720p up to 4K) or a GIF. Encoding runs in your browser.
Commands and flags
| Command or flag | What it does |
|---|---|
npx zoomcap record | Sign in on first run, record, then open the editor |
npx zoomcap doctor | Check permissions, recorder, displays and OS before recording |
npx zoomcap displays | List displays and their indexes |
npx zoomcap logout | Sign out and clear the cached session |
npx zoomcap debug | Print the newest recording's diagnostics for a bug report |
--display <n> | Display to record (default 0) |
--fps <n> | Capture frame rate, 5 to 60 (default 60) |
--no-mic | System audio only, no microphone (macOS) |
--no-audio | Silent video (macOS) |
--os-cursor | Bake in the real macOS cursor instead of the redrawn one |
--no-open | Print the import link instead of opening the browser |
-o, --out <dir> | Output folder (default ~/Movies/ZoomCap/<timestamp>) |
For example, npx zoomcap record --display 1 --fps 30 --no-audio --out ~/demos records the second screen at 30fps, silently, into ~/demos. The full reference is in the CLI docs.
What differs between macOS and Linux
- macOS 15 and newer: native ScreenCaptureKit capture at 60fps by default, system audio plus mic, contextual cursor icons, and the ● REC menu-bar item. Older macOS falls back to an ffmpeg recorder with video only.
- Linux: X11 sessions only. It records with ffmpeg's x11grab (your ffmpeg from PATH, or a bundled one) and tracks clicks with uiohook. Video only for now. Encoding is software
libx264, so a 4K display at 60fps may not keep up; drop to--fps 30if frames stutter. Fractional HiDPI scaling can make the cursor position drift.
If you only need a raw file: built-in commands
screencapture on a Mac
macOS ships screencapture, the same tool behind the screenshot shortcuts. With -v it records video:
screencapture -v demo.mov # record until you press a key in this terminal
screencapture -V 60 -g -k demo.mov # 60 seconds, with your mic, clicks shownThe flags worth knowing are -V <seconds> for a fixed length, -g for audio from the default input (your mic), -k to draw clicks, -R x,y,w,h to record a rectangle and -D 2 to pick a display. The terminal app you run it from needs Screen Recording permission in System Settings → Privacy & Security. We cover the rest of the built-in Mac options in how to record your screen on a Mac.
What you get is a plain .mov of the full display at its native resolution. No zoom, no cursor clean-up, no background. On a Retina screen the text is tiny when someone watches it in a small player, which is the problem we unpack in why screen recordings look bad.
ffmpeg on macOS (avfoundation)
ffmpeg gives you control over codec, frame rate and quality from one line. On macOS it captures through the avfoundation input. First list the devices, because the screen and mic indexes differ between machines:
ffmpeg -f avfoundation -list_devices true -i ""Look for a line like [1] Capture screen 0 under video devices and your mic under audio devices. Then record, using "screen:mic" indexes:
ffmpeg -f avfoundation -framerate 30 -capture_cursor 1 -capture_mouse_clicks 1 \
-i "1:0" -c:v libx264 -preset veryfast -crf 20 -pix_fmt yuv420p \
-c:a aac demo.mp4Press q to stop. -pix_fmt yuv420p matters: without it some players, including QuickTime and many browsers, won't play the file. If your Mac can't keep up at full Retina resolution, add -vf scale=1920:-2 or switch to the hardware encoder with -c:v h264_videotoolbox -b:v 12M.
The catch on macOS is system audio: avfoundation sees microphones, not what your Mac is playing. To capture app sound you need a virtual audio device such as BlackHole routed as an input. The whole setup is in recording a Mac screen with system audio.
ffmpeg on Linux (x11grab)
On an X11 session, ffmpeg's x11grab input records the screen from the command line. Check your session and screen size first:
echo $XDG_SESSION_TYPE # should print x11
xdpyinfo | grep dimensions # e.g. 1920x1080 pixelsThen record the whole display, with PulseAudio or PipeWire-Pulse audio:
ffmpeg -f x11grab -framerate 30 -video_size 1920x1080 -i :0.0 \
-f pulse -i default \
-c:v libx264 -preset veryfast -crf 20 -pix_fmt yuv420p -c:a aac demo.mp4To record one area, set -video_size to its size and add the offset to the display: -video_size 1280x720 -i :0.0+100,200. To record what you hear rather than your mic, replace default with the monitor source listed by pactl list short sources (it ends in .monitor).
Wayland is different. x11grab only sees X11, so on a Wayland session you get a black frame or only XWayland windows. On Wayland, use your desktop's built-in recorder (GNOME has one on Shift+Ctrl+Alt+R), wf-recorder on wlroots compositors such as Sway and Hyprland, or OBS's PipeWire screen-capture source. Our Screen Studio for Linux guide covers X11 and Wayland in more depth.
Adding zoom to an ffmpeg recording
ffmpeg can zoom, but only with numbers you work out yourself. A static crop is easy: -vf "crop=960:540:400:200,scale=1920:1080" zooms 2× into one region for the whole clip. An animated zoom that follows your clicks means writing zoompan or crop expressions per shot, with coordinates you read off the video by hand. That's fine for one shot and slow for a two-minute demo, which is the job ZoomCap's CLI does for you. Our guide to zooming in on a screen recording covers both routes.
If your demo is text-only: asciinema and VHS
If everything you want to show happens inside a terminal and you don't need video, a text recorder is the right tool. It captures the characters, not the pixels, so the result stays sharp at any size, weighs kilobytes and can be copied from.
- asciinema records a live session:
asciinema rec demo.cast, type, thenexitor Ctrl+D. You play it back withasciinema play demo.cast, embed it with the asciinema player, or turn it into a GIF with its companion toolagg. - VHS records a script. You write a
.tapefile and runvhs demo.tape; it types for you and renders a GIF, MP4 or WebM. Because the demo is a file, you can regenerate it in CI whenever the output changes.
# demo.tape
Output demo.gif
Set FontSize 22
Set Width 1200
Set Height 600
Type "npm test"
Enter
Sleep 3sNeither captures a browser, an IDE or anything graphical, and neither records audio. For docs and READMEs that's fine. For a launch video or a product demo that leaves the terminal, you need real video. We compare the approaches in how to record a terminal demo.
If you need $0, Windows or headless CI: OpenScreen
OpenScreen is a free, open-source app (Free for personal and commercial use, no watermark, no account (MIT)). According to its README and CLI reference (checked September 2026), it ships a headless command-line interface for scripts and CI:
openscreen sources # list displays, windows and mics
openscreen record --duration 20 --project demo.openscreen --json
openscreen export demo.openscreen -o demo.mp4 --auto-zoom --jsonexport --auto-zoomadds zooms on the recorded clicks;captionstranscribes with Whisper locally; every command can emit NDJSON with--json.- It runs on Windows (headless recording on Windows 10 build 19041 and newer, per its CLI reference) and renders MP4 without a visible window, which suits CI.
- The CLI is the desktop app's own binary, so you install OpenScreen first. On Linux it records through the xdg-desktop-portal, so the portal's picker opens on every run and it can't start unattended there.
- Its README lists motion blur and per-segment speed. The project notes it is under active development and the CLI and project format may still change; it has no paid support.
When not to use ZoomCap
Skip it if your demo never leaves the terminal (asciinema or VHS), if you need the whole pipeline to run headless in CI or on Windows (OpenScreen or VHS), if you're on Wayland, or if a raw file is all you need (OBS Studio, ffmpeg or screencapture are free). It also has no motion blur or share links.
Tips for recording from the terminal
- Record at 1080p-class resolution. A 4K or Retina capture shrunk into a phone player makes text unreadable. Lower the display resolution, or record one display with small dimensions, before you start.
- Make the font bigger than feels natural. 18 to 22pt in the terminal and IDE reads well after zoom and compression.
- Clear the desktop and notifications. Turn on Do Not Disturb and close anything personal; the recorder captures the whole display.
- Click before you type. With ZoomCap, a click on the field or pane you're about to type into tells the typing zoom where to aim.
- Keep a master MP4. Make GIFs and WebM copies from it rather than re-recording; see which video format to export.
Frequently asked questions
What's the easiest way to record a demo video from the terminal?
Run npx zoomcap record. It records your screen on macOS or Linux X11, logs your clicks and typing, and when you press q it opens ZoomCap's editor with zooms already placed, ready for a background, captions and export up to 4K. The CLI is on the paid plans, $29 once or $12.49 a month.
Can I record my screen from the terminal on a Mac without installing anything?
Yes, for a raw file. macOS ships screencapture, so screencapture -v demo.mov starts a screen recording and a key press in that terminal stops it. Add -g for your microphone, -k to show clicks and -V 60 for a fixed 60-second take. It records a plain .mov with no zoom, background or editor, and the terminal app needs the Screen Recording permission.
How do I record the screen from the command line on Linux?
On an X11 session, npx zoomcap record gives you a finished demo with automatic zoom, and ffmpeg with x11grab gives you a raw file: ffmpeg -f x11grab -framerate 30 -video_size 1920x1080 -i :0.0 demo.mp4, plus -f pulse -i default for audio. Neither captures a Wayland session; there, use your desktop's built-in recorder, wf-recorder on wlroots compositors, or OBS's PipeWire source.
Does the ZoomCap CLI work on Windows or Wayland?
Not yet. The ZoomCap CLI runs on macOS and on Linux X11 sessions, and on Linux it records video without audio. On Windows or Wayland you can use ZoomCap's free browser recorder in Chrome or Edge, where you place zooms by hand.
Where do ZoomCap CLI recordings go? Is anything uploaded?
Nothing is uploaded. Each recording is written to its own folder under ~/Movies/ZoomCap (or the folder you pass with --out) as screen.mp4 plus zoomcap.meta.json. When you stop, the CLI serves those files to the editor at zoomcap.live over localhost, and editing and export run in your browser on your computer. The CLI records the timing of key presses for typing zoom, never which keys you pressed.
Record your first demo
Try the editor free with the browser recorder, no install needed. When you want the one-command CLI with automatic zoom and watermark-free exports, it's $29 once on the pricing page.
Related: Screen Studio alternatives for Linux, terminal demo videos and free online screen recorders.