ENG-5435: Add region list and get commands to CLI#301
Open
ENG-5435: Add region list and get commands to CLI#301
Conversation
…file doc generation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 listkoyeb regions get wasBoth commands support JSON and YAML output formats via
-o json/-o yaml.Changes
pkg/koyeb/regions.go- Region command and handler setuppkg/koyeb/regions_list.go- List command usingCatalogRegionsApi.ListRegions, filtering to available regions onlypkg/koyeb/regions_get.go- Get command usingCatalogRegionsApi.GetRegionwith custom plain-text detail view for table outputpkg/koyeb/koyeb.go- RegisterNewRegionCmd()in root commandMakefile- Include regions (and other missing commands) in doc generationdocs/reference.md- Regenerated docsTesting
go build ./...✅go test ./...✅ (all tests pass)gofmt✅ (no formatting issues)make linthas a pre-existing toolchain mismatch issue on master (go1.26 vs golangci-lint built with go1.25)Linear issue: ENG-5435