Skip to content

ENG-5435: Add region list and get commands to CLI#301

Open
lukaszo wants to merge 9 commits intomasterfrom
ENG-5435-regions
Open

ENG-5435: Add region list and get commands to CLI#301
lukaszo wants to merge 9 commits intomasterfrom
ENG-5435-regions

Conversation

@lukaszo
Copy link
Member

@lukaszo lukaszo commented Feb 13, 2026

Summary

Adds two new subcommands to the CLI:

  • koyeb regions list - Lists all available regions with their ID, name, scope, and volumes enabled status. Only regions with "available" status are shown.
  • koyeb regions get <ID> - Shows detailed information about a specific region including instances available in that region.

Example output

koyeb regions list

ID      NAME            SCOPE           VOLUMES ENABLED
ap      Asia Pacific    continental     false
dal     Dallas          metropolitan    true

koyeb regions get was

ID:              was
Name:            Washington, D.C
Scope:           metropolitan
Volumes enabled: true

Instances:
  - 2xlarge
  - 3xlarge
  - 4xlarge
  ...

Both commands support JSON and YAML output formats via -o json / -o yaml.

Changes

  • pkg/koyeb/regions.go - Region command and handler setup
  • pkg/koyeb/regions_list.go - List command using CatalogRegionsApi.ListRegions, filtering to available regions only
  • pkg/koyeb/regions_get.go - Get command using CatalogRegionsApi.GetRegion with custom plain-text detail view for table output
  • pkg/koyeb/koyeb.go - Register NewRegionCmd() in root command
  • Makefile - Include regions (and other missing commands) in doc generation
  • docs/reference.md - Regenerated docs

Testing

  • go build ./...
  • go test ./... ✅ (all tests pass)
  • gofmt ✅ (no formatting issues)
  • Note: make lint has a pre-existing toolchain mismatch issue on master (go1.26 vs golangci-lint built with go1.25)

Linear issue: ENG-5435

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

Comments