Receber por email
← Voltar para o catálogo

hf-cli

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 spac

141estrelas
Atualizado há 4 meses

Ver no GitHub ↗ Licença: MIT

Como adicionar

/plugin marketplace add lingxling/awesome-skills-cn

O comando exato pode variar conforme o repositório. Confira o README no GitHub.

Para o autor da skill

Cole no README do seu repo

Mostra que sua skill está catalogada na Skillteca, gera backlink e tráfego rastreável.

[![Skillteca](https://www.skillteca.com.br/api/badge/hf-cli/svg)](https://www.skillteca.com.br/skills/hf-cli)

Skills relacionadas

Ver todas de Dados e Análise →

Alerta por categoria

Receba novas skills de Dados e Análise toda segunda

1 email curto, só com as skills novas de Dados e Análise. 4 minutos de leitura, sem spam, cancela com 1 clique.

Você confirma o email no primeiro envio. Sem spam. Cancela com 1 clique.

Ler descrição completa

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 v1.14.0. Run hf skills add --force to regenerate.

Commands

  • hf download REPO_ID — Download files from the Hub. [--type CHOICE --revision TEXT --include TEXT --exclude TEXT --cache-dir TEXT --local-dir TEXT --force-download --dry-run --max-workers INTEGER --format CHOICE]
  • hf env — Print information about the environment. [--format CHOICE]
  • 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 CHOICE]
  • hf update — Update the hf CLI to the latest version. [--format CHOICE]
  • hf upload REPO_ID — Upload a file or a folder to the Hub. Recommended for single-commit uploads. [--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --delete TEXT --commit-message TEXT --commit-description TEXT --create-pr --every FLOAT --format CHOICE]
  • hf upload-large-folder REPO_ID LOCAL_PATH — Upload a large folder to the Hub. Recommended for resumable uploads. [--type CHOICE --revision TEXT --private --include TEXT --exclude TEXT --num-workers INTEGER --no-report --no-bars --format CHOICE]
  • hf version — Print information about the hf version. [--format CHOICE]

hf auth — Manage authentication (login, logout, etc.).

  • hf auth list — List all stored access tokens. [--format CHOICE]
  • hf auth login — Login using a token from huggingface.co/settings/tokens. [--add-to-git-credential --force --format CHOICE]
  • hf auth logout — Logout from a specific token. [--token-name TEXT --format CHOICE]
  • hf auth switch — Switch between access tokens. [--token-name TEXT --add-to-git-credential --format CHOICE]
  • hf auth token — Print the current access token to stdout. [--format CHOICE]
  • hf auth whoami — Find out which huggingface.co account you are logged in as. [--format CHOICE]

hf buckets — Commands to interact with buckets.

  • hf buckets cp SRC — Copy files to or from buckets. [--format CHOICE]
  • hf buckets create BUCKET_ID — Create a new bucket. [--private --exist-ok --format CHOICE]
  • hf buckets delete BUCKET_ID — Delete a bucket. [--yes --missing-ok --format CHOICE]
  • hf buckets info BUCKET_ID — Get info about a bucket. [--format CHOICE]
  • hf buckets list — List buckets or files in a bucket. [--human-readable --tree --recursive --search TEXT --format CHOICE]
  • hf buckets move FROM_ID TO_ID — Move (rename) a bucket to a new name or namespace. [--format CHOICE]
  • hf buckets remove ARGUMENT — Remove files from a bucket. [--recursive --yes --dry-run --include TEXT --exclude TEXT --format CHOICE]
  • 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 CHOICE]

hf cache — Manage local cache directory.

  • hf cache list — List cached repositories or revisions. [--cache-dir TEXT --revisions --filter TEXT --sort CHOICE --limit INTEGER --format CHOICE]
  • hf cache prune — Remove detached revisions from the cache. [--cache-dir TEXT --yes --dry-run --format CHOICE]
  • hf cache rm TARGETS — Remove cached repositories or revisions. [--cache-dir TEXT --yes --dry-run --format CHOICE]
  • hf cache verify REPO_ID — Verify checksums for a single repo revision from cache or a local directory. [--type CHOICE --revision TEXT --cache-dir TEXT --local-dir TEXT --fail-on-missing-files --fail-on-extra-files --format CHOICE]

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 CHOICE]
  • hf collections create TITLE — Create a new collection on the Hub. [--namespace TEXT --description TEXT --private --exists-ok --format CHOICE]
  • hf collections delete COLLECTION_SLUG — Delete a collection from the Hub. [--missing-ok --format CHOICE]
  • hf collections delete-item COLLECTION_SLUG ITEM_OBJECT_ID — Delete an item from a collection. [--missing-ok --format CHOICE]
  • hf collections info COLLECTION_SLUG — Get info about a collection on the Hub. [--format CHOICE]
  • hf collections list — List collections on the Hub. [--owner TEXT --item TEXT --sort CHOICE --limit INTEGER --format CHOICE]
  • hf collections update COLLECTION_SLUG — Update a collection's metadata on the Hub. [--title TEXT --description TEXT --position INTEGER --private --theme TEXT --format CHOICE]
  • hf collections update-item COLLECTION_SLUG ITEM_OBJECT_ID — Update an item in a collection. [--note TEXT --position INTEGER --format CHOICE]

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 CHOICE]
  • hf datasets info DATASET_ID — Get info about a dataset on the Hub. [--revision TEXT --expand TEXT --format CHOICE]
  • 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 CHOICE]
  • hf datasets list — List datasets on the Hub, or files in a dataset repo. [--search TEXT --author TEXT --filter TEXT --sort CHOICE --limit INTEGER --expand TEXT --human-readable --tree --recursive --revision TEXT --format CHOICE]
  • hf datasets parquet DATASET_ID — List parquet file URLs available for a dataset. [--subset TEXT --split TEXT --format CHOICE]
  • hf datasets sql SQL — Execute a raw SQL query with DuckDB against dataset parquet URLs. [--format CHOICE]

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 CHOICE --format CHOICE]
  • hf discussions comment REPO_ID NUM — Comment on a discussion or pull request. [--body TEXT --body-file PATH --type CHOICE --format CHOICE]
  • 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 CHOICE --format CHOICE]
  • hf discussions diff REPO_ID NUM — Show the diff of a pull request. [--type CHOICE --format CHOICE]
  • hf discussions info REPO_ID NUM — Get info about a discussion or pull request. [--type CHOICE --format CHOICE]
  • hf discussions list REPO_ID — List discussions and pull requests on a repo. [--status CHOICE --kind CHOICE --author TEXT --limit INTEGER --type CHOICE --format CHOICE]
  • hf discussions merge REPO_ID NUM — Merge a pull request. [--comment TEXT --yes --type CHOICE --format CHOICE]
  • hf discussions rename REPO_ID NUM NEW_TITLE — Rename a discussion or pull request. [--type CHOICE --format CHOICE]
  • hf discussions reopen REPO_ID NUM — Reopen a closed discussion or pull request. [--comment TEXT --yes --type CHOICE --format CHOICE]

hf endpoints — Manage Hugging Face Inference Endpoints.

  • hf endpoints catalog deploy --repo TEXT — Deploy an Inference Endpoint from the Model Catalog. [--name TEXT --accelerator TEXT --namespace TEXT --format CHOICE]
  • hf endpoints catalog list — List available Catalog models. [--format CHOICE]
  • hf endpoints delete NAME — Delete an Inference Endpoint permanently. [--namespace TEXT --yes --format CHOICE]
  • `hf endpoints deploy NAME --repo TEXT --framework TEXT --acceler
Compartilhar X LinkedIn