The charly generate-packages command plugin — the single packaging engine for
all nFPM formats (deb, rpm, apk, archlinux, ipk, msix), driven by the
packaging: section of a charly candy's charly.yml.
This plugin is the command surface only. Every nFPM/parsing/variant/
optdepends function lives in sdk/packagekit
(the shared nFPM packaging driver), which the plugin calls via
packagekit.LoadPackaging + packagekit.Build. The plugin is only the Kong
grammar + provider wiring.
| Capability | Surface |
|---|---|
command:generate-packages |
the charly generate-packages CLI — build native packages per packaging: variant/format |
charly generate-packages reads the packaging: section from a charly candy's
charly.yml — the single metadata source — and builds native packages for
the requested formats from that + the CLI flags. No deps table, no PKGBUILD /
spec / debian-control, no other metadata resource.
charly generate-packages \
--candy ./candy/charly/charly.yml \
--binary ./bin/charly \
--plugins ./plugins \
--version 2026.225.1200 \
--arch amd64 \
--variant full \
--formats deb,rpm,archlinux,apk,ipk \
--out dist/ \
[--signing-key key.gpg] # deb/rpm; passphrase via NFPM_PASSPHRASE
[--apk-signing-key key.rsa] # apk; passphrase via NFPM_APK_PASSPHRASE
[--msix-pfx cert.pfx] # msix (deferred); passphrase via NFPM_MSIX_PASSPHRASE
--candyis the single metadata input — the plugin reads thepackaging:section from it and builds from that + the flags.--variantselects the variant frompackaging.variants; the package name ischarlyfor the format'sdefault_variant,charly-<variant>otherwise. The--pluginsdir is filtered to the variant's plugin list.- One
--archper invocation —--binary/--pluginsare arch-specific, so a distro workflow loops overamd64/arm64. - A variant naming a plugin absent from
--pluginsfails loudly.
The packaging: section (spec #Packaging) declares the package metadata +
per-variant plugin sets + per-format deps:
packaging:
name: charly
description: the charly CLI
maintainer: OpenCharly <[email protected]>
homepage: https://opencharly.ai
license: MIT
variants:
default:
description: the default plugin set
plugins: [plugin-a, plugin-b]
minimal:
description: the minimal plugin set
plugins: [plugin-a]
formats:
deb:
depends: [podman]
default_variant: defaultcd candy/generate-packages
go test ./... # CLI parse tests + the e2e (builds a package per format + per variant)The e2e drives the full plugin path (runFromArgs → Kong parse →
runGeneratePackages → sdk/packagekit.Build) against the testdata/charly.yml
fixture and asserts the packages land with the right structure.
On a v* tag push, the release workflow publishes the prebuilt
generate-packages-linux-<arch> binaries (amd64 + arm64, CGO_ENABLED=0) + the
committed generate-packages.providers manifest (content:
command:generate-packages) as release assets. The per-distro package repos
download the amd64 asset and drop it into /usr/lib/charly/plugins/ so
charly generate-packages resolves project-less via discoverBakedPluginWords.
The module lives in a repository subdirectory, so Go looks for a tag whose name is the module's subdirectory path followed by the version:
candy/generate-packages/v0.<YYYYDDD>.<HHMM>
A bare root tag v<YYYY.DDD.HHMM> is not consulted for a subdirectory module.
Both tags are minted at merge on the same merged HEAD; only the root v* tag
triggers the release workflow. The v0. major is required because a major >= 2
version would force a /vN suffix on the module path, and <HHMM> strips leading
zeros (0013 → 13) because semver rejects a leading-zero numeric segment.
candy/generate-packages/— the plugin module:plugin.go(provider + meta),cli.go(the Kong grammar + effect),schema/generate-packages.cue,testdata/charly.yml,cmd/serve/main.go.generate-packages.providers— the committed providers manifest (command:generate-packages).charly.yml— the root project manifest (discover: candy)..github/workflows/ci.yml/release.yml— thego testCI and the release asset publish..github/workflows/tag-on-merge.yml— CalVer tag +CHANGELOG/on merge.
- Owning skill:
/charly-internals:go— thecharly generate-packagespackaging/release command reference (the plugin's user-facing surface). This candy carries noskill:entity of its own; the command is documented by the existing/charly-internals:gopage, so this is a record, not a gap. opencharly/sdk—packagekit.opencharly/charly— the charly CLI.
MIT — see LICENSE.