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

Improve ordering of top-level commands #5702

Closed
zanieb opened this issue Aug 1, 2024 · 5 comments · Fixed by #5830
Closed

Improve ordering of top-level commands #5702

zanieb opened this issue Aug 1, 2024 · 5 comments · Fixed by #5830
Labels
cli Related to the command line interface

Comments

@zanieb
Copy link
Member

zanieb commented Aug 1, 2024

With #5700, the ordering is all over the place in the documentation and help menu.

@zanieb zanieb added the cli Related to the command line interface label Aug 1, 2024
@T-256
Copy link
Contributor

T-256 commented Aug 1, 2024

In my point of view, I see these groups:

Workspace:
      init     Initialize a project
      add      Add one or more packages to the project requirements
      remove   Remove one or more packages from the project requirements
      run      Run a command in the project environment
      sync     Sync the project's dependencies with the environment
      lock     Resolve the project requirements into a lockfile
      tree     Display the dependency tree for the project
Standalone:
      tool     Run and manage executable Python packages
      python   Manage Python installations
      pip      Resolve and install Python packages
      venv     Create a virtual environment
Internal:
      cache    Manage the cache
      version  Display uv's version
      help     Display documentation for a command

@zanieb
Copy link
Member Author

zanieb commented Aug 1, 2024

Does clap support subcommand help headings?

@eth3lbert
Copy link
Contributor

Does clap support subcommand help headings?

No, although there's a subcommand_help_heading, it's not for multiple groups of subcommands .

track: clap-rs/clap#1553

@zanieb
Copy link
Member Author

zanieb commented Aug 3, 2024

Thanks! I didn't think so. I think the proposed ordering above is fine (without the grouping), but uv run should be at the top.

@T-256
Copy link
Contributor

T-256 commented Aug 4, 2024

it's lgtm:

      run      Run a command in the project environment
      init     Initialize a project
      add      Add one or more packages to the project requirements
      remove   Remove one or more packages from the project requirements
      sync     Sync the project's dependencies with the environment
      lock     Resolve the project requirements into a lockfile
      tree     Display the dependency tree for the project
      tool     Run and manage executable Python packages
      python   Manage Python installations
      pip      Resolve and install Python packages
      venv     Create a virtual environment
      self     Manage the uv executable <OPTIONAL>
      cache    Manage the cache
      version  Display uv's version
      help     Display documentation for a command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cli Related to the command line interface
Projects
No open projects
Status: Done
Development

Successfully merging a pull request may close this issue.

3 participants