复制下面这句话,粘贴给 Claude Code、Codex、Cursor 等 AI 编程工具,它会读取安装说明并在你确认后完成安装。
请阅读 https://ai.atlankj.com/install/asset/gh-huggingface-hub-573602aef49d ,按照其中的说明把「huggingface-hub」安装到你(当前 AI 工具)中。执行前先告诉我将运行的命令和写入的位置,等我确认。
查看 AI 将读取的安装说明正在读取 GitHub 原文…
内容来自 GitHub 原始文件,由原作者维护。在 GitHub 查看
hf) Reference GuideThe 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
hfcommand replaces the now deprecatedhuggingface-clicommand.
curl -LsSf https://hf.co/cli/install.sh | bash -shf --help to view all available functions and real-world examples.HF_TOKEN environment variable or the --token flag.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.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.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.hf datasets list, info, and parquet (list parquet URLs).hf datasets sql SQL — Execute raw SQL via DuckDB against dataset parquet URLs.hf models list and info.hf papers ls — View daily papers.hf discussions)list, create, info, comment, close, reopen, and rename.diff: View changes in a PR.merge: Finalize pull requests.deploy, pause, resume, scale-to-zero, catalog).hf jobs uv for running Python scripts with inline dependencies and stats for resource monitoring.dev-mode and hot-reload for Python files without full restarts.create, cp, mv, rm, sync).list, prune (remove detached revisions), and verify (checksum checks).create, watch, enable/disable).add-item, update, list).--format json: Produces machine-readable output for automation.-q / --quiet: Limits output to IDs only.hf extensions install REPO_ID.hf skills add.