README.md
April 24, 2026 ยท View on GitHub
pkg
Package your Node.js project into a single self-contained executable.
๐ Full documentation: yao-pkg.github.io/pkg
pkg takes your Node.js project and ships it as a single binary that runs on devices without Node.js installed. Cross-compile for Linux, macOS, and Windows from any host.
Install
npm install -g @yao-pkg/pkg
Quick start
pkg .
That's it. pkg reads package.json, follows the bin entry, walks your dependencies, and produces executables for Linux, macOS, and Windows.
Documentation
Everything lives on the docs site:
- Getting started โ install, CLI reference, first build
- Targets โ cross-compile for other platforms
- Configuration โ
pkgproperty inpackage.json, scripts, assets, ignore - SEA vs Standard mode โ which packaging mode to pick and why
- Snapshot filesystem โ how paths work at runtime
- Native addons, ESM support, API
- Troubleshooting
- Architecture โ traditional mode vs enhanced SEA mode
- Contributing โ release process, running tests
About this fork
This is yao-pkg/pkg โ the actively maintained fork of the archived vercel/pkg. New releases ship as @yao-pkg/pkg.
