The command `whoami` is a standard Unix/Linux command that prints the effective username of the current user. It is not a command or subcommand within the Hugging Face CLI (`huggingface-cli`).
The Hugging Face CLI does not have a direct equivalent to `whoami` that prints your Hugging Face Hub username. Instead, your authentication status and user identity are managed through access tokens.
To manage your Hugging Face Hub authentication:
* **Log in:**
huggingface-cli loginThis command will prompt you to enter your Hugging Face Hub token. Once authenticated, your token is stored locally.
* **Check environment for token (indirectly confirm login):**
huggingface-cli envThis command displays information about your Hugging Face CLI environment, including whether an `HF_HOME` directory is set and if a token is present in the configuration.
* **Log out:**
huggingface-cli logoutThis command removes the locally stored Hugging Face Hub token, effectively logging you out.
While there's no `whoami` for the Hugging Face account, successful execution of commands that require authentication (e.g., `huggingface-cli repo create`) indicates that you are logged in with a valid token associated with your Hugging Face Hub user.