macOS command line utility to build disk images
Actively maintained. Last release 2 weeks ago, commits in 11 of the last 26 weeks. A safe choice.
pip install dmgbuilddmgbuild
dmgbuild is a command line tool to create macOS disk images (aka .dmg files). While it is possible to create disk images easily enough from the command line using the hdiutil program that ships with macOS, there is no easy way to configure the appearance of the resulting disk image when the user opens it.
dmgbuild allows for full customization of the resulting disk image, without relying on Finder, and without using deprecated APIs (like the Alias Manager functions).
dmgbuild is a wrapper around macOS specific tools, so it can't be used on Windows or Linux.
See the documentation for more information.