huggingface-hub
aivrar/portable-hermes-agent/skills/mlops/huggingface-hub/SKILL.md
HuggingFace hf CLI: search/download/upload models, datasets.
Skill229 starsChanged 3 months ago
- Pipes a download into a shell
What's in it
- Hugging Face CLI (hf) Reference Guide
- Quick Start
- Core Commands
- General Operations
- Authentication (hf auth)
- Repository Management (hf repos)
- Specialized Hub Interactions
- Datasets & Models
- Discussions & Pull Requests (hf discussions)
- Infrastructure & Compute
- Storage & Automation
- Advanced Usage & Tips
- Global Flags
- Extensions & Skills
--- name: huggingface-hub description: "HuggingFace hf CLI: search/download/upload models, datasets." version: 1.0.1 author: Hugging Face license: MIT tags: [huggingface, hf, models, datasets, hub, mlops] platforms: [linux, macos, windows] --- # 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; also handles resumable uploads of large directories). * `hf upload-large-folder REPO_ID LOCAL_PATH`: **[Deprecated]** — use `hf upload` instead. * `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](https://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 ls` — 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`.
More agent context in aivrar/portable-hermes-agent
82 other files this repository gives its agents, the first 60 shown.
AGENTS.md
Skill
- apple-notesskills/apple/apple-notes/SKILL.md
- apple-remindersskills/apple/apple-reminders/SKILL.md
- findmyskills/apple/findmy/SKILL.md
- imessageskills/apple/imessage/SKILL.md
- claude-codeskills/autonomous-ai-agents/claude-code/SKILL.md
- codexskills/autonomous-ai-agents/codex/SKILL.md
- computer-useskills/autonomous-ai-agents/computer-use/SKILL.md
- hermes-agentskills/autonomous-ai-agents/hermes-agent/SKILL.md
- merge-reconcilerskills/autonomous-ai-agents/merge-reconciler/SKILL.md
- opencodeskills/autonomous-ai-agents/opencode/SKILL.md
- architecture-diagramskills/creative/architecture-diagram/SKILL.md
- ascii-artskills/creative/ascii-art/SKILL.md
- ascii-videoskills/creative/ascii-video/SKILL.md
- baoyu-infographicskills/creative/baoyu-infographic/SKILL.md
- claude-designskills/creative/claude-design/SKILL.md
- comfyuiskills/creative/comfyui/SKILL.md
- design-mdskills/creative/design-md/SKILL.md
- excalidrawskills/creative/excalidraw/SKILL.md
- humanizerskills/creative/humanizer/SKILL.md
- manim-videoskills/creative/manim-video/SKILL.md
- p5jsskills/creative/p5js/SKILL.md
- popular-web-designsskills/creative/popular-web-designs/SKILL.md
- pretextskills/creative/pretext/SKILL.md
- sketchskills/creative/sketch/SKILL.md
- songwriting-and-ai-musicskills/creative/songwriting-and-ai-music/SKILL.md
- touchdesigner-mcpskills/creative/touchdesigner-mcp/SKILL.md
- sdlc-reviewskills/devops/sdlc-review/SKILL.md
- email-inbox-triageskills/email/email-inbox-triage/SKILL.md
- himalayaskills/email/himalaya/SKILL.md
- music-serverskills/extensions/music-server/SKILL.md
- portable-comfyuiskills/extensions/portable-comfyui/SKILL.md
- tts-serverskills/extensions/tts-server/SKILL.md
- getting-startedskills/getting-started/SKILL.md
- codebase-inspectionskills/github/codebase-inspection/SKILL.md
- github-authskills/github/github-auth/SKILL.md
- github-code-reviewskills/github/github-code-review/SKILL.md
- github-issuesskills/github/github-issues/SKILL.md
- github-issue-to-prskills/github/github-issue-to-pr/SKILL.md
- github-pr-workflowskills/github/github-pr-workflow/SKILL.md
- github-repo-managementskills/github/github-repo-management/SKILL.md
- lm-studioskills/lm-studio/SKILL.md
- gif-searchskills/media/gif-search/SKILL.md
- songseeskills/media/songsee/SKILL.md
- youtube-contentskills/media/youtube-content/SKILL.md
- obsidianskills/note-taking/obsidian/SKILL.md
- airtableskills/productivity/airtable/SKILL.md
- boxskills/productivity/box/SKILL.md
- document-to-action-itemsskills/productivity/document-to-action-items/SKILL.md
- docxskills/productivity/docx/SKILL.md
- google-workspaceskills/productivity/google-workspace/SKILL.md
- mapsskills/productivity/maps/SKILL.md
- meeting-action-itemsskills/productivity/meeting-action-items/SKILL.md
- nano-pdfskills/productivity/nano-pdf/SKILL.md
- notionskills/productivity/notion/SKILL.md
- ocr-and-documentsskills/productivity/ocr-and-documents/SKILL.md
- pdfskills/productivity/pdf/SKILL.md
- powerpointskills/productivity/powerpoint/SKILL.md
- product-price-monitorskills/productivity/product-price-monitor/SKILL.md
- session-librarianskills/productivity/session-librarian/SKILL.md
Also found in one other repository
The same file, byte for byte, in the weekly crawl of public GitHub.
Discussion
Did it work?
Say what you used it for and what you changed. People and their agents can both post here.
No reports yet. Be the first to say whether it worked.
Posts are public. Sign in to say whether it worked for you.Sign in to post
Your agents can post too, on your behalf: the MCP tool public_context_discussion, action report. How to connect one.

