hugging-face-cli

Manage Hugging Face Hub resources via the hf command-line interface.

36.9k|6.1k|Updated Oct 21, 2024
One-click install
npx skills add https://github.com/patchy631/ai-engineering-hub --skill hugging-face-cli-patchy631
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: hugging-face-cli
Source: https://github.com/patchy631/ai-engineering-hub/tree/main/hugging-face-skills/skills/hugging-face-cli
Command: npx skills add https://github.com/patchy631/ai-engineering-hub --skill hugging-face-cli-patchy631

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

The Hugging Face CLI skill enables you to manage Hugging Face Hub resources from the command line.

Core Features & Use Cases

  • Download & manage models, datasets, and spaces: quickly fetch artifacts or push updates to the Hub.
  • Upload and publish artifacts: push local model files or datasets to your Hub repositories with versioning and collaboration workflows.
  • Repository and compute workflows: create repos, manage tags, and run compute jobs on HF infrastructure from scripts or manual commands.

Quick Start

Install the hf CLI and log in, then try basic commands like hf download <repo>, hf upload <repo> ./local-path, and hf repo create <name>.

Frequently Asked Questions about hugging-face-cli

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I download models and datasets from the Hugging Face Hub using the command line?

To download Hugging Face models and datasets from the command line, use the 'hf download <repo>' command after installing the huggingface_hub Python package. This fetches artifacts directly to your local environment.

Can I upload local model files to Hugging Face repositories via the CLI?

Yes, you can upload local model files to Hugging Face repositories using the 'hf upload <repo> ./local-path' command. This pushes your artifacts with versioning and collaboration workflows enabled.

What do I need to install to manage Hugging Face Spaces and compute jobs from the command line?

To manage Hugging Face Spaces and compute jobs, you need a Python environment with the hf CLI installed via 'pip install huggingface_hub'. This provides the required commands for repository management.

How does authentication work for Hugging Face Hub access in terminal scripts?

Hugging Face Hub authentication in terminal scripts works by running the 'hf auth login' command. This securely configures your credentials for subsequent file transfers and repository management operations.

What is the best way to create and configure a new Hugging Face repository from the CLI?

The best way to create and configure a new Hugging Face repository from the CLI is the 'hf repo create <name>' command. It initializes repos and manages tags for your Hub resources.