Node.js versions
Most PHP projects also need a JavaScript toolchain — for Vite, asset builds, or a
front-end dev server. Butler manages Node.js versions for you through
fnm, so you don’t need a separate Node manager.
Install Node
Section titled “Install Node”Node support comes from the fnm component. Install it once, then install the
Node versions you want:
butler install fnmbutler fnm install 22 # install the latest Node 22.xbutler fnm install 20Set a default version:
butler fnm default 22The Node section of the menu bar app shows your installed versions with a picker to install more or change the default — the same actions without the terminal.
Run node, npm and npx
Section titled “Run node, npm and npx”Butler exposes the active Node toolchain through its own subcommands, so they use
the version Butler manages regardless of what’s otherwise on your PATH:
butler node -vbutler npm installbutler npx vite buildpnpm, once for every Node version
Section titled “pnpm, once for every Node version”Installing pnpm through npm ties it to one Node version, so every new Node you install starts without it. Butler ships pnpm as its own component instead:
butler install pnpmpnpm installOne pnpm, on your PATH, independent of which Node is active — switching Node
versions doesn’t take it away, and it updates itself (pnpm self-update) rather
than waiting on Butler to publish a new build.
Put Butler’s toolchain on your PATH
Section titled “Put Butler’s toolchain on your PATH”If you’d rather call node, npm, php and composer directly (without the
butler prefix), install Butler’s shell integration:
butler shell installThis puts Butler’s php, Node, Composer and pnpm on your PATH, with
per-directory version switching — along with Python and
Ruby if you’ve installed those. Check what’s resolving
with:
butler doctor # every shim, what it resolves to, and anything shadowing itThese are real files on PATH, not shell functions, so an editor, a build
script or a git hook resolves the same versions your terminal does — none of
them source your shell profile.