🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

Huggingface Hub

by @noesis-boss

Access Hugging Face Hub models, datasets, and spaces via the huggingface_hub Python library. Use when you need to list, search, download, or upload HF assets.

πŸ’‘ Examples

# Search for text-to-image models
python3 .../hf_hub.py list-models --search "text-to-image" --limit 10

Download a model file

python3 .../hf_hub.py download-file --repo-id "stabilityai/stable-diffusion-xl-base-1.0" --filename "pytorch_model.bin"

Upload a file

python3 .../hf_hub.py upload-file --local-path ./model.pt --repo-id "your-username/my-model" --repo-type "model"

List top-rated datasets

python3 .../hf_hub.py list-datasets --sort "likes" --direction desc --limit 5

βš™οΈ Configuration

Install the library:

pip install huggingface_hub

Save your HF token to Settings > Advanced as HF_TOKEN (get one at https://huggingface.co/settings/tokens).

πŸ“‹ Tips & Best Practices

  • Downloads cache to ~/.cache/huggingface/
  • repo-type values: model, dataset, space
  • Default revision is main
  • View on ClawHub
    TERMINAL
    clawhub install hf-hub

    πŸ§ͺ Use this skill with your agent

    Most visitors already have an agent. Pick your environment, install or copy the workflow, then run the smoke-test prompt above.

    πŸ” Can't find the right skill?

    Search 60,000+ AI agent skills β€” free, no login needed.

    Search Skills β†’