Hermes-agent huggingface-hub
Hugging Face Hub CLI (hf) — search, download, and upload models and datasets, manage repos, query datasets with SQL, deploy inference endpoints, manage Spaces and buckets.
install
source · Clone the upstream repo
git clone https://github.com/NousResearch/hermes-agent
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/NousResearch/hermes-agent "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/mlops/huggingface-hub" ~/.claude/skills/nousresearch-hermes-agent-huggingface-hub-357327 && rm -rf "$T"
manifest:
skills/mlops/huggingface-hub/SKILL.mdsource content
Hugging Face CLI (hf
) Reference Guide
hfThe
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
command replaces the now deprecatedhfcommand.huggingface-cli
Quick Start
- Installation:
curl -LsSf https://hf.co/cli/install.sh | bash -s - Help: Use
to view all available functions and real-world examples.hf --help - Authentication: Recommended via
environment variable or theHF_TOKEN
flag.--token
Core Commands
General Operations
: Download files from the Hub.hf download REPO_ID
: Upload files/folders (recommended for single-commit).hf upload REPO_ID
: Recommended for resumable uploads of large directories.hf upload-large-folder REPO_ID LOCAL_PATH
: Sync files between a local directory and a bucket.hf sync
/hf env
: View environment and version details.hf version
Authentication (hf auth
)
hf auth
/login
: Manage sessions using tokens from huggingface.co/settings/tokens.logout
/list
: Manage and toggle between multiple stored access tokens.switch
: Identify the currently logged-in account.whoami
Repository Management (hf repos
)
hf repos
/create
: Create or permanently remove repositories.delete
: Clone a model, dataset, or Space to a new ID.duplicate
: Transfer a repository between namespaces.move
/branch
: Manage Git-like references.tag
: Remove specific files using patterns.delete-files
Specialized Hub Interactions
Datasets & Models
- Datasets:
,hf datasets list
, andinfo
(list parquet URLs).parquet - SQL Queries:
— Execute raw SQL via DuckDB against dataset parquet URLs.hf datasets sql SQL - Models:
andhf models list
.info - Papers:
— View daily papers.hf papers list
Discussions & Pull Requests (hf discussions
)
hf discussions- Manage the lifecycle of Hub contributions:
,list
,create
,info
,comment
,close
, andreopen
.rename
: View changes in a PR.diff
: Finalize pull requests.merge
Infrastructure & Compute
- Endpoints: Deploy and manage Inference Endpoints (
,deploy
,pause
,resume
,scale-to-zero
).catalog - Jobs: Run compute tasks on HF infrastructure. Includes
for running Python scripts with inline dependencies andhf jobs uv
for resource monitoring.stats - Spaces: Manage interactive apps. Includes
anddev-mode
for Python files without full restarts.hot-reload
Storage & Automation
- Buckets: Full S3-like bucket management (
,create
,cp
,mv
,rm
).sync - Cache: Manage local storage with
,list
(remove detached revisions), andprune
(checksum checks).verify - 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
: Produces machine-readable output for automation.--format json
/-q
: Limits output to IDs only.--quiet
Extensions & Skills
- Extensions: Extend CLI functionality via GitHub repositories using
.hf extensions install REPO_ID - Skills: Manage AI assistant skills with
.hf skills add