Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distinguish meta CLI commands like version and completion in docs site #594

Open
1 of 4 tasks
david-crespo opened this issue Mar 12, 2024 · 3 comments
Open
1 of 4 tasks
Labels
feature Issue for a new feature that does not break current functionality

Comments

@david-crespo
Copy link
Contributor

david-crespo commented Mar 12, 2024

Target component

  • CLI
  • SDK
  • Something else
  • Not sure

Overview

It would be nice to put information in the CLI docs JSON to allow the docs site to distinguish between commands like completion and version (possibly auth? meh, nah) and the rest, which have to do with actual API resources.

image

Implementation details

Two ideas:

  • Give tags to top-level CLI commands to allow grouping in docs site sidebar, like we do with the API endpoints. In the API, endpoints with a tag starting with system/ get grouped under System and the rest go under Developer.
  • Don't do formal grouping or tagging, but put completions and version under a top-level oxide self command so they at least take up less space and it's easier to tell they don't have anything to do with the API itself.
@david-crespo david-crespo added the feature Issue for a new feature that does not break current functionality label Mar 12, 2024
@karencfv
Copy link
Contributor

Don't do formal grouping or tagging, but put completions and version under a top-level oxide self command so they at least take up less space and it's easier to tell they don't have anything to do with the API itself.

I'm a little hesitant to remove completion and version from the top level commands. These are (by convention?) generally top level commands or global flags in most CLIs (I'd like to say all but I haven't used all CLIs that exist), so it's not unreasonable to say that users will likely be expecting these commands to be top level commands or global flags.

@ahl
Copy link
Collaborator

ahl commented Mar 18, 2024

I like them as top level commands... and I think there might be opportunities to separate them out both in the generated docs as well as in the help message. Good idea, @david-crespo.

@david-crespo
Copy link
Contributor Author

Yeah, I'm persuaded that keeping them top level and doing grouping is better.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature Issue for a new feature that does not break current functionality
Projects
None yet
Development

No branches or pull requests

3 participants