Looking for the gift of automation? Look no further than AutoPkg!
AutoPkg is an open-source tool available on GitHub. It automates third-party software packaging, deployment, and distribution updates.
(This is awesome for admins, who do a ton of that.)
This is especially beneficial in enterprise and educational environments, where managing multiple macOS machines requires so many third-party updates it’s basically a second job.
Facts about AutoPkg:
Primarily runs on macOS but can work on other operating systems with limitations.
Written in Python and uses processors to automate workflows.
Uses YAML-based recipes (formerly PLIST files).
Why use AutoPkg?
Here are some reasons why you should consider using AutoPkg:
Saves time: No need to package every app manually.
Ensures consistency: Automates updates for reliability.
Integrates with Munki: Works with Munki to detect software updates and automate their import.
Open-source & community-driven: Premade recipes are available for use.
AutoPkg helps admins add new software versions to their third-party software by taking actions like:
Detecting available software updates.
Downloading the latest binaries.
Extracting relevant metadata.
Validating signatures or hashes for security.
Formatting packages for deployment tools.
Importing packages into deployment systems.
Deploying updates to test machines before broader distribution.
Manage your Apple fleet with ease
Powerful yet effortless mobile device management is just a few clicks away.
Key features of AutoPkg
If you’re trying AutoPkg at home, remember to install Xcode / Xcode command-line tools!
1. Deploys software automatically
AutoPkg eliminates the need for manual app downloads and packaging while ensuring users have the latest software versions. AutoPkg does this by using community-maintained recipes.
2. Offers recipe-based customization
Recipes define how software is downloaded, processed, and imported into package management tools like Munki! (Can you tell Munki is our favorite?)
Recipes can:
Find the latest version of a software package.
Download .pkg or .dmg files.
Package or repackage downloads. (This includes fixing packages.)
Import .pkg or .dmg files into Munki.
Whether you need to use a preexisting recipe or create a custom recipe for a specific function, AutoPkg has you covered!
Check out AutoPkgr for a GUI! AutoPkg + AutoPkgr go together like peanut butter and jelly.
3. Integrates with deployment tools
AutoPkg works seamlessly with deployment tools like Munki to manage software installations, making patching your fleet a breeze. This is fantastic because SimpleMDM offers a native Munki integration.
(More on Munki + SimpleMDM coming soon!)
How does AutoPkg work?
You can install the AutoPkg download file to get started.
Step 1: AutoPkg runs recipes to automatically download software.
Step 2: It processes the installer (e.g., converting .dmg files to .pkg).
Step 3: The package is imported into a deployment system like Munki.
Step 4: AutoPkg logs all actions for transparency and troubleshooting.
Remember, AutoPkg is just an engine; you still need recipes. After installing AutoPkg, run:
autopkg repo-add recipes in the terminal to get the official recipe repository.
autopkg list-recipes to see your recipes.
You can find other recipes by browsing autopkg repositories and add these recipes by running autopkg repo-add <repository-name>
AutoPkg components
AutoPkg consists of these components:
The AutoPkg tool
The packaging server
Processors
Recipes
AutoPkg recipes
AutoPkg recipes are written in YAML (Yet Another Markup Language). Here are some other useful facts about AutoPkg recipes:
Use processors to automate tasks.
Define arguments and configurations for customization.
Reference other recipes to enhance automation.
Contain no code but can use regular expressions for pattern matching.
After installation of AutoPkg, running autopkg list-recipes
in terminal will output a loooooongggg list of available recipes to choose from, like the image below:

AutoPkg processors
Processors are the building blocks for recipes. They’re written in Python to enable flexibility and automation. Processors also:
Define input arguments, defaults, and outputs for customization.
Serve as the core automation logic for AutoPkg workflows.
Want to dive deeper into the nuts and bolts of AutoPkg? Check out this MacAdmins session on AutoPkg.
AutoPkg FAQs
Who uses AutoPkg?
Anyone can use AutoPkg! But typically, you’ll see users in the space of:
Mac IT administrators in large organizations.
Educational institutions managing student and staff macOS devices.
Enterprise IT teams automating software updates at scale.
What’s the difference between YAML and PLIST in AutoPkg?
PLIST (property list): Previously, AutoPkg recipes were written in PLIST format, which was structured and commonly used in macOS configurations.
YAML (Yet Another Markup Language): AutoPkg transitioned to YAML for better readability, comment support, and simplified recipe management.
Why make the switch to YAML?
Consider switching to YAML because it’s easier to read and edit. YAML also supports complex configurations with less syntax overhead and aligns with modern automation tools.
When should I use YAML vs. PLIST?
Use YAML for DevOps, CI/CD pipelines, and general app configurations.
Use PLIST for macOS/iOS apps, preferences, or system settings.