"Hugging Face Hub CLI (`hf`) for downloading, uploading, and managing models, datasets, spaces, buckets, repos, papers, jobs, and more on the Hugging Face Hub. Use when: handling authentication; managing local cache; managing Hugging Face Buckets; running or scheduling jobs on Hugging Face infrastructure; managing Hugging Face repos; discussions and pull requests; browsing models, datasets and spaces; reading, searching, or browsing academic papers; managing collections; querying datasets; configuring spaces; setting up webhooks; or deploying and managing HF Inference Endpoints. Make sure to use this skill whenever the user mentions 'hf', 'huggingface', 'Hugging Face', 'huggingface-cli', or 'hugging face cli', or wants to do anything related to the Hugging Face ecosystem and to AI and ML in general. Also use for cloud storage needs like training checkpoints, data pipelines, or agent traces. Use even if the user doesn't explicitly ask for a CLI command. Replaces the deprecated `huggingface-cli`."
Resources
1Install
npx skillscat add satyabagherwal-source/k9x-774b-m20/hf-cli Install via the SkillsCat registry.
Install: curl -LsSf https://hf.co/cli/install.sh | bash -s.
The Hugging Face Hub CLI tool hf is available. IMPORTANT: The hf command replaces the deprecated huggingface-cli command.
Use hf --help to view available functions. Note that auth commands are now all under hf auth e.g. hf auth whoami.
Generated with huggingface_hub v2.1.1. Run hf skills add --force to regenerate.
Commands
hf cp SRCโ Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf download REPO_IDโ Download files from the Hub.[--type [model|dataset|space|kernel] --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --max-workers INTEGER --format [auto|human|agent|json|quiet]]hf envโ Print information about the environment.[--format [auto|human|agent|json|quiet]]hf syncโ Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]hf updateโ Update thehfCLI to the latest version.[--format [auto|human|agent|json|quiet]]hf upload REPO_IDโ Upload a file or a folder to the Hub.[--type [model|dataset|space|kernel] --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --format [auto|human|agent|json|quiet]]hf versionโ Print information about the hf version.[--format [auto|human|agent|json|quiet]]
hf auth โ Manage authentication (login, logout, etc.).
hf auth listโ List all stored access tokens.[--format [auto|human|agent|json|quiet]]hf auth loginโ Login from your browser, or using a token from huggingface.co/settings/tokens.[--add-to-git-credential --force --format [auto|human|agent|json|quiet]]hf auth logoutโ Logout from a specific token.[--token-name TEXT --format [auto|human|agent|json|quiet]]hf auth switchโ Switch between access tokens.[--token-name TEXT --add-to-git-credential --format [auto|human|agent|json|quiet]]hf auth tokenโ Print the current access token to stdout.[--format [auto|human|agent|json|quiet]]hf auth whoamiโ Find out which huggingface.co account you are logged in as.[--format [auto|human|agent|json|quiet]]
hf buckets โ Commands to interact with buckets.
hf buckets cp SRCโ Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf buckets create BUCKET_IDโ Create a new bucket.[--private --region [us|eu] --exist-ok --format [auto|human|agent|json|quiet]]hf buckets delete BUCKET_IDโ Delete a bucket.[--yes --missing-ok --format [auto|human|agent|json|quiet]]hf buckets info BUCKET_IDโ Get info about a bucket.[--format [auto|human|agent|json|quiet]]hf buckets listโ List buckets or files in a bucket.[--human-readable --tree --recursive --search TEXT --format [auto|human|agent|json|quiet]]hf buckets move FROM_ID TO_IDโ Move (rename) a bucket to a new name or namespace.[--format [auto|human|agent|json|quiet]]hf buckets remove ARGUMENTโ Remove files from a bucket.[--recursive --yes --dry-run --include TEXT --exclude TEXT --format [auto|human|agent|json|quiet]]hf buckets settings BUCKET_IDโ Update bucket settings (visibility).[--private --public --format [auto|human|agent|json|quiet]]hf buckets syncโ Sync files between local directory and a bucket.[--delete --ignore-times --ignore-sizes --plan TEXT --apply TEXT --dry-run --include TEXT --exclude TEXT --filter-from TEXT --existing --ignore-existing --verbose --format [auto|human|agent|json|quiet]]
hf cache โ Manage local cache directory.
hf cache listโ List cached repositories or revisions.[--cache-dir TEXT --revisions --filter TEXT --sort [accessed|accessed:asc|accessed:desc|modified|modified:asc|modified:desc|name|name:asc|name:desc|size|size:asc|size:desc] --limit INTEGER --show-warnings --format [auto|human|agent|json|quiet]]hf cache pruneโ Remove detached revisions and incomplete downloads from the cache.[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet]]hf cache rm TARGETSโ Remove cached repositories, revisions or files.[--cache-dir TEXT --yes --dry-run --format [auto|human|agent|json|quiet]]hf cache verify REPO_IDโ Verify checksums for a single repo revision from cache or a local directory.[--type [model|dataset|space|kernel] --revision TEXT --cache-dir TEXT --local-dir TEXT --fail-on-missing-files --fail-on-extra-files --format [auto|human|agent|json|quiet]]
hf collections โ Interact with collections on the Hub.
hf collections add-item COLLECTION_SLUG ITEM_ID ITEM_TYPEโ Add an item to a collection.[--note TEXT --exists-ok --format [auto|human|agent|json|quiet]]hf collections create TITLEโ Create a new collection on the Hub.[--namespace TEXT --description TEXT --private --exists-ok --format [auto|human|agent|json|quiet]]hf collections delete COLLECTION_SLUGโ Delete a collection from the Hub.[--missing-ok --format [auto|human|agent|json|quiet]]hf collections delete-item COLLECTION_SLUG ITEM_OBJECT_IDโ Delete an item from a collection.[--missing-ok --format [auto|human|agent|json|quiet]]hf collections info COLLECTION_SLUGโ Get info about a collection on the Hub.[--format [auto|human|agent|json|quiet]]hf collections listโ List collections on the Hub.[--owner TEXT --item TEXT --sort [lastModified|trending|upvotes] --limit INTEGER --format [auto|human|agent|json|quiet]]hf collections update COLLECTION_SLUGโ Update a collection's metadata on the Hub.[--title TEXT --description TEXT --position INTEGER --private --theme TEXT --format [auto|human|agent|json|quiet]]hf collections update-item COLLECTION_SLUG ITEM_OBJECT_IDโ Update an item in a collection.[--note TEXT --position INTEGER --format [auto|human|agent|json|quiet]]
hf datasets โ Interact with datasets on the Hub.
hf datasets card DATASET_IDโ Get the dataset card (README) for a dataset on the Hub.[--metadata --text --format [auto|human|agent|json|quiet]]hf datasets info DATASET_IDโ Get info about a dataset on the Hub.[--revision TEXT --expand TEXT --format [auto|human|agent|json|quiet]]hf datasets leaderboard DATASET_IDโ List model scores from a dataset leaderboard. This command helps find the best models for a task or compare models by benchmark scores. Use 'hf datasets ls --filter benchmark:official' to list available leaderboards.[--limit INTEGER --format [auto|human|agent|json|quiet]]hf datasets listโ List datasets on the Hub, or files in a dataset repo.[--search TEXT --author TEXT --filter TEXT --sort [created_at|downloads|last_modified|likes|trending_score] --limit INTEGER --expand TEXT --human-readable --tree --recursive --revision TEXT --format [auto|human|agent|json|quiet]]hf datasets parquet DATASET_IDโ List parquet file URLs available for a dataset.[--subset TEXT --split TEXT --format [auto|human|agent|json|quiet]]hf datasets sql SQLโ Execute a raw SQL query with DuckDB against dataset parquet URLs.[--format [auto|human|agent|json|quiet]]
hf discussions โ Manage discussions and pull requests on the Hub.
hf discussions close REPO_ID NUMโ Close a discussion or pull request.[--comment TEXT --yes --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions comment REPO_ID NUMโ Comment on a discussion or pull request.[--body TEXT --body-file PATH --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions create REPO_ID --title TEXTโ Create a new discussion or pull request on a repo.[--body TEXT --body-file PATH --pull-request --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions diff REPO_ID NUMโ Show the diff of a pull request.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions edit REPO_ID NUM COMMENT_IDโ Edit an existing comment on a discussion or pull request.[--body TEXT --body-file PATH --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions info REPO_ID NUMโ Get info about a discussion or pull request.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions list REPO_IDโ List discussions and pull requests on a repo.[--status [open|closed|merged|draft|all] --kind [all|discussion|pull_request] --author TEXT --limit INTEGER --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions merge REPO_ID NUMโ Merge a pull request.[--comment TEXT --yes --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions rename REPO_ID NUM NEW_TITLEโ Rename a discussion or pull request.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf discussions reopen REPO_ID NUMโ Reopen a closed discussion or pull request.[--comment TEXT --yes --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]
hf endpoints โ Manage Hugging Face Inference Endpoints.
hf endpoints catalog deployโ Deploy an Inference Endpoint from the Model Catalog.[--repo TEXT --recipe TEXT --name TEXT --accelerator [cpu|gpu|neuron] --gguf-file TEXT --namespace TEXT --format [auto|human|agent|json|quiet]]hf endpoints catalog listโ List the models available in the Model Catalog.[--accelerator [cpu|gpu|neuron] --engine [llamacpp|sglang|tei|vllm] --license TEXT --task TEXT --search TEXT --limit INTEGER --format [auto|human|agent|json|quiet]]hf endpoints delete NAMEโ Delete an Inference Endpoint permanently.[--namespace TEXT --yes --format [auto|human|agent|json|quiet]]hf endpoints deploy NAME --repo TEXT --framework TEXT --accelerator TEXT --instance-size TEXT --instance-type TEXT --region TEXT --vendor TEXTโ Deploy an Inference Endpoint from a Hub repository.[--namespace TEXT --task TEXT --min-replica INTEGER --max-replica INTEGER --scale-to-zero-timeout INTEGER --scaling-metric [pendingRequests|hardwareUsage] --scaling-threshold FLOAT --revision TEXT --custom-image TEXT --engine [custom|hf-serve|llamacpp|sglang|tei|tgi|tgi-neuron|vllm|vllm-neuron] --health-route TEXT --port INTEGER --container-registry-username TEXT --container-registry-password TEXT --tensor-parallel-size INTEGER --data-parallel-size INTEGER --container-command TEXT --container-args TEXT --env TEXT --env-file TEXT --secrets TEXT --secrets-file TEXT --type [public|authenticated|private] --format [auto|human|agent|json|quiet]]hf endpoints describe NAMEโ Get information about an existing endpoint.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf endpoints hardwareโ List the hardware available to deploy an Inference Endpoint on.[--namespace TEXT --vendor TEXT --region TEXT --accelerator TEXT --instance-type TEXT --all --format [auto|human|agent|json|quiet]]hf endpoints listโ Lists all Inference Endpoints for the given namespace.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf endpoints pause NAMEโ Pause an Inference Endpoint.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf endpoints resume NAMEโ Resume an Inference Endpoint.[--namespace TEXT --fail-if-already-running --format [auto|human|agent|json|quiet]]hf endpoints scale-to-zero NAMEโ Scale an Inference Endpoint to zero.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf endpoints update NAMEโ Update an existing endpoint.[--namespace TEXT --repo TEXT --accelerator TEXT --instance-size TEXT --instance-type TEXT --framework TEXT --revision TEXT --task TEXT --custom-image TEXT --engine [custom|hf-serve|llamacpp|sglang|tei|tgi|tgi-neuron|vllm|vllm-neuron] --health-route TEXT --port INTEGER --tensor-parallel-size INTEGER --data-parallel-size INTEGER --container-command TEXT --container-args TEXT --min-replica INTEGER --max-replica INTEGER --scale-to-zero-timeout INTEGER --scaling-metric [pendingRequests|hardwareUsage] --scaling-threshold FLOAT --format [auto|human|agent|json|quiet]]
hf extensions โ Manage hf CLI extensions.
hf extensions exec NAMEโ Execute an installed extension.hf extensions install REPO_IDโ Install an extension from a public GitHub repository.[--force --format [auto|human|agent|json|quiet]]hf extensions listโ List installed extension commands.[--format [auto|human|agent|json|quiet]]hf extensions remove NAMEโ Remove an installed extension.[--format [auto|human|agent|json|quiet]]hf extensions searchโ Search extensions available on GitHub (tagged with 'hf-extension' topic).[--format [auto|human|agent|json|quiet]]hf extensions updateโ Update installed extension(s) to their latest version.[--format [auto|human|agent|json|quiet]]
hf jobs โ Run and manage Jobs on the Hub.
hf jobs cancel JOB_IDโ Cancel a Job[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs expose JOB_IDโ Replace exposed ports on a running Job.[--public INTEGER --clear --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs hardwareโ List available hardware options for Jobs[--format [auto|human|agent|json|quiet]]hf jobs inspect JOB_IDSโ Display detailed information on one or more Jobs[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs labels JOB_IDโ Update labels on a Job. Passing --label replaces all existing labels; passing --name alone keeps them.[--name TEXT --label TEXT --clear --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs listโ List Jobs.[--all --status [COMPLETED|CANCELED|ERROR|DELETED|SCHEDULING|RUNNING] --label TEXT --name TEXT --limit INTEGER --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs logs JOB_IDโ Fetch the logs of a Job.[--follow --tail INTEGER --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs rerun JOB_IDโ Run a new Job with an existing Job's spec.[--detach --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs run IMAGE COMMANDโ Run a Job.[--env TEXT --secrets TEXT --name TEXT --label TEXT --volume TEXT --env-file TEXT --secrets-file TEXT --flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --timeout TEXT --attempts INTEGER RANGE --detach --dry-run --expose INTEGER --expose-public INTEGER --ssh --network-group TEXT --network-alias TEXT --resource-group-id TEXT --namespace TEXT --format [agent|auto|human|json|quiet] --json --quiet]hf jobs scheduled delete SCHEDULED_JOB_IDโ Delete a scheduled Job.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled inspect SCHEDULED_JOB_IDSโ Display detailed information on one or more scheduled Jobs[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled labels SCHEDULED_JOB_IDโ Update labels on a scheduled Job. Passing --label replaces all existing labels; passing --name alone keeps them.[--name TEXT --label TEXT --clear --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled listโ List scheduled Jobs.[--all --status [active|suspended] --label TEXT --name TEXT --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled reschedule SCHEDULED_JOB_ID SCHEDULEโ Change when a scheduled Job runs.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled resume SCHEDULED_JOB_IDโ Resume (unpause) a scheduled Job.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled run SCHEDULE IMAGE COMMANDโ Schedule a Job.[--suspend --concurrency --env TEXT --secrets TEXT --name TEXT --label TEXT --volume TEXT --env-file TEXT --secrets-file TEXT --flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --timeout TEXT --attempts INTEGER RANGE --dry-run --expose INTEGER --expose-public INTEGER --resource-group-id TEXT --namespace TEXT --format [agent|auto|human|json|quiet] --json --quiet]hf jobs scheduled suspend SCHEDULED_JOB_IDโ Suspend (pause) a scheduled Job.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled trigger SCHEDULED_JOB_IDโ Trigger a scheduled Job to run immediately (does not change the schedule).[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs scheduled uv run SCHEDULE SCRIPTโ Run a UV script (local file or URL) on HF infrastructure[--suspend --concurrency --image TEXT --flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --env TEXT --secrets TEXT --name TEXT --label TEXT --volume TEXT --env-file TEXT --secrets-file TEXT --timeout TEXT --attempts INTEGER RANGE --dry-run --expose INTEGER --expose-public INTEGER --resource-group-id TEXT --namespace TEXT --with TEXT --python TEXT --format [agent|auto|human|json|quiet] --json --quiet]hf jobs ssh JOB_IDโ SSH into a running Job.[--identity-file PATH --dry-run --namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs statsโ Fetch the resource usage statistics and metrics of Jobs[--namespace TEXT --format [auto|human|agent|json|quiet]]hf jobs uv run SCRIPTโ Run a UV script (local file or URL) on HF infrastructure[--image TEXT --flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --env TEXT --secrets TEXT --name TEXT --label TEXT --volume TEXT --env-file TEXT --secrets-file TEXT --timeout TEXT --attempts INTEGER RANGE --detach --dry-run --expose INTEGER --expose-public INTEGER --ssh --network-group TEXT --network-alias TEXT --resource-group-id TEXT --namespace TEXT --with TEXT --python TEXT --format [agent|auto|human|json|quiet] --json --quiet]hf jobs wait JOB_IDSโ Wait for one or more Jobs to reach a terminal state.[--timeout TEXT --namespace TEXT --format [auto|human|agent|json|quiet]]
hf models โ Interact with models on the Hub.
hf models card MODEL_IDโ Get the model card (README) for a model on the Hub.[--metadata --text --format [auto|human|agent|json|quiet]]hf models info MODEL_IDโ Get info about a model on the Hub.[--revision TEXT --expand TEXT --format [auto|human|agent|json|quiet]]hf models listโ List models on the Hub, or files in a model repo.[--search TEXT --author TEXT --filter TEXT --pipeline-tag TEXT --gated --apps TEXT --num-parameters TEXT --inference-provider [baseten|cerebras|cohere|deepinfra|fal-ai|featherless-ai|fireworks-ai|groq|hf-inference|novita|nscale|openai|ovhcloud|publicai|replicate|scaleway|together|wavespeed|zai-org] --warm --sort [created_at|downloads|last_modified|likes|trending_score] --limit INTEGER --expand TEXT --human-readable --tree --recursive --revision TEXT --format [auto|human|agent|json|quiet]]
hf papers โ Interact with papers on the Hub.
hf papers info PAPER_IDโ Get info about a paper on the Hub.[--format [auto|human|agent|json|quiet]]hf papers listโ List daily papers on the Hub.[--date TEXT --week TEXT --month TEXT --submitter TEXT --sort [publishedAt|trending] --limit INTEGER --format [auto|human|agent|json|quiet]]hf papers read PAPER_IDโ Read a paper as markdown.[--format [auto|human|agent|json|quiet]]hf papers search QUERYโ Search papers on the Hub.[--limit INTEGER --format [auto|human|agent|json|quiet]]
hf repos โ Manage repos on the Hub.
hf repos branch create REPO_ID BRANCHโ Create a new branch for a repo on the Hub.[--revision TEXT --type [model|dataset|space|kernel] --exist-ok --format [auto|human|agent|json|quiet]]hf repos branch delete REPO_ID BRANCHโ Delete a branch from a repo on the Hub.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf repos cp SRCโ Copy files between local paths, repositories, and buckets.[--format [auto|human|agent|json|quiet]]hf repos create REPO_IDโ Create a new repo on the Hub.[--type [model|dataset|space|kernel] --sdk TEXT --template TEXT --private --public --protected --exist-ok --resource-group-id TEXT --region [us|eu] --flavor [cpu-basic|cpu-upgrade|zero-a10g|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8] --sleep-time INTEGER --secrets TEXT --secrets-file TEXT --env TEXT --env-file TEXT --volume TEXT --format [auto|human|agent|json|quiet]]hf repos delete REPO_IDโ Delete a repo from the Hub. This is an irreversible operation.[--type [model|dataset|space|kernel] --missing-ok --yes --format [auto|human|agent|json|quiet]]hf repos delete-files REPO_ID PATTERNSโ Delete files from a repo on the Hub.[--type [model|dataset|space|kernel] --revision TEXT --commit-message TEXT --commit-description TEXT --create-pr --format [auto|human|agent|json|quiet]]hf repos duplicate FROM_IDโ Duplicate a repo on the Hub (model, dataset, or Space).[--type [model|dataset|space|kernel] --private --public --protected --exist-ok --resource-group-id TEXT --flavor [cpu-basic|cpu-upgrade|zero-a10g|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8] --sleep-time INTEGER --secrets TEXT --secrets-file TEXT --env TEXT --env-file TEXT --volume TEXT --format [auto|human|agent|json|quiet]]hf repos listโ List all repos (models, datasets, spaces, buckets) with storage info.[--namespace TEXT --type [model|dataset|space|bucket] --search TEXT --limit INTEGER --explore --format [auto|human|agent|json|quiet]]hf repos move FROM_ID TO_IDโ Move a repository from a namespace to another namespace.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf repos settings REPO_IDโ Update the settings of a repository.[--gated [auto|manual|false] --private --public --protected --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf repos tag create REPO_ID TAGโ Create a tag for a repo.[--message TEXT --revision TEXT --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf repos tag delete REPO_ID TAGโ Delete a tag for a repo.[--yes --type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]hf repos tag list REPO_IDโ List tags for a repo.[--type [model|dataset|space|kernel] --format [auto|human|agent|json|quiet]]
hf sandbox โ Run and manage experimental sandboxes on Hugging Face Jobs.
hf sandbox cp SRC DSTโ Copy a file between the local machine and a sandbox (docker-style).[--namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox createโ Create a sandbox: a dedicated VM by default, or a cheap shared one with--pool.[--pool TEXT --flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --idle-timeout TEXT --env TEXT --secrets TEXT --label TEXT --env-file TEXT --secrets-file TEXT --volume TEXT --namespace TEXT --forward-hf-token --format [auto|human|agent|json|quiet]]hf sandbox exec SANDBOX_ID COMMANDโ Run a command in a sandbox, streaming output. Exits with the command's exit code.[--workdir TEXT --env TEXT --env-file TEXT --timeout FLOAT --namespace TEXT]hf sandbox killโ Terminate a sandbox, a whole shared host, or everything (--all).[--all --yes --namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox pool createโ Warm a pool: boot one host VM now, tagged so it can be found later by its pool id.[--flavor [cpu-basic|cpu-upgrade|cpu-performance|cpu-xl|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8|h200|h200x2|h200x4|h200x8|rtx-pro-6000|rtx-pro-6000x2|rtx-pro-6000x4|rtx-pro-6000x8] --per-host INTEGER RANGE --max-hosts INTEGER RANGE --idle-timeout TEXT --namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox pool delete POOL_IDโ Terminate every host VM of a pool (and therefore all its sandboxes).[--yes --namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox pool lsโ List running sandbox pools (grouped from their host VMs).[--namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox process kill SANDBOX_ID PIDโ Stop a background process running in a sandbox.[--namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox process ls SANDBOX_IDโ List the background processes running in a sandbox (started withhf sandbox spawn).[--namespace TEXT --format [auto|human|agent|json|quiet]]hf sandbox spawn SANDBOX_ID COMMANDโ Start a long-running command in the background and return its pid (don't wait).[--workdir TEXT --env TEXT --env-file TEXT --namespace TEXT]
hf skills โ Manage skills for AI assistants.
hf skills addโ Install a Hugging Face skill for an AI assistant.[--global --dest PATH --force --format [auto|human|agent|json|quiet]]hf skills listโ List available skills from the Hugging Face marketplace.[--format [auto|human|agent|json|quiet]]hf skills previewโ Print the generatedhf-cliSKILL.md to stdout.[--format [auto|human|agent|json|quiet]]hf skills updateโ Update installed Hugging Face marketplace skills.[--global --dest PATH --format [auto|human|agent|json|quiet]]
hf spaces โ Interact with spaces on the Hub.
hf spaces card SPACE_IDโ Get the Space card (README) for a Space on the Hub.[--metadata --text --format [auto|human|agent|json|quiet]]hf spaces dev-mode SPACE_IDโ Enable or disable dev mode on a Space.[--stop --format [auto|human|agent|json|quiet]]hf spaces hardwareโ List available hardware options for Spaces.[--format [auto|human|agent|json|quiet]]hf spaces hot-reload SPACE_IDโ Hot-reload any Python file of a Space without a full rebuild + restart.[--local-file PATH --skip-checks --skip-summary --format [auto|human|agent|json|quiet]]hf spaces info SPACE_IDโ Get info about a space on the Hub.[--revision TEXT --expand TEXT --format [auto|human|agent|json|quiet]]hf spaces listโ List spaces on the Hub, or files in a space repo.[--search TEXT --author TEXT --filter TEXT --sort [created_at|last_modified|likes|trending_score] --limit INTEGER --expand TEXT --human-readable --tree --recursive --revision TEXT --format [auto|human|agent|json|quiet]]hf spaces logs SPACE_IDโ Fetch the run or build logs of a Space.[--build --follow --tail INTEGER --format [auto|human|agent|json|quiet]]hf spaces pause SPACE_IDโ Pause a Space.[--format [auto|human|agent|json|quiet]]hf spaces restart SPACE_IDโ Restart a Space.[--factory-reboot --format [auto|human|agent|json|quiet]]hf spaces search QUERYโ Search spaces on the Hub using semantic search.[--filter TEXT --sdk TEXT --include-non-running --description --limit INTEGER --format [auto|human|agent|json|quiet]]hf spaces secrets add SPACE_IDโ Add or update secrets for a Space.[--secrets TEXT --secrets-file TEXT --format [auto|human|agent|json|quiet]]hf spaces secrets delete SPACE_ID KEYโ Remove a secret from a Space.[--yes --format [auto|human|agent|json|quiet]]hf spaces secrets list SPACE_IDโ List secrets for a Space. Secret values are write-only and not returned.[--format [auto|human|agent|json|quiet]]hf spaces settings SPACE_IDโ Update the settings of a Space.[--sleep-time INTEGER --hardware [cpu-basic|cpu-upgrade|zero-a10g|t4-small|t4-medium|l4x1|l4x4|l40sx1|l40sx4|l40sx8|a10g-small|a10g-large|a10g-largex2|a10g-largex4|a100-large|a100x4|a100x8] --format [auto|human|agent|json|quiet]]hf spaces ssh SPACE_IDโ SSH into a Space's Dev Mode container.[--identity-file PATH --dry-run --auto --format [auto|human|agent|json|quiet]]hf spaces templatesโ List the available Space templates.[--format [auto|human|agent|json|quiet]]hf spaces variables add SPACE_IDโ Add or update environment variables for a Space.[--env TEXT --env-file TEXT --format [auto|human|agent|json|quiet]]hf spaces variables delete SPACE_ID KEYโ Remove an environment variable from a Space.[--yes --format [auto|human|agent|json|quiet]]hf spaces variables list SPACE_IDโ List environment variables for a Space.[--format [auto|human|agent|json|quiet]]hf spaces volumes delete SPACE_IDโ Remove all volumes from a Space.[--yes --format [auto|human|agent|json|quiet]]hf spaces volumes list SPACE_IDโ List volumes mounted in a Space.[--format [auto|human|agent|json|quiet]]hf spaces volumes set SPACE_IDโ Set (replace) volumes for a Space.[--volume TEXT --format [auto|human|agent|json|quiet]]hf spaces wait SPACE_IDโ Wait for a Space to finish building/starting.[--timeout TEXT --format [auto|human|agent|json|quiet]]hf spaces zero-gpu quotaโ Show your ZeroGPU quota (remaining GPU time and reset date).[--format [auto|human|agent|json|quiet]]
hf webhooks โ Manage webhooks on the Hub.
hf webhooks create --watch TEXTโ Create a new webhook.[--url TEXT --job-id TEXT --domain [repo|discussions] --secret TEXT --secrets TEXT --secrets-file TEXT --format [auto|human|agent|json|quiet]]hf webhooks delete WEBHOOK_IDโ Delete a webhook permanently.[--yes --format [auto|human|agent|json|quiet]]hf webhooks disable WEBHOOK_IDโ Disable an active webhook.[--format [auto|human|agent|json|quiet]]hf webhooks enable WEBHOOK_IDโ Enable a disabled webhook.[--format [auto|human|agent|json|quiet]]hf webhooks info WEBHOOK_IDโ Show full details for a single webhook.[--format [auto|human|agent|json|quiet]]hf webhooks listโ List all webhooks for the current user.[--format [auto|human|agent|json|quiet]]hf webhooks update WEBHOOK_IDโ Update an existing webhook. Only provided options are changed.[--url TEXT --job-id TEXT --watch TEXT --domain [repo|discussions] --secret TEXT --secrets TEXT --secrets-file TEXT --format [auto|human|agent|json|quiet]]
Common options
--formatโ Output format:--format json(or--json) or--format table(default).-q / --quietโ Quiet output (one ID per line). Equivalent to '--format quiet'.--revisionโ Git revision id which can be a branch name, a tag, or a commit hash.--tokenโ Use a User Access Token. Prefer settingHF_TOKENenv var instead of passing--token.--typeโ The type of repository (model, dataset, space, or kernel).
Mounting repos as local filesystems
To mount Hub repositories or buckets as local filesystems โ no download, no copy, no waiting โ use hf-mount. Files are fetched on demand. GitHub: https://github.com/huggingface/hf-mount
Install: brew install hf-mount, or download a binary from https://github.com/huggingface/hf-mount/releases
Some command examples:
hf-mount start repo openai-community/gpt2 /tmp/gpt2โ mount a repo (read-only)hf-mount start --hf-token $HF_TOKEN bucket myuser/my-bucket /tmp/dataโ mount a bucket (read-write)hf-mount status/hf-mount stop /tmp/dataโ list or unmount
Tips
- Use
hf <command> --helpfor full options, descriptions, usage, and real-world examples - Authenticate with
HF_TOKENenv var (recommended) or with--token - Update the CLI with
hf update(uses the correct command for the detected install method)