Command Line Usage
Last updated: November 15, 2026
ShrinkCheck can recompress all your registered locations without opening a window. Run it on a schedule from cron or launchd, and new files get compressed without you having to think about it.
You add locations in the app as usual. The command line only recompresses locations you have already registered.
1. How to run it
Run the app's executable directly. If ShrinkCheck is in your Applications folder:
/Applications/ShrinkCheck.app/Contents/MacOS/ShrinkCheck --auto-recompress
There are three options:
--auto-recompress: recompresses your registered locations, then quits--help: shows usage--version: shows the version
It prints one line when it starts and one when it finishes. The last line shows the counts and the space saved.
[ShrinkCheck] --auto-recompress: Scanning 6 registered items
[ShrinkCheck] --auto-recompress finished: scanned 1,520 / succeeded 1,500 / failed 0 / skipped (already compressed) 0 / skipped (does not shrink) 12 / skipped (in use) 8 / savings 210 MB / elapsed 18.4 s
open -a ShrinkCheck --args --auto-recompress also recompresses, but in that form you get neither the printed lines nor the exit code (you get the result of the open command instead). For scheduled runs, run the executable directly as shown above.
2. Running on a schedule
launchd (recommended)
Save the following as ~/Library/LaunchAgents/local.shrinkcheck.autorecompress.plist. This example runs every Sunday at 3:00 and writes the output to a log file. Replace yourname with your Mac user name.
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>local.shrinkcheck.autorecompress</string>
<key>ProgramArguments</key>
<array>
<string>/Applications/ShrinkCheck.app/Contents/MacOS/ShrinkCheck</string>
<string>--auto-recompress</string>
</array>
<key>StartCalendarInterval</key>
<dict>
<key>Weekday</key><integer>0</integer>
<key>Hour</key><integer>3</integer>
<key>Minute</key><integer>0</integer>
</dict>
<key>StandardOutPath</key>
<string>/Users/yourname/Library/Logs/ShrinkCheck-auto.log</string>
<key>StandardErrorPath</key>
<string>/Users/yourname/Library/Logs/ShrinkCheck-auto.log</string>
</dict>
</plist>
Then load it in Terminal:
launchctl bootstrap gui/$(id -u) ~/Library/LaunchAgents/local.shrinkcheck.autorecompress.plist
To stop, run the following and then delete the plist file:
launchctl bootout gui/$(id -u)/local.shrinkcheck.autorecompress
If your Mac is asleep at the scheduled time, launchd runs the job after it wakes up.
cron
Add this line with crontab -e to run every Sunday at 3:00:
0 3 * * 0 /Applications/ShrinkCheck.app/Contents/MacOS/ShrinkCheck --auto-recompress
If your Mac is asleep at the scheduled time, cron skips that run.
3. Safety behavior
- Files that may be open are left alone: files modified in the last 30 minutes are skipped. Compressing a file you are editing could, depending on how the app saves, roll back your changes.
- Checks before it starts: just like the app, it checks for stop notices and whether this Mac has passed the compression self-check. If not yet, it runs the self-check first (up to 30 seconds). If it should not compress, it quits without compressing anything.
- One file at a time: unlike compression in the app (8 at a time), it processes one file at a time so it stays out of the way of your other work.
- Files that will not shrink are not retried: files that did not shrink before, and files over 2 GB, are skipped.
- Files in use by other apps are never modified: they are skipped and counted as "skipped (in use)" in the last line.
Command line runs are not recorded in the app's History. Check the printed lines (or the log file) for results.
4. Exit codes
The exit code also tells you the result, which is handy for cron email notifications or scripts.
0: finished (including when there was nothing to do)1: some files could not be processed, or the registered locations could not be loaded2: nothing was compressed because a stop notice applies3: nothing was compressed because the compression self-check did not pass4: nothing was compressed because the self-check could not finish (timed out or low disk space); it will be tried again on the next run
For 2 to 4, the reason is printed to standard error.
5. Switching from the old app (CmpfsCheck)
With v1.0.0, CmpfsCheck was renamed ShrinkCheck. If your cron or launchd setup mentions CmpfsCheck, update the path and the app name.
# old /usr/bin/open -a CmpfsCheck --args --auto-recompress # new /Applications/ShrinkCheck.app/Contents/MacOS/ShrinkCheck --auto-recompress
Your registered locations carry over, so there is no need to add them again.
