Skip to content
Skillv1.0.0

huggingface-hub

HuggingFace hf CLI: search/download/upload models, datasets.

by ChangHui666888(0) 0 installs
Free
Sign in to install

Free account. Installing gives you the manifest plus copy-paste snippets.

See reviews

About

Imported from ChangHui666888/hermes-agent-backup (profiles/outside-deepdeek/skills/mlops/huggingface-hub/SKILL.md). Install upstream with npx skills add ChangHui666888/hermes-agent-backup --skill huggingface-hub. Copyright stays with the author (MIT).

Hugging Face CLI (hf) Reference Guide

The hf command is the modern command-line interface for interacting with the Hugging Face Hub, providing tools to manage repositories, models, datasets, and Spaces.

IMPORTANT: The hf command replaces the now deprecated huggingface-cli command.

Quick Start

  • Installation: curl -LsSf https://hf.co/cli/install.sh | bash -s
  • Help: Use hf --help to view all available functions and real-world examples.
  • Authentication: Recommended via HF_TOKEN environment variable or the --token flag.

Core Commands

General Operations

  • hf download REPO_ID: Download files from the Hub.
  • hf upload REPO_ID: Upload files/folders (recommended for single-commit).
  • hf upload-large-folder REPO_ID LOCAL_PATH: Recommended for resumable uploads of large directories.
  • hf sync: Sync files between a local directory and a bucket.
  • hf env / hf version: View environment and version details.

Authentication (hf auth)

  • login / logout: Manage sessions using tokens from huggingface.co/settings/tokens.
  • list / switch: Manage and toggle between multiple stored access tokens.
  • whoami: Identify the currently logged-in account.

Repository Management (hf repos)

  • create / delete: Create or permanently remove repositories.
  • duplicate: Clone a model, dataset, or Space to a new ID.
  • move: Transfer a repository between namespaces.
  • branch / tag: Manage Git-like references.
  • delete-files: Remove specific files using patterns.

Specialized Hub Interactions

Datasets & Models

  • Datasets: hf datasets list, info, and parquet (list parquet URLs).
  • SQL Queries: hf datasets sql SQL — Execute raw SQL via DuckDB against dataset parquet URLs.
  • Models: hf models list and info.
  • Papers: hf papers list — View daily papers.

Discussions & Pull Requests (hf discussions)

  • Manage the lifecycle of Hub contributions: list, create, info, comment, close, reopen, and rename.
  • diff: View changes in a PR.
  • merge: Finalize pull requests.

Infrastructure & Compute

  • Endpoints: Deploy and manage Inference Endpoints (deploy, pause, resume, scale-to-zero, catalog).
  • Jobs: Run compute tasks on HF infrastructure. Includes hf jobs uv for running Python scripts with inline dependencies and stats for resource monitoring.
  • Spaces: Manage interactive apps. Includes dev-mode and hot-reload for Python files without full restarts.

Storage & Automation

  • Buckets: Full S3-like bucket management (create, cp, mv, rm, sync).
  • Cache: Manage local storage with list, prune (remove detached revisions), and verify (checksum checks).
  • Webhooks: Automate workflows by managing Hub webhooks (create, watch, enable/disable).
  • Collections: Organize Hub items into collections (add-item, update, list).

Advanced Usage & Tips

Global Flags

  • --format json: Produces machine-readable output for automation.
  • -q / --quiet: Limits output to IDs only.

Extensions & Skills

  • Extensions: Extend CLI functionality via GitHub repositories using hf extensions install REPO_ID.
  • Skills: Manage AI assistant skills with hf skills add.

Use it

Copy one of these into your project. Installing also returns the manifest and these snippets.

yaml
targets:
  - https://api.opensmartroute.ai/api/v1/registry/changhui666888-hermes-agent-backup-huggingface-hub/manifest   # or paste the manifest below

Manifest

An Open Capability Manifest: the router reads it to know what this does, what it costs and when to pick it.

changhui666888-hermes-agent-backup-huggingface-hub.ocm.jsonjson
{
  "ocm": "1",
  "id": "changhui666888-hermes-agent-backup-huggingface-hub",
  "kind": "skill",
  "name": "huggingface-hub",
  "description": "HuggingFace hf CLI: search/download/upload models, datasets.",
  "publisher": "ChangHui666888",
  "version": "1.0.0",
  "capabilities": {
    "domains": [
      "general"
    ],
    "tags": [
      "skill-md",
      "huggingface",
      "hf",
      "models",
      "datasets",
      "hub",
      "mlops",
      "github"
    ],
    "languages": [
      "en"
    ]
  },
  "quality_prior": 0.6,
  "examples": [
    "HuggingFace hf CLI: search/download/upload models, datasets."
  ],
  "primary": false,
  "metadata": {
    "source": {
      "provider": "github",
      "repository": "https://github.com/ChangHui666888/hermes-agent-backup",
      "path": "profiles/outside-deepdeek/skills/mlops/huggingface-hub/SKILL.md",
      "ref": "edd5d7b08b8f3e539a35e92d1e029615f8aa5749",
      "url": "https://github.com/ChangHui666888/hermes-agent-backup/blob/edd5d7b08b8f3e539a35e92d1e029615f8aa5749/profiles/outside-deepdeek/skills/mlops/huggingface-hub/SKILL.md",
      "key": "ChangHui666888/hermes-agent-backup/profiles/outside-deepdeek/skills/mlops/huggingface-hub/SKILL.md"
    },
    "license": "MIT"
  },
  "instructions": "# Hugging Face CLI (`hf`) Reference Guide\n\nThe `hf` command is the modern command-line interface for interacting with the Hugging Face Hub, providing tools to manage repositories, models, datasets, and Spaces.\n\n> **IMPORTANT:** The `hf` command replaces the now deprecated `huggingface-cli` command.\n\n## Quick Start\n*   **Installation:** `curl -LsSf https://hf.co/cli/install.sh | bash -s`\n*   **Help:** Use `hf --help` to view all available functions and real-world examples.\n*   **Authentication:** Recommended via `HF_TOKEN` environment variable or the `--token` flag.\n\n---\n\n## Core Commands\n\n### ",
  "cost": {
    "context_tokens": 856
  }
}

Fetch it by URL: GET /api/v1/registry/changhui666888-hermes-agent-backup-huggingface-hub/manifest?version=1.0.0

Reviews

Star ratings from people who tried it. One review per account; edit yours any time.

No reviews yet. Install it, try it, and be the first to rate it.