Pick up where you left off
Resume interrupted downloads with HTTP range requests. Atomic writes are enabled by default to keep incomplete files out of the final destination.
Bring the files your app needs from the Hub to your machine. A model-agnostic library and CLI for reliable downloads, local caching, and verified bundles.
> hfdownload download sentence-transformers/all-MiniLM-L6-v2 onnx/model.onnx tokenizer.json
Checking Required files
Downloading Files from the Hub
Validating Downloaded files
Complete Ready for your app
ONNX models, tokenizers, voice presets, datasets, or any other repository file. You choose what to download and where it belongs.
Resume interrupted downloads with HTTP range requests. Atomic writes are enabled by default to keep incomplete files out of the final destination.
Skip existing files, check what is available, and inspect or manage your cache from code or the command line.
Pin revisions, inspect resolved commits, and validate manifest-based bundles against expected SHA-256 hashes and file sizes.
List remote files in model, dataset, and Space repositories. Choose required and optional files for your application.
Track checking, downloading, validating, and completion stages. Integrate structured logging and dependency injection in your .NET app.
Use public repositories, authenticate for gated or private files, or configure a custom Hub endpoint. Bring your own HttpClient when you need it.
Add the library to your application or install the standalone .NET tool. Both are available on NuGet.
A reusable .NET library for download requests, progress reporting, cache management, and manifest-based bundles.
dotnet add package ElBruno.HuggingFace.Downloader
Get the library on NuGet →
The hfdownload command for downloading files, discovering repository contents, and managing your local cache.
dotnet tool install -g ElBruno.HuggingFace.Downloader.Cli
Get the CLI on NuGet →
Current projects target .NET 8 and .NET 10. CLI cache helpers support Windows, Linux, and macOS.
Choose your repository, file list, and local directory. The downloader handles the rest.
using ElBruno.HuggingFace;
using var downloader = new HuggingFaceDownloader();
await downloader.DownloadFilesAsync(new DownloadRequest
{
RepoId = "sentence-transformers/all-MiniLM-L6-v2",
LocalDirectory = "./models/miniLM",
RequiredFiles = ["onnx/model.onnx", "tokenizer.json"]
});
The model above is just an example. The library is not tied to any model or inference framework.
Use the library and CLI for free under the MIT license. There are no in-app purchases or downloader service accounts. Files are saved to a directory you control. Downloads contact Hugging Face or your configured Hub endpoint; gated and private repositories may require a Hugging Face account, access approval, and token. This website has no analytics, cookies, external fonts, or third-party scripts. GitHub Pages and Hub providers may process request metadata under their own policies.
Examples, commands, and API details live alongside the source so you can explore how it all works.
Get the .NET library or CLI. Read the source. Make it yours.