Install
There is nothing to add to your project. No plugin to register, no Composer entry, no ESLint config to extend. The analysis is a single static binary: about 6 MB on disk and roughly 1 MB to download, with every language built in.
npx bonsai-lint --over 15 src/Installs nothing permanently and needs no Node runtime for the analysis itself; Node only launches the binary. This is the cheapest way to try it, and a perfectly reasonable way to run it in CI.
npm install -D bonsai-lintPins a version in the project. The package fetches the prebuilt binary for your platform on install; nothing is compiled.
brew install ryckakas/tap/bonsai-lintmacOS and Linux. It lives in a personal tap because homebrew-core does not accept prebuilt binaries.
cargo install bonsai-lintBuilds from source. Needs a Rust toolchain; everything else here does not.
curl -LsSf https://github.com/ryckakas/bonsai-lint/releases/latest/download/bonsai-lint-installer.sh | shDownloads the release binary directly. There is a PowerShell equivalent for Windows.
What you did not have to do
Section titled “What you did not have to do”Worth stating plainly, because it is the main practical difference from the alternatives:
- No language runtime. Scanning PHP needs no PHP; scanning TypeScript needs no
tscand nonode_modules. The parsers are compiled in. - No plugin versions to keep in step. It is not a PHPStan extension or an ESLint plugin, so there is no compatibility matrix between it and anything else.
- Your code is never executed. Analysis is syntax-only: no autoloader, no reflection, no module resolution. That is why it is safe to point at third-party or untrusted source.
Next: your first run.