hf

Hugging Face Hub CLI

Usage:

$ hf [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf auth

Manage authentication (login, logout, etc.).

Usage:

$ hf auth [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf auth list

List all stored access tokens

Usage:

$ hf auth list [OPTIONS]

Options:

hf auth login

Login using a token from huggingface.co/settings/tokens

Usage:

$ hf auth login [OPTIONS]

Options:

hf auth logout

Logout from a specific token

Usage:

$ hf auth logout [OPTIONS]

Options:

hf auth switch

Switch between access tokens

Usage:

$ hf auth switch [OPTIONS]

Options:

hf auth whoami

Find out which huggingface.co account you are logged in as.

Usage:

$ hf auth whoami [OPTIONS]

Options:

hf cache

Manage local cache directory.

Usage:

$ hf cache [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf cache ls

List cached repositories or revisions.

Usage:

$ hf cache ls [OPTIONS]

Options:

hf cache prune

Remove detached revisions from the cache.

Usage:

$ hf cache prune [OPTIONS]

Options:

hf cache rm

Remove cached repositories or revisions.

Usage:

$ hf cache rm [OPTIONS] TARGETS...

Arguments:

Options:

hf cache verify

Verify checksums for a single repo revision from cache or a local directory.

Examples:

Usage:

$ hf cache verify [OPTIONS] REPO_ID

Arguments:

Options:

hf download

Download files from the Hub.

Usage:

$ hf download [OPTIONS] REPO_ID [FILENAMES]...

Arguments:

Options:

hf endpoints

Manage Hugging Face Inference Endpoints.

Usage:

$ hf endpoints [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf endpoints catalog

Interact with the Inference Endpoints catalog.

Usage:

$ hf endpoints catalog [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf endpoints catalog deploy

Deploy an Inference Endpoint from the Model Catalog.

Usage:

$ hf endpoints catalog deploy [OPTIONS] NAME

Arguments:

Options:

hf endpoints catalog ls

List available Catalog models.

Usage:

$ hf endpoints catalog ls [OPTIONS]

Options:

hf endpoints delete

Delete an Inference Endpoint permanently.

Usage:

$ hf endpoints delete [OPTIONS] NAME

Arguments:

Options:

hf endpoints deploy

Deploy an Inference Endpoint from a Hub repository.

Usage:

$ hf endpoints deploy [OPTIONS] NAME

Arguments:

Options:

hf endpoints describe

Get information about an existing endpoint.

Usage:

$ hf endpoints describe [OPTIONS] NAME

Arguments:

Options:

hf endpoints list-catalog

List available Catalog models.

Usage:

$ hf endpoints list-catalog [OPTIONS]

Options:

hf endpoints ls

Lists all Inference Endpoints for the given namespace.

Usage:

$ hf endpoints ls [OPTIONS]

Options:

hf endpoints pause

Pause an Inference Endpoint.

Usage:

$ hf endpoints pause [OPTIONS] NAME

Arguments:

Options:

hf endpoints resume

Resume an Inference Endpoint.

Usage:

$ hf endpoints resume [OPTIONS] NAME

Arguments:

Options:

hf endpoints scale-to-zero

Scale an Inference Endpoint to zero.

Usage:

$ hf endpoints scale-to-zero [OPTIONS] NAME

Arguments:

Options:

hf endpoints update

Update an existing endpoint.

Usage:

$ hf endpoints update [OPTIONS] NAME

Arguments:

Options:

hf env

Print information about the environment.

Usage:

$ hf env [OPTIONS]

Options:

hf jobs

Run and manage Jobs on the Hub.

Usage:

$ hf jobs [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf jobs cancel

Cancel a Job

Usage:

$ hf jobs cancel [OPTIONS] JOB_ID

Arguments:

Options:

hf jobs inspect

Display detailed information on one or more Jobs

Usage:

$ hf jobs inspect [OPTIONS] JOB_IDS...

Arguments:

Options:

hf jobs logs

Fetch the logs of a Job

Usage:

$ hf jobs logs [OPTIONS] JOB_ID

Arguments:

Options:

hf jobs ps

List Jobs

Usage:

$ hf jobs ps [OPTIONS]

Options:

hf jobs run

Run a Job

Usage:

$ hf jobs run [OPTIONS] IMAGE COMMAND...

Arguments:

Options:

hf jobs scheduled

Create and manage scheduled Jobs on the Hub.

Usage:

$ hf jobs scheduled [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf jobs scheduled delete

Delete a scheduled Job

Usage:

$ hf jobs scheduled delete [OPTIONS] SCHEDULED_JOB_ID

Arguments:

Options:

hf jobs scheduled inspect

Display detailed information on one or more scheduled Jobs

Usage:

$ hf jobs scheduled inspect [OPTIONS] SCHEDULED_JOB_IDS...

Arguments:

Options:

hf jobs scheduled ps

List scheduled Jobs

Usage:

$ hf jobs scheduled ps [OPTIONS]

Options:

hf jobs scheduled resume

Resume (unpause) a scheduled Job

Usage:

$ hf jobs scheduled resume [OPTIONS] SCHEDULED_JOB_ID

Arguments:

Options:

hf jobs scheduled run

Schedule a Job

Usage:

$ hf jobs scheduled run [OPTIONS] SCHEDULE IMAGE COMMAND...

Arguments:

Options:

hf jobs scheduled suspend

Suspend (pause) a scheduled Job

Usage:

$ hf jobs scheduled suspend [OPTIONS] SCHEDULED_JOB_ID

Arguments:

Options:

hf jobs scheduled uv

Schedule UV scripts on HF infrastructure

Usage:

$ hf jobs scheduled uv [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf jobs scheduled uv run

Run a UV script (local file or URL) on HF infrastructure

Usage:

$ hf jobs scheduled uv run [OPTIONS] SCHEDULE SCRIPT [SCRIPT_ARGS]...

Arguments:

Options:

hf jobs uv

Run UV scripts (Python with inline dependencies) on HF infrastructure

Usage:

$ hf jobs uv [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf jobs uv run

Run a UV script (local file or URL) on HF infrastructure

Usage:

$ hf jobs uv run [OPTIONS] SCRIPT [SCRIPT_ARGS]...

Arguments:

Options:

hf lfs-enable-largefiles

Configure your repository to enable upload of files > 5GB.

Usage:

$ hf lfs-enable-largefiles [OPTIONS] PATH

Arguments:

Options:

hf lfs-multipart-upload

Upload large files to the Hub.

Usage:

$ hf lfs-multipart-upload [OPTIONS]

Options:

hf repo

Manage repos on the Hub.

Usage:

$ hf repo [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf repo branch

Manage branches for a repo on the Hub.

Usage:

$ hf repo branch [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf repo branch create

Create a new branch for a repo on the Hub.

Usage:

$ hf repo branch create [OPTIONS] REPO_ID BRANCH

Arguments:

Options:

hf repo branch delete

Delete a branch from a repo on the Hub.

Usage:

$ hf repo branch delete [OPTIONS] REPO_ID BRANCH

Arguments:

Options:

hf repo create

Create a new repo on the Hub.

Usage:

$ hf repo create [OPTIONS] REPO_ID

Arguments:

Options:

hf repo delete

Delete a repo from the Hub. this is an irreversible operation.

Usage:

$ hf repo delete [OPTIONS] REPO_ID

Arguments:

Options:

hf repo move

Move a repository from a namespace to another namespace.

Usage:

$ hf repo move [OPTIONS] FROM_ID TO_ID

Arguments:

Options:

hf repo settings

Update the settings of a repository.

Usage:

$ hf repo settings [OPTIONS] REPO_ID

Arguments:

Options:

hf repo tag

Manage tags for a repo on the Hub.

Usage:

$ hf repo tag [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf repo tag create

Create a tag for a repo.

Usage:

$ hf repo tag create [OPTIONS] REPO_ID TAG

Arguments:

Options:

hf repo tag delete

Delete a tag for a repo.

Usage:

$ hf repo tag delete [OPTIONS] REPO_ID TAG

Arguments:

Options:

hf repo tag list

List tags for a repo.

Usage:

$ hf repo tag list [OPTIONS] REPO_ID

Arguments:

Options:

hf repo-files

Manage files in a repo on the Hub.

Usage:

$ hf repo-files [OPTIONS] COMMAND [ARGS]...

Options:

Commands:

hf repo-files delete

Usage:

$ hf repo-files delete [OPTIONS] REPO_ID PATTERNS...

Arguments:

Options:

hf upload

Upload a file or a folder to the Hub.

Usage:

$ hf upload [OPTIONS] REPO_ID [LOCAL_PATH] [PATH_IN_REPO]

Arguments:

Options:

hf upload-large-folder

Upload a large folder to the Hub. Recommended for resumable uploads.

Usage:

$ hf upload-large-folder [OPTIONS] REPO_ID LOCAL_PATH

Arguments:

Options:

hf version

Print information about the hf version.

Usage:

$ hf version [OPTIONS]

Options:

Update on GitHub