Skip to content

Conversation

@Wauplin
Copy link
Contributor

@Wauplin Wauplin commented Jul 25, 2025

From feedback of @gary149 in DMs (private)

With the PR, if a CLI command is not complete, the corresponding help section will be printed to the terminal. Before that, only the root hf --help was printed.

Example with hf auth:

> hf auth
usage: hf <command> [<args>] auth [-h] {login,logout,whoami,switch,list} ...

positional arguments:
  {login,logout,whoami,switch,list}
                        Authentication subcommands
    login               Log in using a token from huggingface.co/settings/tokens
    logout              Log out
    whoami              Find out which huggingface.co account you are logged in as.
    switch              Switch between access tokens
    list                List all stored access tokens

options:
  -h, --help            show this help message and exit

(same for hf repo, hf cache and hf hobs)

@Wauplin Wauplin requested review from gary149 and hanouticelina July 25, 2025 14:43
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Wauplin
Copy link
Contributor Author

Wauplin commented Jul 25, 2025

failing tests are unrelated (HTTP 429) so time to merge :)

@Wauplin Wauplin merged commit f9bc1cb into main Jul 25, 2025
25 of 27 checks passed
@Wauplin Wauplin deleted the cli-print-help-if-no-cmd branch July 25, 2025 14:53
Wauplin added a commit that referenced this pull request Jul 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants