Summary
Add a one-line curl | bash installer for the pino CLI and document it in the top-level README.md. This is the v1 install path called for by SPEC-03 ("Locating & installing the pino CLI"), and unblocks the macOS control app, which needs a reliable way to install/find the pino binary.
Background / why
@pino/server is a private Node/TS package with bin: { "pino": "./dist/index.js" }. It must be built (pnpm build → dist/) before pino works.
- The macOS control app (SPEC-03) drives the CLI (
pino start|stop|restart + control socket). It searches $PATH, ~/.local/bin, /opt/homebrew/bin, /usr/local/bin, and offers a one-click "Install CLI" affordance that should run this same script.
- Today
README.md documents cd server && npm install, which is wrong: server/ is pnpm-only (there is a preinstall guard that rejects npm). The installer and docs must use pnpm.
Scope
Installer script (install.sh, served via raw GitHub URL)
Target UX:
curl -fsSL https://raw.githubusercontent.com/leduckhc/pino/main/install.sh | bash
The script should:
- Preflight checks
- Verify
git is present.
- Verify Node
>= 22.13.0 (per server/package.json engines); if missing/too old, print a clear message with a link (do not silently install Node in v1).
- Ensure
pnpm is available — prefer corepack enable (bundled with Node) over a global install.
- Fetch source
- Clone (or update) the repo into a stable location, e.g.
~/.pino/src (or download a release tarball once releases exist). Keep it re-runnable/idempotent.
- Build
cd server && pnpm install --frozen-lockfile && pnpm build.
- Install the binary on PATH
- Symlink
server/dist/index.js (the pino bin) into ~/.local/bin/pino by default; fall back to /usr/local/bin if writable/preferred.
chmod +x; make sure the shebang works (node).
- If
~/.local/bin is not on PATH, print an actionable note (which shell rc line to add).
- Verify
- Run
pino --version (or pino status) and print success + the install location.
- Ergonomics
set -euo pipefail; clear error messages; safe to re-run (upgrade path); support an env override for install dir (e.g. PINO_INSTALL_DIR).
README section
- Replace the current
cd server && npm install quick-start with:
- A "Install the pino CLI" section featuring the
curl | bash one-liner.
- Keep a "From source (contributors)" subsection using pnpm (
corepack enable && pnpm install && pnpm build), not npm.
- Note that
server/ is pnpm-only (npm is blocked by a preinstall guard).
Acceptance criteria
Out of scope
- Bundling the CLI/Node inside the macOS
.app (the preferred zero-install end state) — tracked separately under SPEC-03.
- A Homebrew tap — possible later install channel, not required here.
Pointers
- Spec:
docs/specs/SPEC-03-desktop-control-app.md → "Locating & installing the pino CLI".
- CLI bin + build:
server/package.json (bin, scripts.build, engines, preinstall npm guard).
- Daemon lifecycle the CLI exposes:
docs/specs/SPEC-01-daemon-control-plane.md (pino start|stop|restart|status).
Summary
Add a one-line
curl | bashinstaller for the pino CLI and document it in the top-levelREADME.md. This is the v1 install path called for by SPEC-03 ("Locating & installing the pino CLI"), and unblocks the macOS control app, which needs a reliable way to install/find thepinobinary.Background / why
@pino/serveris a private Node/TS package withbin: { "pino": "./dist/index.js" }. It must be built (pnpm build→dist/) beforepinoworks.pino start|stop|restart+ control socket). It searches$PATH,~/.local/bin,/opt/homebrew/bin,/usr/local/bin, and offers a one-click "Install CLI" affordance that should run this same script.README.mddocumentscd server && npm install, which is wrong:server/is pnpm-only (there is apreinstallguard that rejects npm). The installer and docs must use pnpm.Scope
Installer script (
install.sh, served via raw GitHub URL)Target UX:
curl -fsSL https://raw.githubusercontent.com/leduckhc/pino/main/install.sh | bashThe script should:
gitis present.>= 22.13.0(perserver/package.jsonengines); if missing/too old, print a clear message with a link (do not silently install Node in v1).pnpmis available — prefercorepack enable(bundled with Node) over a global install.~/.pino/src(or download a release tarball once releases exist). Keep it re-runnable/idempotent.cd server && pnpm install --frozen-lockfile && pnpm build.server/dist/index.js(thepinobin) into~/.local/bin/pinoby default; fall back to/usr/local/binif writable/preferred.chmod +x; make sure the shebang works (node).~/.local/binis not on PATH, print an actionable note (which shell rc line to add).pino --version(orpino status) and print success + the install location.set -euo pipefail; clear error messages; safe to re-run (upgrade path); support an env override for install dir (e.g.PINO_INSTALL_DIR).README section
cd server && npm installquick-start with:curl | bashone-liner.corepack enable && pnpm install && pnpm build), not npm.server/is pnpm-only (npm is blocked by apreinstallguard).Acceptance criteria
install.shexists at repo root and is idempotent/re-runnable.curl | bashone-liner on a clean macOS machine (with Node ≥22.13) yields a workingpinoon PATH;pino statusruns.README.mddocuments the one-liner and a pnpm-based from-source path; the stalenpm installinstruction is removed.PINO_INSTALL_DIR) and defaults to~/.local/bin.Out of scope
.app(the preferred zero-install end state) — tracked separately under SPEC-03.Pointers
docs/specs/SPEC-03-desktop-control-app.md→ "Locating & installing the pino CLI".server/package.json(bin,scripts.build,engines,preinstallnpm guard).docs/specs/SPEC-01-daemon-control-plane.md(pino start|stop|restart|status).