feat(package): Add azldev package list command#53
Conversation
Add a new 'azldev package list' (alias: 'azldev pkg list') command that
resolves and displays binary package configuration without running a build.
Flags:
-a enumerate all packages that appear in any package-group or component
packages override
-p look up one or more specific packages by exact name; packages not in
any explicit config are still resolved using project defaults
Positional args are merged into -p for convenience.
The resolved output includes the package name, package-group membership,
component override source, and the effective publish channel after applying
all four config layers (project default → group → component default →
component per-package override).
When neither -a nor -p is given the command warns and returns no results,
consistent with 'component list' behavior.
There was a problem hiding this comment.
Pull request overview
Adds a new top-level azldev package command group with a list subcommand for inspecting resolved binary package configuration (including publish channel resolution across config layers), along with documentation and updated scenario snapshots.
Changes:
- Register new
package/pkgtop-level CLI command andpackage listsubcommand. - Implement package config enumeration + resolution via
projectconfig.ResolvePackageConfig, with table/JSON reporting. - Add a new how-to guide and update reference docs/snapshots to include the new command.
Reviewed changes
Copilot reviewed 19 out of 20 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| scenario/snapshots/TestSnapshotsContainer_help_stdout_1.snap | Updates help snapshot to include new package command |
| scenario/snapshots/TestSnapshotsContainer_--help_stdout_1.snap | Updates help snapshot to include new package command |
| scenario/snapshots/TestSnapshotsContainer_--bogus-flag_stderr_1.snap | Updates help-on-error snapshot to include new package command |
| scenario/snapshots/TestSnapshots_help_stdout_1.snap | Updates help snapshot to include new package command |
| scenario/snapshots/TestSnapshots_--help_with_color_stdout_1.snap | Updates colorized help snapshot to include new package command |
| scenario/snapshots/TestSnapshots_--help_stdout_1.snap | Updates help snapshot to include new package command |
| scenario/snapshots/TestSnapshots_--bogus-flag_stderr_1.snap | Updates help-on-error snapshot to include new package command |
| scenario/snapshots/TestMCPServerMode_1.snap.json | Adds MCP tool schema entry for package-list |
| pkg/app/azldev_cli/azldev.go | Wires cmds/pkg into app initialization |
| pkg/app/azldev_cli/azldev_test.go | Updates instantiated command list to include package |
| internal/projectconfig/project.go | Fixes typo in comment about package group membership |
| internal/app/azldev/cmds/pkg/package.go | Introduces azldev package / azldev pkg command group |
| internal/app/azldev/cmds/pkg/list.go | Implements azldev package list command + ListPackages logic |
| internal/app/azldev/cmds/pkg/list_test.go | Adds unit tests for package listing/resolution behavior |
| internal/app/azldev/cmds/component/build.go | Adjusts error formatting to quote component name with %#q |
| docs/user/reference/config/project.md | Clarifies top-level vs [project] nesting for package config sections |
| docs/user/reference/cli/azldev.md | Adds azldev package to CLI reference index |
| docs/user/reference/cli/azldev_package.md | Auto-generated CLI doc for azldev package |
| docs/user/reference/cli/azldev_package_list.md | Auto-generated CLI doc for azldev package list |
| docs/user/how-to/inspect-package-config.md | New how-to guide describing azldev package list usage |
|
Thanks for the feature, Nan. Skimmed through the changes and cli, looks good. Looking at this purely from a dev pov, is there a way I can list where each package in a component would go to? The use case I have is, from not knowing what packages a component delivers to knowing what packages and where each of them go to. Maybe that is out of context for this PR. If so, is that a feature that can be implemented easily? (Maybe I asked this already?) |
This PR adds a new
azldev package list(aliasazldev pkg list) command that resolves and displays binary package configuration across all config layers, and adds new how-to guide (docs/user/how-to/inspect-package-config.md).azldev package listprovides-a(all explicitly-configured packages) and-p(specific package by name) flags, leverages the resolver (added in #38) to resolve package configuration through all layers and outputsTableorJSON(-q -O json) output formats.Examples
packages.tomlwith the content below and imported inproject.toml: