Skip to content

Add bundle debug list-targets command#5005

Draft
pavloKozlov wants to merge 1 commit intomainfrom
pavlo.kozlov/bundle-debug-list-targets
Draft

Add bundle debug list-targets command#5005
pavloKozlov wants to merge 1 commit intomainfrom
pavlo.kozlov/bundle-debug-list-targets

Conversation

@pavloKozlov
Copy link
Copy Markdown

Why

Provide a lightweight way to retrieve bundle target names along with their default, mode, and workspace.host fields. This is a prerequisite for running other bundle CLI commands (deploy, validate, run, etc.), which all require --target.

Changes

Adds a new hidden bundle debug list-targets subcommand that loads only the local YAML configuration (bundle.MustLoad + phases.Load) and returns each target's name, default, mode, and workspace.host. No target selection, no variable resolution, no authentication, no API calls.

Text output:
dev (default) development https://dev.example.com
prod production https://prod.example.com
staging https://staging.example.com

JSON output:

  {
    "targets": [
      {"name": "dev", "default": true, "mode": "development", "host": "https://dev.example.com"},
      {"name": "prod", "mode": "production", "host": "https://prod.example.com"},
      {"name": "staging", "host": "https://staging.example.com"}
    ]
  }

Test plan

  • Unit tests for collectTargets (sorting, all fields, nil workspace, empty map)
  • Acceptance test covering text and JSON output
  • Command is hidden from bundle debug --help

@pavloKozlov pavloKozlov force-pushed the pavlo.kozlov/bundle-debug-list-targets branch from fc88797 to 2453fea Compare April 17, 2026 09:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant