A tiny CLI for the macOS screenshot settings that are otherwise buried in
defaults write com.apple.screencapture incantations β format, save location,
window shadow, and filename prefix.
shotctl format jpg
shotctl location ~/Screenshots
shotctl statusbrew install sleipner01/tap/shotctlThat's it. Tab completions work immediately β no .zshrc changes needed.
To update later: brew upgrade shotctl.
| Command | What it does |
|---|---|
shotctl format <fmt> |
Set the screenshot image format |
shotctl location <dir> |
Set the directory screenshots are saved to |
shotctl shadow <on|off> |
Include or drop the window shadow on window captures |
shotctl prefix <string> |
Set the screenshot filename prefix |
shotctl status |
Show all current settings |
shotctl reset [setting] |
Restore one setting β or all of them β to the macOS default |
Plus -h/--help and -v/--version.
Run any setting with no argument and it reports the current value instead of
erroring, so you never have to remember the defaults key:
$ shotctl location
location: /Users/you/Screenshots
Change it with: shotctl location <directory>Every write is read back and verified, so you find out immediately if macOS didn't take the change.
$ shotctl status
com.apple.screencapture
format jpg
location /Users/you/Screenshots
shadow off
prefix Shotpng Β· jpg Β· jpeg Β· pdf Β· tiff Β· gif Β· bmp Β· heic
- PNG β best for UI screenshots, text, graphics (lossless). The macOS default.
- JPG/JPEG β best for photos (lossy, much smaller files)
- HEIC β modern, good compression (macOS 10.13+)
- PDF β vector-friendly, handy for print workflows
- TIFF β large files, high quality (rarely needed)
- GIF β limited use (256 colors)
- BMP β uncompressed, rarely useful
An unrecognised format is passed through with a warning rather than rejected β macOS may support formats this list doesn't know about.
I take many screenshots of print products, where the optimal format varies. Switching formats lets me significantly reduce file size on both:
- internal servers, and
- the websites where these images are used.
This tool makes that switch instant and painless π
macOS. Nothing else β the script runs on the zsh that ships with the system.
Note: changing the save location or format affects the built-in screenshot UI (ββ§3 / ββ§4 / ββ§5). The
screencapturecommand-line tool takes an explicit filename and ignores these settings.
Tagging is all that's required β CI computes the checksum, bumps the Homebrew
formula in sleipner01/homebrew-tap,
and cuts the GitHub release:
git tag v1.1.0 && git push origin v1.1.0The VERSION constant in bin/shotctl stays "dev" in git β the formula
rewrites it at install time from the tag, so it can never drift.
Contributions are welcome! Feel free to:
- Report bugs or suggest features via Issues
- Submit pull requests for improvements
- Share feedback or use cases
MIT License - see LICENSE file for details.