packer CLI reference
ModularPipelines.Packer provides strongly typed access to the packer CLI.
Executable prerequisite
This package does not install the packer executable. Install it separately and ensure packer is available on PATH.
Follow the executable's official documentation for installation instructions.
Package installation
dotnet add package ModularPipelines.Packer
Resolve the service with context.Tools.Packer.
Projects using C# 13 or another .NET language can use context.Tools.Get<ModularPipelines.Packer.Services.IPacker>() instead.
Module example
Resolve the service in a module, then select a command from the table below. A runnable example is omitted when no command has complete safety metadata:
var packer = context.Tools.Packer;
Commands
| CLI command | Options record |
|---|---|
packer build | PackerBuildOptions |
packer console | PackerConsoleOptions |
packer fix | PackerFixOptions |
packer fmt | PackerFmtOptions |
packer hcl2_upgrade | PackerHcl2UpgradeOptions |
packer init | PackerInitOptions |
packer inspect | PackerInspectOptions |
packer plugins | PackerPluginsOptions |
packer validate | PackerValidateOptions |
packer verify-attestation | PackerVerifyAttestationOptions |