Kheish Compatibility
This skill is repo-local and stays inactive until explicitly activated.
When the original instructions refer to legacy tool names, use these Kheish mappings:
terminal => bash
web_extract => web_fetch, plus web_search when discovery is needed
search_files => grep_search and glob_search
browser_* tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly
When the instructions mention local helper files, resolve them from ${KHEISH_SKILL_DIR}.
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.
1---2name: huggingface-hub3description: 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.4license: MIT5---67## Kheish Compatibility89This skill is repo-local and stays inactive until explicitly activated.1011When the original instructions refer to legacy tool names, use these Kheish mappings:1213- `terminal` => `bash`14- `web_extract` => `web_fetch`, plus `web_search` when discovery is needed15- `search_files` => `grep_search` and `glob_search`16- `browser_*` tools require a browser-capable surfaced tool or MCP; if none is available, use the closest available surface and say so explicitly1718When the instructions mention local helper files, resolve them from `${KHEISH_SKILL_DIR}`.1920# Hugging Face CLI (`hf`) Reference Guide2122The `hf` command is the modern command-line interface for interacting with the Hugging Face Hub, providing tools to manage repositories, models, datasets, and Spaces.2324> **IMPORTANT:** The `hf` command replaces the now deprecated `huggingface-cli` command.2526## Quick Start27* **Installation:** `curl -LsSf https://hf.co/cli/install.sh | bash -s`28* **Help:** Use `hf --help` to view all available functions and real-world examples.29* **Authentication:** Recommended via `HF_TOKEN` environment variable or the `--token` flag.3031---3233## Core Commands3435### General Operations36* `hf download REPO_ID`: Download files from the Hub.37* `hf upload REPO_ID`: Upload files/folders (recommended for single-commit).38* `hf upload-large-folder REPO_ID LOCAL_PATH`: Recommended for resumable uploads of large directories.39* `hf sync`: Sync files between a local directory and a bucket.40* `hf env` / `hf version`: View environment and version details.4142### Authentication (`hf auth`)43* `login` / `logout`: Manage sessions using tokens from [huggingface.co/settings/tokens](https://huggingface.co/settings/tokens).44* `list` / `switch`: Manage and toggle between multiple stored access tokens.45* `whoami`: Identify the currently logged-in account.4647### Repository Management (`hf repos`)48* `create` / `delete`: Create or permanently remove repositories.49* `duplicate`: Clone a model, dataset, or Space to a new ID.50* `move`: Transfer a repository between namespaces.51* `branch` / `tag`: Manage Git-like references.52* `delete-files`: Remove specific files using patterns.5354---5556## Specialized Hub Interactions5758### Datasets & Models59* **Datasets:** `hf datasets list`, `info`, and `parquet` (list parquet URLs).60* **SQL Queries:** `hf datasets sql SQL` — Execute raw SQL via DuckDB against dataset parquet URLs.61* **Models:** `hf models list` and `info`.62* **Papers:** `hf papers list` — View daily papers.6364### Discussions & Pull Requests (`hf discussions`)65* Manage the lifecycle of Hub contributions: `list`, `create`, `info`, `comment`, `close`, `reopen`, and `rename`.66* `diff`: View changes in a PR.67* `merge`: Finalize pull requests.6869### Infrastructure & Compute70* **Endpoints:** Deploy and manage Inference Endpoints (`deploy`, `pause`, `resume`, `scale-to-zero`, `catalog`).71* **Jobs:** Run compute tasks on HF infrastructure. Includes `hf jobs uv` for running Python scripts with inline dependencies and `stats` for resource monitoring.72* **Spaces:** Manage interactive apps. Includes `dev-mode` and `hot-reload` for Python files without full restarts.7374### Storage & Automation75* **Buckets:** Full S3-like bucket management (`create`, `cp`, `mv`, `rm`, `sync`).76* **Cache:** Manage local storage with `list`, `prune` (remove detached revisions), and `verify` (checksum checks).77* **Webhooks:** Automate workflows by managing Hub webhooks (`create`, `watch`, `enable`/`disable`).78* **Collections:** Organize Hub items into collections (`add-item`, `update`, `list`).7980---8182## Advanced Usage & Tips8384### Global Flags85* `--format json`: Produces machine-readable output for automation.86* `-q` / `--quiet`: Limits output to IDs only.8788### Extensions & Skills89* **Extensions:** Extend CLI functionality via GitHub repositories using `hf extensions install REPO_ID`.90* **Skills:** Manage AI assistant skills with `hf skills add`.