pkg-bin-doctor
v0.1.3
Published
Check package.json bin entries before publishing a Node CLI package.
Maintainers
Readme
pkg-bin-doctor
Check package.json bin entries before publishing a Node CLI package.
It catches the boring mistakes that make installed CLIs fail:
- missing
binfield binpath points to a missing file- bin file has no shebang (
#!/usr/bin/env node) - bin file is not executable on Unix-like systems
No dependencies.
Usage
npx pkg-bin-doctorCheck another package directory:
npx pkg-bin-doctor ./path/to/packageLocal install
npm install --save-dev pkg-bin-doctor
npx pkg-bin-doctorWhy
Small CLI packages often publish successfully but fail after install because the bin target is wrong or lacks a shebang. pkg-bin-doctor is a tiny pre-publish check for that exact problem.
License
MIT
API
The pkg-bin-doctor CLI checks that package bin entries point to executable files with valid shebangs.
npx pkg-bin-doctor .