melange is a declarative APK package builder. You describe your package in a YAML configuration file and melange handles fetching sources, running the build pipeline, linting the output, and assembling the finalDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/chainguard-dev/melange/llms.txt
Use this file to discover all available pages before exploring further.
.apk artifact. The CLI is organized into focused subcommands — each does one thing well and composes cleanly with the others.
Global flag
Every melange command inherits the--log-level flag from the root command:
| Flag | Default | Description |
|---|---|---|
--log-level | INFO | Log verbosity: debug, info, warn, or error |
All commands
build
Build an APK package from a YAML pipeline configuration file. The primary melange workflow.
test
Run a dedicated test pipeline against a built package inside a sandboxed environment.
lint
Lint an existing
.apk file against a configurable set of quality and correctness checks.keygen
Generate an RSA key pair (
.rsa / .rsa.pub) used to sign packages and indexes.sign
Sign individual
.apk package files on disk with an RSA private key.sign-index
Sign an
APKINDEX.tar.gz repository index file.index
Create or update an
APKINDEX.tar.gz repository index from a collection of APK files.bump
Update the
version (and reset epoch) in a melange YAML file to a new upstream release.query
Extract arbitrary fields from a melange YAML using Go template syntax — useful in CI scripts.
convert
Auto-generate melange YAML from Alpine APKBUILD files, Ruby gems, or Python PyPI packages.
compile
Compile a YAML configuration file without executing the build runner.
scan
Scan an existing APK file and regenerate its
.PKGINFO metadata.source
Manage source code: extract sources (
get) or generate patches from modified source (pop).update-cache
Pre-populate the melange source artifact cache from a YAML config.
package-version
Print the full
name-version-rEPOCH string for a package config (shorthand for query).license-check
Gather and check licensing data for a melange source, source tree, or APK file.
version
Print the melange binary version. Use
--json for machine-readable output.completion
Generate shell completion scripts for bash, zsh, fish, or PowerShell.
initramfs
Build a base initramfs image used by the QEMU runner for cross-architecture builds.
Quick-start workflow
The typical end-to-end package publishing flow uses four commands:Getting help
Every subcommand accepts-h / --help to print its usage:
