- Platforms
- macOS
- Products
- IntuneMunkiAutoPkg
- Result
- New app versions land in the Munki repository automatically, ready for Intune-managed Macs
Overview
Automate Munki packaging with AutoPkgr: it downloads new app versions, imports them into the Munki repository and rebuilds the catalogs on a schedule.
Not long ago, I wrote a post about trying out Munki, a macOS software management system and how to integrate it with Microsoft Intune using cloud-hosted Azure Blob Storage that supplies a Munki app repository of packages to managed macOS devices. Today, I am looking at a handy tool that automates the distribution of those software packages (.pkg and .dmg) by downloading and extracting them from archives and importing them directly into software distribution systems like Munki.
AutoPkg is an automation framework and command-line tool for macOS software packaging and distribution. It also has an admin friendly macOS app with a graphical interface called AutoPkgr (developed by Linde Group) which is a free and open-source app that makes it easy to install and configure the AutoPkg framework. The AutoPkgr integrates with popular recipe repositories and allows you to download app recipes with a click of a button (no command-line knowledge required).
Prerequisites
Before you start, check that you have the following.
| Area | What you need | Docs |
|---|---|---|
| Licence | Microsoft Intune Plan 1 | Licensing |
| Admin role | Intune Administrator, or a role with Device configurations permissions for the Munki script | Roles |
| Intune | Intune and Munki integration from my previous post | |
| Devices | Admin Mac (for example a Mac mini) running macOS 11 or later for AutoPkgr 2.0 | AutoPkgr |
Git, for example from the Xcode Command Line Tools (xcode-select --install) |
Setup | |
| Munki | Munki tools, which you can install from AutoPkgr | Releases |
| A Munki repository, for example created in MunkiAdmin | MunkiAdmin | |
| Recipe trust info optional recommended reading | Wiki |
Configuration
With the prerequisites in place, set it up in this order.
Connect AutoPkgr to the Munki repository
After downloading the AutoPkgr app (the screenshots show AutoPkgr 1.5.7), open it and Install AutoPkg as well as Git if they are not installed yet. Since AutoPkgr 1.6.1 it is recommended to install AutoPkg first, before AutoPkgr.

Under Repos & Recipes, add the Git recipe repositories that your packages will come from.

To integrate AutoPkgr with the Munki repository, choose the location of your Munki repository under Configure Munki tools…

Choose your existing Munki Repo.

Under Repos & Recipes, search for the recipe MakeCatalogs, a special recipe that rebuilds your Munki catalogs after any items are imported.
Right-click MakeCatalogs and select Create Override.

From now on, the MakeCatalogs.munki will be included automatically.

Configure the Schedule to run as often as you need. When the scheduled check finds new versions of the recipes (apps) you have subscribed to, a notification (email, macOS notification, etc.) is sent.

Run AutoPkg .munki recipes
A recipe is a file that contains several sections describing a sequence of tasks that can be used to automate tasks involving retrieval, patching, building, packaging, and/or importing some piece of software.
Under Repos & Recipes, you can search for a Munki recipe (.munki) in the GitHub repos, then choose Run Recipes Now or Run This Recipe Only.

Munki Admin:

Result
A Mac managed by Microsoft Intune that connects to the Munki software repository hosted on Azure:
