skillfed

dmgbuild

macOS command line utility to build disk images

dmgbuild v1.6.7 147.0K downloads/30d#11,082 on PyPI204
Permissive license MIT Active released

What it is and what it does

dmgbuild is a Python wrapper around macOS disk image creation tools that lets you build .dmg files programmatically with customized appearance. Instead of using Finder or the low-level hdiutil command, you define the disk image layout and styling in Python, then dmgbuild handles the creation. It depends on two small libraries—ds_store and mac_alias—to manipulate the metadata that controls how the disk image appears when opened.

The package is designed for developers and build systems that need to package macOS applications or distribute software as polished disk images. It's actively maintained, supports modern Python versions, and carries no known vulnerabilities. Because it wraps macOS-specific system tools, it only runs on macOS and cannot be used for cross-platform builds.

Use it for:

  • Automate creation of branded .dmg installers for macOS applications in CI/CD pipelines
  • Package and distribute macOS software with consistent, professional presentation
  • Generate disk images programmatically as part of a build or release workflow
  • Control disk image metadata and layout through Python configuration instead of GUI tools
  • Create customized disk image layouts without manual Finder interaction

Worth the install?

AI-flagged interpretation of the facts on this page — verify before relying

dmgbuild creates macOS disk images (.dmg files) from the command line with full control over appearance, without relying on Finder or deprecated APIs.

Yes, if you develop or package for macOS. dmgbuild solves a real problem—creating polished disk images without Finder—with low install friction, active maintenance, MIT licensing, and no known vulnerabilities. It's only useful on macOS, so Windows and Linux developers can skip it entirely.

Install

dmgbuild on PyPI

pip

pip install dmgbuild

uv

uv add dmgbuild

poetry

poetry add dmgbuild

Installing dmgbuild

Before you install

Low friction install with only two runtime dependencies. Active maintenance with recent commits and stable production status.

License in practice

MIT license permits unrestricted use, modification, and distribution with minimal legal constraints.

Quickstart

pip install dmgbuild

from dmgbuild import build_dmg
build_dmg('output.dmg', 'source_folder')

macOS only—dmgbuild wraps macOS-specific tools and cannot run on Windows or Linux.

Verify before relying

  • What configuration options are available for customizing disk image appearance (window size, background, icon layout)
  • Whether the package supports programmatic configuration beyond command-line invocation
  • Specific examples of appearance customization in published documentation

Package facts

License MIT (permissive)
Python support supports the current Python release (>=3.10)
Install friction low — pure-Python wheel
Runtime dependencies 2 — ds_store, mac_alias
Maintenance actively maintained — 211 days since the last release
Last repo commit
First released
Downloads 147,036/month — #11,082 on PyPI (30-day window, as of 2026-08-14)
Known vulnerabilities none known (OSV.dev, checked 2026-08-14)

Evidence: dmgbuild-1.6.7-py3-none-any.whl

Keywords: dmg

Development Status :: 5 - Production/StableProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Programming Language :: Python :: 3.15Topic :: Desktop EnvironmentTopic :: Software Development :: Libraries :: Python Modules

Tags

create dmg files programmaticallymacOS disk image builderdmg generation command linecustomize disk image appearancebuild .dmg files pythonmacos packaging tooldmg file creation
macos-packagingbuild-automation

More Python Modules packages