lnpkg is a tiny linux utility that packages a Node.js application into a linux executable.
- Automatically wraps your Node.js script into a standalone executable
- Includes the Node.js runtime
node - Generates a clean build structure in
lnpkg-build/ - Super lightweight — written in pure C using
gcc
lnpkg <project-folder>
This command will:
- Copy
nodeand yourindex.jsinto a build folder. - Compile a small C launcher using
gcc. - Output a single executable:
- On Linux:
my-app(ELF binary without file extension)
- On Linux:
lnpkg my-app
This will create the following structure:
lnpkg-build/
├── source/
│ ├── index.js <-- Your Node.js app
│ └── node <-- Node.js runtime
├── my-app <-- Final executable
- On Linux, run it with:
./my-app
app-name;
- Replace
app-namewith the desired output name.
This project was built for fun and utility — feel free to hack it, improve it or fork it.