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

uploadkit

v0.1.1

Published

Install UploadKit into an existing project — init, add, restore.

Readme

uploadkit

Add UploadKit to your existing app in under 60 seconds.

uploadkit is the CLI for installing UploadKit into projects you already have. Point it at a Next.js, SvelteKit, Remix (React Router 7), or Vite + React repo and it wires up everything you need — route handler, provider, env vars, and dependencies — backed by a backup-and-restore pipeline so you can roll back at any time.

Starting a brand-new project? Use create-uploadkit-app instead. This CLI is for existing codebases.

Quickstart

npx uploadkit init

That's it. Answer the prompts and you'll have:

  • @uploadkitdev/* packages installed (pinned to the latest published versions)
  • A route handler at the framework's canonical API path
  • UploadKitProvider mounted in your root layout
  • .env.local (or .env) scaffolded with the keys you need
  • Every modified file backed up to .uploadkit-backup/<timestamp>/

Run it again and it prints already configured — fully idempotent.

Per-framework behavior

| Framework | Route handler | Provider mount | |-----------|---------------|----------------| | Next.js App Router | app/api/uploadkit/[...uploadkit]/route.ts | app/layout.tsx wraps <body> children (supports both app/ and src/app/ — automatically detected) | | SvelteKit | src/routes/api/uploadkit/[...uploadkit]/+server.ts | Typed client in src/lib/uploadkit.ts (no React provider) | | Remix / React Router 7 | app/routes/api.uploadkit.$.tsx | app/root.tsx wraps children | | Vite + React | (no server) | src/main.tsx or src/App.tsx — prints a BYOS warning |

Next.js Pages Router, Vue, Nuxt, Angular, and Astro are not supported in 0.1.x — the CLI will refuse with a clear message instead of making a mess.

Adding components shadcn-style

npx uploadkit add dropzone
npx uploadkit add button
npx uploadkit add modal
npx uploadkit add gallery
npx uploadkit add queue
npx uploadkit add progress

Each component inserts into a page of your choice, bounded by // uploadkit:start / // uploadkit:end markers. Re-running add on an existing component is a no-op.

Available today (0.1.0):

| Alias | SDK component | |-------|---------------| | dropzone | UploadDropzone | | button | UploadButton | | modal | UploadModal | | gallery | UploadGalleryGrid | | queue | FileList | | progress | UploadProgressBar |

add is React-only. SvelteKit components will ship alongside SDK Svelte variants in a future release.

Rolling back

Every file the CLI touches is copied to .uploadkit-backup/<ISO-timestamp>/ with a manifest.json. To undo an init (or any add):

npx uploadkit restore

You'll be prompted to pick a backup timestamp, then the CLI replays the manifest in reverse: restores modified files, deletes files the CLI created, rewinds .env.local entries it added.

Before changing any file, restore validates the target and backup paths and reads every required modified-file backup into memory. Missing, unreadable or non-file backups abort the operation with exit code 1; no restore changes or archive move occur. Backup bytes read during preflight are used for the restore.

To restore the newest session without a picker or drift-confirmation prompts:

npx uploadkit restore --latest --yes

--latest also archives the applied session under .uploadkit-backup/.applied/<timestamp>/. Its source and destination are checked before restoring. Paths that escape the project or backup directory, including symlink escapes and dangling symlink ancestors, are rejected with exit code 1 rather than a successful restore message or a post-restore archive warning. An existing archive destination is also rejected before changes. --yes skips drift prompts, not these safety checks.

Preflight is not a filesystem transaction: later I/O failures can still leave a partial restore, and these checks do not provide atomic protection against a concurrent process swapping filesystem paths. Restore does not make a new backup of the current files, so keep your own changes in version control.

Command reference

uploadkit init [--yes] [--skip-install]
uploadkit add <component> [--target <path>] [--yes]
uploadkit restore [--timestamp <iso>] [--latest] [--yes]
uploadkit --version
uploadkit --help

| Flag | Applies to | Description | |------|-----------|-------------| | --yes / -y | init, add, restore | Accept defaults; for restore, skip drift confirmation and select the newest session when no timestamp is given. Safety preflight still runs. | | --skip-install | init | Don't run the package manager after wiring — you'll install yourself. | | --target <path> | add | Explicit page/route to insert the component into. | | --timestamp <iso> | restore | Jump straight to a specific backup (skips the picker). | | --latest | restore | Select the most recent backup without a picker and archive it after success. Add --yes to skip drift prompts. |

Requirements

  • Node.js 20+
  • A repo with package.json at the CWD (monorepo-aware installs are not supported in 0.1.x — run from the package root)

Troubleshooting

"Framework not detected" — the CLI reads package.json deps first, then framework config files. If you've customized the build (webpack, rspack, esbuild-alone), detection may bail. Open an issue with your package.json.

"Already configured" — init found uploadkit:start markers in a target file. Either you're already set up, or you previously ran init and the markers survived. Run uploadkit restore to roll back, or edit the files by hand.

Presigned uploads on Vite — Vite has no server, so uploads use BYOS + presigned URLs. The CLI warns you at init time; point UPLOADKIT_UPLOAD_URL at your own endpoint.

Links

License

MIT © Drumst0ck