Blog
DevelopersSeptember 29, 2026 · 15 min read
By the ZoomCap teamPublished September 29, 2026Facts checked September 29, 2026

Command-Line Screen Recorder With Auto Zoom (macOS & Linux)

Record your screen from the terminal with one command and get automatic zoom on your clicks. CLI recorders on macOS and Linux compared, with setup steps.

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?

ToolStart commandPrice (checked Sep 2026)PlatformsAudioAuto-zoom triggerMain tradeoffSource
ZoomCap CLInpx 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 LinuxClicks and typing bursts, placed automatically in the editorFinished demo from one command; no Windows or Wayland yetTested by us
screencapturescreencapture -v out.movFree, built inmacOSMic with -gNoneRaw file, no editing at allmacOS manual
ffmpeg (avfoundation)ffmpeg -f avfoundation -i "1:0" out.mp4Free, open sourcemacOSMic; system audio needs a virtual deviceNoneFull control, but you edit elsewhereffmpeg docs
ffmpeg (x11grab)ffmpeg -f x11grab -i :0.0 out.mp4Free, open sourceLinux X11Yes, via -f pulseNoneNo Wayland; you edit elsewhereffmpeg docs
asciinemaasciinema rec demo.castFree, open sourcemacOS, LinuxNoNot applicable (text)Terminal text only, no GUIasciinema docs
VHSvhs demo.tapeFree, open sourcemacOS, Linux, WindowsNoNot applicable (scripted)Scripted terminal only, no GUIVHS README
OpenScreen CLIopenscreen recordFree for personal and commercial use, no watermark, no account (MIT)macOS, Windows, Linux; also a CLI for scripts and CIMic and system audio flagsRecorded clicks, with --auto-zoom at exportNeeds the desktop app; Linux portal picker opens every runGitHub 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 record runs 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

  1. Check you have Node 18 or newer (node -v). npx comes with it. Nothing else installs permanently.
  2. 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.
  3. 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.
  4. Pick a display if you have more than one: npx zoomcap displays lists them, and --display 1 chooses one.
  5. 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.
  6. Stop with q or Ctrl+C in the terminal, ⌃⌥S from any app, or the ● REC menu-bar item on macOS 15+. Press ⌃⌥Z mid-take to force a zoom at that moment.
  7. 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 flagWhat it does
npx zoomcap recordSign in on first run, record, then open the editor
npx zoomcap doctorCheck permissions, recorder, displays and OS before recording
npx zoomcap displaysList displays and their indexes
npx zoomcap logoutSign out and clear the cached session
npx zoomcap debugPrint 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-micSystem audio only, no microphone (macOS)
--no-audioSilent video (macOS)
--os-cursorBake in the real macOS cursor instead of the redrawn one
--no-openPrint 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 30 if 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 shown

The 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.mp4

Press 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 pixels

Then 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.mp4

To 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, then exit or Ctrl+D. You play it back with asciinema play demo.cast, embed it with the asciinema player, or turn it into a GIF with its companion tool agg.
  • VHS records a script. You write a .tape file and run vhs 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 3s

Neither 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 --json
  • export --auto-zoom adds zooms on the recorded clicks; captions transcribes 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.

What ZoomCap costs

Checked September 29, 2026

Free

$0

Browser recorder and editor, 2 exports a month with a small watermark.

Lifetime

$29

One payment. Unlimited exports, no watermark, the CLI, 4K export.

Pro

$12.49/mo

Same features as Lifetime, cancel anytime.

Over three years, ZoomCap Lifetime costs $29 and Screen Studio's yearly plan costs $324 ($108 a year), a difference of $295. Of the 18 recorders we price-checked, ZoomCap is the only one at $29 one-time that records in the browser with nothing to install, zooms on both clicks and typing, and runs from the terminal on macOS and Linux. Start free, and pay once only if it earns it.

14-day refund window on paid plans · refund terms · pricing page

Is ZoomCap safe?

Your recordings
Recorded, edited and encoded on your own computer. Video never goes to our servers: the CLI hands the file to the editor over localhost. See the data flow
Keystrokes
Only the timing of key presses, to drive typing zoom. Which keys you pressed is never captured or stored.
Account and payments
Sign-in and licence records are held by Google Firebase. Payments are processed by Dodo Payments, so we never see your card. Privacy policy
Refunds and support
If ZoomCap doesn't work for you and we can't fix it, email us within 14 days for a refund. Commercial use is allowed on every plan. Contact us · About ZoomCap

What ZoomCap doesn't do

  • No Windows CLI yet. On Windows, use the free browser recorder in Chrome or Edge.
  • No motion blur.
  • Speed changes apply to the whole video (1×, 1.5× or 2×), not per section.
  • Automatic zoom needs the CLI's click data. On browser recordings and imported videos you place zooms by hand.
  • On Linux the CLI records video only (X11 sessions, no Wayland, no system audio yet).
  • No hosted share links, comments or viewer analytics. You export a file and share it yourself.