busybox-static
v1.35.0
Published
Statically-linked busybox (x86_64, musl) packed as a static file, with a tiny path/bytes API.
Readme
busybox-static
A statically-linked busybox (x86_64, musl) packed as a static file inside the package, with a tiny API to get its path or bytes.
- Binary:
1.35.0-x86_64-linux-musl(upstream busybox.net build) - Size: ~1.1 MB, ELF 64-bit, statically linked, stripped
- sha256:
6e123e7f3202a8c1e9b1f94d8941580a25135382b99e8d3e34fb858bba311348 - Platform:
os: linux,cpu: x64
Install
npm install busybox-staticThe binary ships packed at bin/busybox. If it is missing (e.g. a shallow
checkout), re-vendor it:
npm run fetchUsage
const busybox = require('busybox-static');
busybox.binaryPath; // absolute path to the packed bin/busybox
busybox.exists(); // true if the packed binary is present
busybox.readBytes(); // Buffer of the binaryRun it directly via the package bin:
npx busybox echo hello
npx busybox ls -la /Or from Node:
const { execFileSync } = require('child_process');
const busybox = require('busybox-static');
console.log(execFileSync(busybox.binaryPath, ['id']).toString());Notes
- The packed binary is a Linux/x86_64 static build;
os/cpufields keep it from installing on incompatible platforms. - busybox is licensed GPL-2.0; this package redistributes the upstream binary under that license.
