npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@tinyaxis/model-downloader

v0.1.0

Published

Resumable and integrity-verified Hugging Face model downloader with CLI and API

Downloads

135

Readme

@tinyaxis/model-downloader

Resumable, integrity-verified Hugging Face model downloader with a CLI and an API.

  • Parallel HTTP Range downloads with automatic connection count (4-16, based on CPU).
  • Cross-process file locks and cross-restart resume of completed chunks.
  • SHA-256 + size verification for LFS files, size verification for plain files.
  • Atomic install: files land at their final path only after verification.
  • Hugging Face mirrors (HF_ENDPOINT / --hub-url) and HTTP(S) proxies.

Requires Node.js >= 24.

CLI

npm install -g @tinyaxis/model-downloader

# Download a repository to ./<owner>/<name>
model-downloader Qwen/Qwen3-Talker-1.7B

# Pin a revision, filter files, and choose a destination
model-downloader Qwen/Qwen3-Talker-1.7B \
  --revision main \
  --include "*.gguf" \
  --exclude "original/*" \
  --output-dir ./models/talker

# Use a mirror endpoint and an explicit proxy
HF_ENDPOINT=https://hf-mirror.com model-downloader Qwen/Qwen3-Talker-1.7B
model-downloader Qwen/Qwen3-Talker-1.7B --proxy http://127.0.0.1:7890

On a TTY the CLI renders an aggregate progress bar with speed and ETA; without a TTY it prints one line per completed file. --quiet disables progress output. Exit codes: 0 success, 1 download or verification failure, 2 usage error, 130 interrupted (rerun the same command to resume).

API

import {
	downloadHuggingFaceFile,
	downloadManifest,
	listRepositoryFiles,
} from "@tinyaxis/model-downloader";

// Discover files from a repository (LFS files carry their SHA-256)
const files = await listRepositoryFiles("Qwen/Qwen3-Talker-1.7B", "main");

// Download one file
await downloadHuggingFaceFile(
	{ repository: "Qwen/Qwen3-Talker-1.7B", revision: "main" },
	files[0],
	{ outputDir: "./Qwen/Qwen3-Talker-1.7B", onProgress: console.log },
);

// Or download a pinned manifest with exact sizes and checksums
await downloadManifest(
	{
		repository: "Qwen/Qwen3-Talker-1.7B",
		revision: "<commit sha>",
		files: [{ name: "model.gguf", size: 1_234_567, sha256: "<64 hex chars>" }],
	},
	{ outputDir: "./models" },
);

Every DownloadResult reports how the file was verified:

  • verification: "sha256" — LFS-backed files with a known SHA-256 (weights, etc.).
  • verification: "size" — plain Git files where the Hub only exposes the size.

Both the downloader and the CLI abort cleanly on SIGINT/SIGTERM, keep completed chunks in a .download staging file, and verify before an atomic rename, so rerunning a command resumes instead of restarting.

Environment

| Variable | Effect | | ------------------------------------------ | ---------------------------------------------- | | HF_ENDPOINT | Default Hugging Face endpoint (mirror support) | | HTTP_PROXY / HTTPS_PROXY / ALL_PROXY | Default proxy | | NO_PROXY | Hosts that bypass the proxy |

--hub-url and --proxy (or the equivalent API options) override the environment for a single run.

License

Apache-2.0