Skip to content

Interactive macOS .pkg and .dmg installer helper with Finder Quick Action

Notifications You must be signed in to change notification settings

madebycm/pkgflow

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pkgflow

Interactive macOS .pkg and .dmg installer helper with a Finder Quick Action.

Scans a directory for .pkg and .dmg files, validates packages, and lets you pick which ones to install — all from a curses-based TUI or directly from a right-click in Finder.

Features

  • Recursively scans directories for .pkg and .dmg files (configurable depth)
  • Validates .pkg bundles via installer -pkginfo before installation
  • Mounts .dmg images and extracts contained .pkg files
  • Interactive curses picker for selecting packages
  • Handles Distribution packages with multiple choices automatically
  • Finder Quick Action for launching directly from right-click menu

Requirements

  • macOS
  • Python 3 (ships with macOS or via Xcode Command Line Tools)

Usage

Command Line

# Scan current directory
python3 pkgflow.py

# Scan a specific directory
python3 pkgflow.py /path/to/packages

# Limit scan depth
python3 pkgflow.py /path/to/packages --max-depth 2

Interactive Controls

Key Action
/ or k / j Navigate
Space Toggle selection
d Unpack selected DMGs
Enter Confirm and install

Finder Quick Action

pkgflow includes a macOS Automator workflow that adds a Quick Action to Finder's right-click menu. Right-click any folder or file, go to Quick Actions, and select pkgflow to launch it in Terminal for that directory.

Finder Quick Action

Installing the Quick Action

Run the install script:

./install-workflow.sh

This copies pkgflow.workflow to ~/Library/Services/.

Activating the Extension

After installing, you need to enable the extension in macOS:

  1. Open System SettingsPrivacy & SecurityExtensionsFinder Extensions
  2. Or: System SettingsGeneralLogin Items & ExtensionsFinder (depending on macOS version)
  3. Toggle pkgflow on

Once enabled, the Quick Action appears in Finder's right-click context menu under Quick Actions.

How It Works

  1. Scan — Walks the target directory tree collecting .pkg and .dmg files
  2. Validate — Runs installer -pkginfo on each .pkg to check validity
  3. Select — Presents an interactive picker (or auto-selects in non-interactive mode)
  4. Extract — Mounts selected .dmg files and copies out any .pkg files found inside
  5. Install — Runs sudo installer -pkg ... -target / for each selected package, with automatic applyChoiceChangesXML for Distribution packages

License

MIT

About

Interactive macOS .pkg and .dmg installer helper with Finder Quick Action

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published