← 返回
内容创作 中文

Record screen, microphone or camera from macOS terminal

macOS CLI tool to record microphone audio, screen video or screenshot, and camera video or photo from the terminal with device listing and output control.
{"answer":"macOS 命令行工具:在终端录制麦克风音频、屏幕视频/截图及摄像头视频/照片,支持设备列表与输出控制。"}
atacan
内容创作 clawhub v0.2.0 1 版本 99861 Key: 无需
★ 5
Stars
📥 2,056
下载
💾 96
安装
1
版本
#latest

概述

record CLI

A macOS command-line tool for recording audio, screen, and camera output. Designed for both human users and AI agents operating in a terminal.

Output file paths are printed to stdout. Status messages go to stderr, making the tool pipeline-friendly.

IMPORTANT: User Consent Required

Always ask the user for explicit permission before running any recording command. Recording audio (microphone), screen, or camera captures sensitive data and may be unexpected. Before executing record audio, record screen, or record camera, confirm with the user that they intend to record, what will be captured, and the duration. Listing devices (--list-devices, --list-displays, --list-windows, --list-cameras) and taking screenshots (--screenshot) are less intrusive but should still be confirmed if not explicitly requested.

Installation

brew install atacan/tap/record

Quick Reference

# Audio
record audio --duration 10                    # Record 10s of audio
record audio --duration 5 --json              # JSON output with file path

# Screen
record screen --duration 5                    # Record screen for 5s
record screen --screenshot                    # Take a screenshot
record screen --screenshot --output /tmp/s.png

# Camera
record camera --duration 5                    # Record webcam for 5s
record camera --photo                         # Take a photo

Subcommands

SubcommandPurpose
------
record audioRecord from microphone
record screenRecord screen video or take a screenshot
record cameraRecord from webcam or take a photo

Each subcommand has its own --help flag with full option details.

Key Patterns for AI Agents

Get the output file path

The tool prints the output file path to stdout. Capture it:

FILE=$(record audio --duration 5)
echo "Recorded to: $FILE"

Use --json for structured output

All subcommands support --json to emit machine-readable JSON to stdout:

record audio --duration 5 --json

Use --duration for non-interactive recording

Without --duration, the tool waits for a keypress to stop (requires a real TTY). AI agents should always pass --duration to ensure the command terminates.

List available devices

record audio --list-devices
record screen --list-displays
record screen --list-windows
record camera --list-cameras

Add --json for structured output.

Control output location

record audio --duration 5 --output /tmp/recording.m4a
record screen --screenshot --output /tmp/screen.png --overwrite

Without --output, files are saved to a temporary directory.

Screen recording with audio

record screen --duration 10 --audio system    # system audio only
record screen --duration 10 --audio mic       # microphone only
record screen --duration 10 --audio both      # system + mic

Capture a specific window or display

record screen --screenshot --window "Safari"
record screen --duration 5 --display primary

macOS Permissions

The terminal app (Terminal, iTerm2, etc.) must have the relevant permission enabled in System Settings > Privacy & Security:

  • Microphone - for record audio and record camera --audio
  • Screen Recording - for record screen
  • Camera - for record camera

Troubleshooting

If a command fails or behaves unexpectedly, run:

record <subcommand> --help

The --help output always reflects the installed version and is the authoritative reference.

Detailed Command References

For full option listings and advanced usage:

版本历史

共 1 个版本

  • v0.2.0 当前
    2026-03-28 20:00 安全 安全

安全检测

腾讯云安全 (Keen)

安全,无风险
查看报告

腾讯云安全 (Sanbu)

安全,无风险
查看报告

🔗 相关推荐

content-creation

Baidu Wenku AIPPT

ide-rea
使用百度文库 AI 智能生成 PPT,自动根据内容选择模板。
★ 66 📥 46,208
developer-tools

Translate CLI

atacan
关于 `translate` CLI 的运行与配置指南,涵盖文本/标准输入/文件/通配符输入、提供商选择、预设及自定义提示词模板等内容。
★ 0 📥 2,261
content-creation

Humanizer

biostartechnology
消除AI写作痕迹,使文本更自然真实。基于维基百科"AI写作特征"指南,识别并修正夸张象征、宣传用语、肤浅-ing分析、模糊归因、破折号滥用、三项排比、AI词汇、负面平行结构及冗长连接词等模式。
★ 860 📥 199,873