opsmill / infrahub

Infrahub - A new approach to Infrastructure Management
https://opsmill.com/
GNU Affero General Public License v3.0
178 stars 7 forks source link

feature: infrahubctl info command #3830

Open dgarros opened 1 month ago

dgarros commented 1 month ago

Component

infrahubctl CLI

Describe the Feature Request

Add a new command to infrahubctl to quickly display the main information about the system it's connected to.

If infrahubctl is currently not configured (missing address or missing token) it should display the appropriate instructions on how to configure these parameters to the user.

Regarding the name of the command, I would suggest infrahubctl info but I'm open to other suggestions

Describe the Use Case

When using infrahubctl I often want to understand quickly what is the current state of the system and which instance of infrahub I'm connected to

As an example I can have 2 instances of infrahub running, one for production and one for development and before loading a new schema I want to make sure I'm connected to the right instance

Additional Information

An equivalent function should be implemented in the SDK, I'm sure it will be useful for other tools

wvandeun commented 1 month ago

We already have the infrahubctl version command that displays the version of the SDK and retrieves the version running on the server.

Should we add the information to that command instead, or remove version in favor of info?

ogenstad commented 2 weeks ago

To me the infrahubctl version command isn't quite thought through. We should be able to display the version of ctl and the SDK without contacting a server. I'd separate the two so that we have a version command that specifically show the version of the CTL/SDK. Than optionally the infrahubctl info command could also show this information.