-
Notifications
You must be signed in to change notification settings - Fork 232
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
feat: Autogeneration of the CLI documentation. #3268
Merged
ruben-arts
merged 65 commits into
prefix-dev:main
from
ruben-arts:feature/automated_cli_docs
Mar 10, 2025
Merged
feat: Autogeneration of the CLI documentation. #3268
ruben-arts
merged 65 commits into
prefix-dev:main
from
ruben-arts:feature/automated_cli_docs
Mar 10, 2025
+13,970
−1,701
Conversation
This file contains 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
Things that I noticed:
|
Hofer-Julian
reviewed
Mar 6, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Great work.
Would be nice to have a bit better reporting
This is helpful as we can then figure out if a file was removed
Hofer-Julian
approved these changes
Mar 10, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome improvement! 📖
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.
Why?
Decrease future maintainance of the documentation, making sure it's always in sync with the tool.
How?
This PR introduces another Rust binary called
pixi_docs
which can be executed.As a result it will create all the CLI docs for the pixi commands.
These will be put in the
docs/autogenerated
folder.Updating the documentation can be done manually in two ways.
src/cli/<COMMAND>.rs
snippets
. Documentation about this can be found indocs/reference/cli/README.md
This generation is fully based on the
clap::Command
, which is really cool options of the clap parser!TODO
To get this MVP in we should have moved all current documentation over, making sure we're not missing example from the original
docs/reference/cli.md
.Out of scope of this PR
groups
to the options, this would make it easier to read the options for tools likepixi add