Is your feature request related to a problem?
Users who work with multiple Hoop installations need to configure the CLI for the installation they want to use. Each installation has its own URL and may run a different Gateway version.
For example, switching to another environment currently requires commands like:
hoop config create --api-url https://my-hoop.website.com
hoop login
hoop versions syncIf selecting a specific CLI version manually, the user must also run:
hoop versions use 1.29.0
The user must know and enter the target installation's URL each time they reconfigure the CLI. They also need to authenticate and ensure the CLI version matches the selected Gateway. Repeating these steps makes switching between environments annoying and increases the chance of using the wrong URL or CLI version.
Describe the solution you'd like
Add named contexts to the Hoop CLI. A context would group an installation's URL, login session, and CLI version (and what more you find it's necessary).
For example, users could create contexts named "hoop-dev", "hoop-stg", and "hoop-prd", then switch environments with just a single command. For example,
hoop context use hoop-prd
Selecting a context would configure the CLI to use that installation, reuse its saved login session, and align the CLI version with the Gateway version. Users could manage their contexts with commands such as hoop context create, list, show, use, and remove.
Describe alternatives you've considered
No response
Priority
Medium - Would improve my workflow
Use Case
I work with several Hoop installations across Brazil and Global environments. Each installation has a different URL, and the installations may use different Gateway versions.
With named contexts, I could switch environments with a single command instead of repeatedly entering the URL, logging in, and syncing or selecting the CLI version. This would make environment changes faster and reduce mistakes caused by using the wrong installation or version.
Mockups or Examples
hoop context create dev --api-url https://dev.example.com
hoop context create prd --api-url https://prd.example.com
hoop context list
hoop context use dev
hoop context showAdditional Context
The CLI already provides hoop versions sync to install and activate the version reported by the connected Gateway. A context command could build on this capability to make switching installations and keeping the CLI version aligned part of the same workflow.
Contribution
- I would be willing to submit a PR to implement this feature
Code of Conduct
- I agree to follow this project's Code of Conduct
Activity
3Great Idea, We can implement similar to kubectl get-contexts and set-contexts . switch between different hoop configs.
#2063 Created a PR for this, tested locally.
🔗 Synced to Linear: SUP-285