diff --git a/README.md b/README.md index 0ac3644..81f9de0 100644 --- a/README.md +++ b/README.md @@ -266,7 +266,7 @@ findings never move them. | Method | Command | |---|---| -| npx (no install) | `npx @pgbot/cli inspect "$DATABASE_URL"` | +| npx / bunx / pnpm dlx (no install) | `npx @pgbot/cli inspect "$DATABASE_URL"` | | Script (cosign signature + checksum) | `curl -fsSL https://pgbot.dev/install \| sh` | | Homebrew | `brew install pgrundev/tap/pgbot` | | Arch User Repository | `yay -S pgbot-bin` | @@ -281,6 +281,23 @@ install, works with `npm ci --ignore-scripts`. It installs the `pgbot` command blocked by npm's package-name-similarity rule (too close to `got`), so `npx pgbot` returns `E404` — use `npx @pgbot/cli`. +**Any Node package manager works.** npm, pnpm, Yarn (Classic and Berry) and bun +all install it, and each downloads only your platform's binary — the other five +are skipped by the packages' `os`/`cpu` fields: + +| | no install | project | global | +|---|---|---|---| +| npm | `npx @pgbot/cli` | `npm i @pgbot/cli` | `npm i -g @pgbot/cli` | +| pnpm | `pnpm dlx @pgbot/cli` | `pnpm add @pgbot/cli` | `pnpm add -g @pgbot/cli` | +| Yarn | `yarn dlx @pgbot/cli` | `yarn add @pgbot/cli` | `yarn global add @pgbot/cli` | +| bun | `bunx @pgbot/cli` | `bun add @pgbot/cli` | `bun add -g @pgbot/cli` | + +The wrapper locates the binary at run time and pgbot ships **no install scripts**, +so it works wherever lifecycle scripts are disabled — `npm ci --ignore-scripts`, +pnpm's blocked-by-default builds, bun. Two Yarn notes: `yarn dlx` is Berry-only +(Classic uses `yarn global add`), and under Berry's default Plug'n'Play linker +there is no `node_modules/.bin`, so invoke it as `yarn pgbot`. + Homebrew installs from the [`pgrundev/homebrew-tap`](https://github.com/pgrundev/homebrew-tap) tap; the formula is regenerated by every release and pins the SHA-256 of each platform's release archive. macOS (Intel/Apple Silicon) and Linux (x86_64/arm64). diff --git a/npm/pgbot/README.md b/npm/pgbot/README.md index bbfb551..be2d352 100644 --- a/npm/pgbot/README.md +++ b/npm/pgbot/README.md @@ -13,6 +13,27 @@ platform (shipped as an `optionalDependency`, so npm installs only the one that matches your OS/CPU) and runs it. Point it at your database with an argument or `$DATABASE_URL`; use a role holding `pg_monitor` with no write grants. +## npm, pnpm, Yarn, bun + +All four work, and each downloads only your platform's binary: + +| | no install | project | global | +|---|---|---|---| +| npm | `npx @pgbot/cli` | `npm i @pgbot/cli` | `npm i -g @pgbot/cli` | +| pnpm | `pnpm dlx @pgbot/cli` | `pnpm add @pgbot/cli` | `pnpm add -g @pgbot/cli` | +| Yarn | `yarn dlx @pgbot/cli` | `yarn add @pgbot/cli` | `yarn global add @pgbot/cli` | +| bun | `bunx @pgbot/cli` | `bun add @pgbot/cli` | `bun add -g @pgbot/cli` | + +The wrapper locates the binary at run time and this package ships **no install +scripts**, so it works wherever lifecycle scripts are disabled — `npm ci +--ignore-scripts`, pnpm's blocked-by-default builds, bun. Two Yarn notes: +`yarn dlx` is Berry-only (Classic uses `yarn global add`), and under Berry's +default Plug'n'Play linker there is no `node_modules/.bin`, so invoke it as +`yarn pgbot`. + +The package is **scoped** — the bare name `pgbot` is blocked by npm's +package-name-similarity rule, so `npx pgbot` returns `E404`. Use `@pgbot/cli`. + ## What npm verifies (and what it doesn't) The npm packages carry registry integrity hashes and npm **provenance** — a