Migrating Off Archived vercel/pkg: Honest Comparison
With vercel/pkg archived, packaging a Node.js CLI into a standalone executable leaves four practical paths. Which one fits depends on whether your bottleneck is native addons, official Node parity, or shipping 100+ MiB binaries.
| Option | Typical CLI Size | ESM & import.meta |
Native .node Addons |
Best Fit |
|---|---|---|---|---|
| Thinpack.js | 4.0–12.5 MiB (QuickJS) 46–55 MiB (V8) |
Supported (+ strip-only .ts) |
No (use node:ffi) |
Small CLI tools, portable dev utilities, fast GitHub Release downloads |
| @yao-pkg/pkg | ~90–140 MiB | Partial / CJS-first | Yes (patched Node) | Zero-effort drop-in migration from legacy pkg configs |
| Node.js SEA | 143–158 MiB | CJS blob workflow; breaks tsc/prettier/js-yaml in benchmarks |
External/manual handling | Apps requiring 100% stock V8 Node internals |
| Bun --compile | 104–115 MiB | Supported | N-API partial | Fast cold startup when 105+ MiB binary size is acceptable |
3-Step Migration from pkg to Thinpack.js
- Verify no native
.nodeaddons: Runthinpack pack src/cli.js -o my-cli --list-capabilitiesto inspect the capability closure and detect unresolved dynamic imports. - Include runtime-scanned folders explicitly: Any template/plugin directory loaded dynamically at runtime should be passed via
--include path/to/dir(similar topkg.assets). - Automate matrix builds with GitHub Actions: Use
thinpack-js/thinpack.js@main(action-v1.0.0) acrossubuntu-24.04,macos-latest, andwindows-latestto publishSHA256SUMSand 4–12 MiB tarballs.
Shipping smaller Node.js CLIs? Star thinpack.js on GitHub
thinpack.js is 100% MIT-licensed and actively developed in Rust + JavaScript. If you ship Node.js CLIs and want 4–12 MiB binaries instead of 104–158 MiB runtimes, starring the repository helps other developers discover it and prioritizes new Node compatibility fixtures.