name: frames-cli
description: Frame screenshots and screen recordings with the frames CLI. Use this skill when the user asks to add Apple device bezels, frame screenshots or videos, create device mockups, inspect screenshot/device matches, or batch-process screenshot/video folders with the command line.
Apple Frames CLI
frames 1.3.0 is a single-file Python CLI that applies Apple device bezels to screenshots and videos, auto-detects devices from input dimensions, applies masks when needed, and can merge multiple framed results. Video support uses external ffmpeg 5.1+ and ffprobe 5.1+ with no extra Python media stack.
What Agents Should Know
framesis the default command.frames screenshot.pngandframes frame screenshot.pngare equivalent.- Use
frames --json ...for automation. Put global flags such as--json,--assets, and--verbosebefore subcommands for the broadest compatibility. - Device support comes from the installed asset bundle, not hardcoded names in this skill. Use
frames listandframes list-colorsas the source of truth when exact names matter. - On macOS, the default asset location is the Apple Frames shortcut folder in iCloud Drive. That avoids downloading a second copy when the user already has the shortcut assets installed.
- Use
frames video ...for.mp4,.mov, and.m4v; the defaultframes ...path is for images. - Use
frames video-info ...to probe videos and resolve the matching frame metadata without rendering. - Video framing requires external
ffmpeg5.1+ andffprobe5.1+.frames setupchecks this and can offer a Homebrew install on macOS;frames doctorreports video tool readiness. frames videopreserves single-video audio by default. Pass--strip-audiowhen the user asks for silent output, privacy-safe delivery, or validation clips where audio does not matter.frames video --preset compact|balanced|bestcontrols MP4 export size/quality;bestis the default. Video exports report output file size and source-vs-output savings in human and JSON output.- Use
frames video --alpha ...orframes video --background transparent ...for transparent ProRes 4444.movoutput. This works for single videos and merged videos; MP4/H.264 and MP4/HEVC do not support alpha. - Explicit transparent output file paths must use a
.movextension. Use an output directory when you want the CLI to pick the.movfilename.
Quick Reference
# Frame one screenshot
frames screenshot.png
# Frame every top-level image in a folder
frames ~/Screenshots/
# Pick a specific color or randomize colors
frames -c "Cosmic Orange" screenshot.png
frames -c random *.png
frames --colors "Silver,Space Black,random" one.png two.png three.png
# Frame videos
frames video-info recording.mp4
frames --json video-info recording.mp4
frames video recording.mp4
frames video --preset compact recording.mp4
frames video --preset balanced recording.mp4
frames video --preset best recording.mp4
frames video --alpha recording.mp4
frames video -m --alpha 1.mp4 2.mp4
frames video -m --background transparent 1.mp4 2.mp4
frames --json video --strip-audio recording.mp4
frames video --strip-audio recording.mp4
frames video --background "#f5f5f5" --codec hevc recording.mp4
frames video -m --playback-offset 1.mp4 2.mp4
frames video -m --colors "Silver,random" 1.mp4 2.mp4
# Force an exact frame instead of auto-resolving the newest variant
frames -d "iPhone 15 Pro Portrait" screenshot.png
# Merge framed outputs side by side
frames -m shot1.png shot2.png
# Merge without proportional physical scaling
frames -m --no-scale shot1.png shot2.png
# Batch merge sequential groups
frames -b 3 *.png
# Save to a separate output directory
frames -o ~/Framed *.png
# Save to a subfolder next to originals
frames -f *.png
frames --subfolder mockups *.png
# Inspect matches without framing
frames info screenshot.png
frames --json info ~/Screenshots/
# Discover supported devices and colors
frames list
frames list-colors "17 Pro"
# Manage default colors
frames colors
# Diagnose asset/config problems
frames doctor
# Download or re-point assets
frames setup
frames setup /path/to/Frames
Current Feature Surface
- Auto-detect devices from screenshot width, with height-based overlap disambiguation where needed.
- Resolve width-sharing devices to the newest default frame automatically. Pass
--deviceto skip variant resolution. - Apply frame colors by exact name, 1-based numeric index,
default, orrandom. - Use
--colorsfor per-input colors on images and videos; it maps comma-separated values to expanded inputs by order. - Apply masks when the asset entry requires clipping.
- Merge multiple framed outputs with physical-size normalization by default.
- Frame
.mp4,.mov, and.m4vfiles throughframes video; single-video audio is preserved unless--strip-audiois passed. - Use
--preset compact,--preset balanced, or--preset bestto tune MP4 export size/quality.bestis the default. - Report output file size and savings after video export in both human output and
--jsonagent output. - Use
--alphaor--background transparentto create transparent ProRes 4444 MOV output for single or merged videos. - Show a live terminal progress bar during video renders in interactive mode; JSON and non-TTY runs stay pipeline-friendly.
- Inspect video/device matches without rendering through
frames video-info. - Merge videos simultaneously with
frames video -m, or sequentially left-to-right withframes video -m --playback-offset. - Use
--no-scaleto disable proportional scaling and keep native framed sizes when merging. - Use
--batch Nto merge sequential groups.--batchimplies merge andNmust be at least2. - Save next to originals, into
--output, or into a validated single-name subfolder via-for--subfolder. - Copy a single output to the macOS clipboard with
--copy. - Inspect screenshots and folders with
info. - Diagnose assets and config with
doctor. - Save per-device default colors with
colors.
Command Notes
- Global flags:
--jsonfor machine-readable output--no-colorto disable ANSI color--assets PATHto override asset discovery-v/--verbosefor variant, resize, and mask details
- Use
frames video --helpandframes video-info --helpfor the human-facing video examples and option summaries. frames colorsis interactive in a real terminal. If stdin is not a TTY, orcursesis unavailable, it falls back to a plain printed color list.frames list-colorsdoes partial device-name matching.frames list-colors "17 Pro"is valid.- Directory inputs are expanded one level deep only. The CLI scans top-level image files inside the directory; it is not recursive.
- Supported input image extensions are
.png,.jpg,.jpeg,.heic,.tiff, and.webp. - Supported input video extensions are
.mp4,.mov, and.m4v. - Images larger than
20,000pxon either side trigger a warning. Images larger than50,000pxare rejected. --subfolderonly accepts a single directory name, not a path like../outorfoo/bar.
Video Notes
frames video-info FILEreports dimensions, duration, fps, codec, audio state, matched device, selected color, frame size, mask state, and resize metadata without creating an output video.frames video FILEwritesFILE_framed.mp4by default, or.movwhen--alpha,--codec prores, or--background transparentis used.--alphadefaults the background to transparent unless the user explicitly passes another--background.- Explicit alpha/transparent output files must end in
.mov; otherwiseframes videofails before rendering. - For one video,
--outputmay be an explicit output file path or a directory. For multiple individual videos, use an output directory. --mergecreates one horizontal video. Without--playback-offset, videos play simultaneously and duration is the longest input.--playback-offsetrequires--merge; videos play left to right, inactive future videos hold their first frame, and completed videos hold their final frame.- Merged videos are proportionally scaled by device
physicalHeightand bottom-aligned by default. Use--no-scaleonly when native framed pixel sizes matter more than physical proportion. - Single-video output preserves audio unless
--strip-audiois passed. Sequential--playback-offsetmerges concatenate audio and generate silence for inputs without audio. Simultaneous merges omit mixed audio in this version. --backgroundaccepts onlywhite,black,transparent, or#RRGGBB.transparentimplies alpha/ProRes MOV output.--codec h264is the default.--codec hevcis smaller but may be slower or less compatible. Use--codec proresor--alphafor transparent.mov.- Transparent merged videos preserve alpha with ProRes 4444 (
yuva444p10le), suitable for compositing in video editors and presentation tools. --preset compact|balanced|bestcontrols H.264/HEVC hardware bitrate and software CRF.bestis the default;balancedandcompacttrade quality for smaller files. ProRes/alpha output keeps ProRes settings.--quality Nis an expert software CRF override; lower is higher quality.--color randomrandomizes independently per input.--colors "A,B,random"maps values to expanded inputs by order and the count must match after directory expansion.video-infoaccepts--device,--color, and--colors; it uses the same resolution rules asframes video.- Taildrop or other delivery is separate from
frames; render first, verify the output, then use the delivery workflow the user requested.
JSON Output Behavior
frames --json screenshot.pngreturns one framed-image object with fields such assource,device,color,dimensions,frame_size,resized,masked,physicalHeight, andoutput.frames --json *.pngreturns{ "frames": [...] }for multiple individual outputs.frames --json -m ...returns a merged result withmerged,count, andframes.frames --json -b N ...returnsbatches,batch_size,total, andframes.- When proportional merge scaling is applied, per-frame
scale_factorvalues are included in the JSON output. frames --json info ...returns either one object or a list of objects, includingdevice,primary_match,colors,color_count,has_mask,resize_width,variants, andis_variant.frames --json video-info ...returns one video metadata object, or a list for multiple videos, includingdimensions,duration,fps,codec,audio,device,primary_match,color,frame_size,resize_width, andmask_missing.frames --json doctorreturns asset path/source/version, PNG count, config presence, issues, notes, and suggested next steps.frames --json video ...returns one video object, or{ "videos": [...] }for multiple individual outputs, includingpreset,output_size_bytes,output_size,source_size_bytes,source_size,savings_bytes,savings, andsavings_percent.frames --json video -m ...returnsmerged,duration,dimensions,playback_offset, audio state, top-level output size/savings fields, and per-inputframes. For transparent exports,alphaistrueon each frame andbackgroundreportstransparentunless another background was explicitly requested.
Assets and Config
Config file:
~/.config/frames/config.json
Config keys:
assets_path: explicit asset folder pathdefault_colors: saved default frame colors by base device nameuse_subfolder:trueforframed, or a custom folder name string
Asset resolution order:
--assetsFRAMES_ASSETSassets_pathfrom config- macOS default:
~/Library/Mobile Documents/iCloud~is~workflow~my~workflows/Documents/Frames - macOS fallback if valid:
~/Library/Application Support/frames/assets - On non-macOS platforms, the standard per-platform app-data directory is the default
Setup behavior:
frames setupdownloads the current asset archive fromhttps://cdn.macstories.net/AppleFrames401.zip.frames setup /path/to/Framespoints the CLI at an existing asset folder instead of downloading.- The asset folder must contain
NewFrames.json,version.txt, and the frame/mask PNGs. - Setup checks
ffmpeg/ffprobefor video framing and can install ffmpeg through Homebrew on macOS when run interactively. frames setup --subfolderandframes setup --no-subfolderupdate the default save behavior in config.frames doctoris the first command to run when assets were moved, edited, corrupted, or when video dependencies need verification.
Current Supported Device Families
The current v4 asset bundle used by frames 1.3.0 includes these primary families:
- iPhone: iPhone 17, iPhone 17 Pro, iPhone 17 Pro Max, iPhone Air, iPhone 16, iPhone 16 Plus, iPhone 12-13 Pro, iPhone 12-13 Pro Max, iPhone 12-13 mini, iPhone 8 / 2020 SE
- iPad: iPad mini 2021, iPad 2021, iPad Air 2020, iPad Pro 2018-2021 11-inch, iPad Pro 2018-2021 12.9-inch, iPad Pro 2024 11-inch, iPad Pro 2024 13-inch
- Mac: MacBook Neo, MacBook Pro 13, MacBook Air 2020, MacBook Air M5 13, MacBook Air M5 15, MacBook Pro M5 14, MacBook Pro M5 16, iMac M4, Studio Display, Studio Display XDR
- Watch: Watch Series 7 41, Watch Series 7 45, Watch Series 11 42, Watch Series 11 46, Watch Ultra 2024, Watch Ultra 3
Current default variant resolution favors the newest matching frame for shared screenshot sizes:
iPhone 17 Portraitresolves toiPhone 17 Pro PortraitiPhone 17 Landscaperesolves toiPhone 17 Pro LandscapeiPhone 17 Pro Maxshares sizes withiPhone 16 Pro MaxiPhone 16shares sizes withiPhone 15 ProiPhone 16 Plusshares sizes withiPhone 15 Pro MaxMacBook Pro M5shares sizes withMacBook Pro 2021MacBook Air M5 13shares sizes withMacBook Air 2022Studio Displayshares sizes withStudio Display XDRWatch Series 11shares sizes withWatch Series 10
If an exact older variant is required, pass --device with the exact frame name instead of relying on auto-detection.
Recommended Agent Workflow
- Run
frames --json info ...first when you do not control the screenshot source. For videos, runframes --json video-info ...when you need dimensions, duration, audio state, or the matched frame before rendering. - If the user asks for a specific device or color, confirm the exact names with
frames listorframes list-colors. - Use
frames doctorbefore changing config or re-downloading assets. - Use
--deviceonly when the user wants an exact frame, older variant, or a non-default shared-size match. - Use
--no-scaleonly when the user explicitly wants native framed sizes instead of physically proportionate merges. - For multi-video previews, choose
frames video -mfor simultaneous playback andframes video -m --playback-offsetfor left-to-right sequential playback. - Prefer
--strip-audiofor generated test artifacts unless the user specifically wants audio preserved. - After video rendering, verify with
ffprobewhen final output audio state, duration, codec, or stream count matters.