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:

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

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.

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.