# `mix hf.download`
[🔗](https://github.com/huggingface/huggingface_client/blob/v0.1.0/lib/mix/tasks/hf.download.ex#L1)

Downloads a file or an entire repository snapshot from the HuggingFace Hub.

    $ mix hf.download gpt2
    $ mix hf.download gpt2 config.json
    $ mix hf.download gpt2 config.json --revision main --local-dir ./my-model
    $ mix hf.download --type dataset rajpurkar/squad

## Options

  * `--type` / `-t` — repo type: `model`, `dataset`, `space` (default: `model`)
  * `--revision` / `-r` — branch or commit (default: `main`)
  * `--local-dir` — save to this local directory instead of cache
  * `--token` — HF API token (uses saved token if omitted)
  * `--quiet` — suppress progress output

---

*Consult [api-reference.md](api-reference.md) for complete listing*
