Skip to main content

Compose packs

Create a pack that installs exact releases of other packs as one resolved graph.

Add references​

Initialize the root pack, then add dependencies by ID and exact Semantic Version:

luna pack init `
--id example-dotnet-foundation `
--author "Lunaris Digital Solutions <[email protected]>" `
--license MIT
luna pack add reference dotnet-gitignore 1.0.0
luna pack add reference dotnet-editorconfig 1.0.0

Use --replace to replace an existing reference added through pack add, or use luna pack set reference to create or replace it.

Bind dependency parameters​

Repeat --parameter to supply string or Boolean values to a dependency:

luna pack add reference github-pull-request-gate-workflow 1.0.0 `
--parameter required=true `
--parameter checkName=build

A binding remains hidden from consumers unless the root pack declares the same parameter. Declare it on the root when consumers should choose the value:

luna pack set parameter checkName string `
--required `
--display-name "Required check name"

Every declaration of the same parameter in the graph must use a compatible type.

Use an exact ${{ expression }} value to pass through a parameter declared by the composite:

luna pack set parameter frameworkName string --default react
luna pack add reference example-web-framework 1.0.0 `
--parameter 'framework=${{ frameworkName }}'

Use iif(condition, whenTrue, whenFalse) to derive a value from the same Boolean grammar used by reference conditions:

luna pack set parameter isAngular bool --default false
luna pack set reference example-web-framework 1.0.0 `
--parameter 'framework=${{ iif(isAngular, "angular", "react") }}'

The expression marker must be the complete value. Direct identifiers preserve string, Boolean, enum, and multi-select values. iif branches must have compatible types, and expressions can reference only parameters declared by the composite that owns the reference. Invalid expressions and dependency cycles fail before the manifest or project changes.

Select optional dependencies​

Add --condition or -c when a referenced pack should participate only for selected parameter values:

luna pack set parameter includeIssueForms bool --default true
luna pack add reference github-issue-forms 1.0.0 `
--condition includeIssueForms

Reference conditions use the same Boolean, comparison, membership, isDefault, and logical expressions as managed files. A false condition omits the referenced pack and dependencies reachable only through it from managed files, hooks, ownership, lock state, and pack-defined external-source planning. The exact referenced release must still be available for graph and parameter validation.

Suppress dependency hooks​

Disable selected lifecycle hooks for a transient dependency when the root pack already performs equivalent work:

luna pack add reference csharpier 1.0.0 `
--disable-hook postInstall

Suppression applies through the composite reference. Installing that dependency directly as a root keeps its own hooks enabled.

Validate the graph​

Local validation checks the root manifest. Test graph resolution from a fixture whose configured sources contain every exact dependency:

luna pack validate
luna validate [email protected]
luna inspect [email protected]
luna install [email protected] --dry-run

The consumer operation rejects missing releases, cycles, incompatible parameter declarations, and target collisions before writing project files. Dry runs ask for configurable parameter values before producing the plan. Use --skip-parameters when the preview must use available defaults and explicit values without prompting.