Shortcuts and App Intents

BetterZip 6 ships native Shortcuts actions built on Apple’s App Intents framework, so you can wire BetterZip into the rest of macOS’ automation system: alongside Finder, Mail, and the rest.

Available actions

Six actions are bundled with the app. They show up in the Shortcuts app under BetterZip and can be combined freely with any other Shortcuts actions.

  • Compress Files: takes one or more files or folders and an optional Preset, returns the resulting archive as a file. With no preset, BetterZip uses your default save preset.
  • Extract Archive: takes one or more archives and an optional Preset, returns the extracted files/folders as a list of files. With no preset, BetterZip uses your default extract preset.
  • Test Archive: takes one or more archives, integrity-tests them, returns a text result: “All archives passed integrity test.” on success, “Failed archives: …” with the failed names, or “Archive test failed with error code N.” for other failures. Branch on it in Shortcuts with an If action.
  • List Archive Contents: takes one archive, returns the list of item paths inside as a list of strings (one entry per file or folder).
  • Get Archive Info: takes one archive, returns a small text summary: format, file count, total size, compressed size, and whether it’s encrypted.
  • Open Archive in BetterZip: takes one archive and opens it in BetterZip’s main window for interactive editing. Brings BetterZip to the foreground.

Presets

The Preset parameter on Compress Files and Extract Archive is dynamically populated from your save and extract presets. Pick one from the menu in Shortcuts, or leave it empty for the default. Pass a string (the preset’s name) when chaining actions programmatically.

Where they appear

The actions show up in three places:

  1. The Shortcuts app, under “BetterZip” in the action library.
  2. Spotlight and Siri: each action registers a trigger phrase: “Extract archive with BetterZip”, “Compress files with BetterZip”, “Test archive with BetterZip”, “List archive contents with BetterZip”, “Open archive in BetterZip”, “Get archive info with BetterZip”. Typing or speaking the phrase invokes the action directly.
  3. Focus filters and the shortcuts command-line tool (shortcuts run "…"), which can invoke any of these actions through the App Intents system.

Example shortcuts

  • Daily backup: pick a folder → Compress Files with a backup preset → move the archive to your backup volume → verify with Test Archive.
  • Inbox triage: a folder action runs whenever a .zip hits Downloads → Extract Archive → move the original to the Trash.
  • Quick peek: select an archive in Finder → Get Archive Info → show the result in a notification, so you can decide whether to extract it.

Notes and limitations

  • There is no password parameter on the extract action. If an archive is encrypted, BetterZip uses its password manager which may prompt for a password interactively. Keep this in mind for unattended shortcuts: store the password in the password manager ahead of time.
  • Operations run asynchronously and the action waits for the operation to finish before returning. Long compressions or extractions block the Shortcut until they complete; there is a 10-minute internal timeout per action.
  • The Compress Files output is the archive file that was just written: pipe it straight into another action (Move, Share, Mail) without an intermediate file picker.
  • The Extract Archive output is the list of files and folders that were extracted: use Repeat with each to act on them individually.
  • List Archive Contents returns paths only, not sizes or dates. Use Get Archive Info for archive-level stats.