From 0abef2d38e5f76c6e780a8fd64f9be53f9cc2db2 Mon Sep 17 00:00:00 2001 From: Alex Shapalov Date: Mon, 23 Nov 2026 11:09:33 -0800 Subject: [PATCH] transition: tell PGX users that PGX is now PGBoxDB and how to switch - pgx.dev/install prints a notice on stderr before it installs PGX 0.1.3: PGX is now PGBoxDB, switch with pgboxdb.com/install, then pgboxdb migrate. stdout and the rest of the tagged script are unchanged (tested by running the served script). Deployed as pgx-install d3e22ce3. - README and the plugin README open with a short Coming from PGX? note; the plugin one gives the exact reinstall commands, since the old marketplace now serves the pgboxdb plugin. - upgrading.md: the old installer URL, the deprecated npm package, the plugin and the Agent Skill, each with its replacement. Co-Authored-By: Claude Opus 5.5 --- README.md | 6 ++++++ dist/legacy-domain-redirect/README.md | 1 + .../install/legacy-install-worker.js | 12 +++++++++-- .../install/legacy-install-worker.test.js | 20 +++++++++++++++++-- docs/pgboxdb/local-dev/upgrading.md | 6 ++++-- plugins/pgboxdb/README.md | 14 +++++++++++++ 6 files changed, 53 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index fd91971470..7a888232e2 100644 --- a/README.md +++ b/README.md @@ -27,6 +27,12 @@ Docs

+> **Coming from PGX?** PGX is now PGBoxDB: same runtime, new name. Install +> PGBoxDB (`curl -fsSL https://pgboxdb.com/install | sh` or `npx pgboxdb@latest`), +> then run `pgboxdb migrate` to keep your databases. The `pgx` command, the +> `pgxdb` npm package and the `pgx` plugin get no more updates. +> [Upgrade guide](docs/pgboxdb/local-dev/upgrading.md). +

Install one Skill. Your coding agent handles the database.
No Docker required · Native Mac & Linux · Automatic cleanup diff --git a/dist/legacy-domain-redirect/README.md b/dist/legacy-domain-redirect/README.md index bcb74554ad..46d7e18453 100644 --- a/dist/legacy-domain-redirect/README.md +++ b/dist/legacy-domain-redirect/README.md @@ -71,6 +71,7 @@ approval. That is not a domain transfer or deletion. | `pgx-install` | `d1cc0c44-9283-4fd3-9fce-07c9ef118396` | 2026-11-19 20:04:41 | v0.1.3 script, version pinned | | `pgx-install` | `f7c5157b-6261-4250-9501-a59715f43c0e` | 2026-11-19 20:23 | + 410 after the deadline | | `pgx-dev-redirect` | `5d1fab37-4514-412c-98e7-0daa5c826709` | 2026-11-19 20:23:25 | + 410 after the deadline, `INSTALLER` binding | +| `pgx-install` | `d3e22ce3-cc1e-4655-b3e2-f4933cbcf489` | 2026-11-23 | + notice on stderr: PGX is now PGBoxDB, how to switch | Before the transition, `pgx-install` was `44d28964-e04c-4899-927a-105f9e6202ed` (tag v0.1.0's script, unpinned). diff --git a/dist/legacy-domain-redirect/install/legacy-install-worker.js b/dist/legacy-domain-redirect/install/legacy-install-worker.js index 0eb3643ee1..65a3e14b2b 100644 --- a/dist/legacy-domain-redirect/install/legacy-install-worker.js +++ b/dist/legacy-domain-redirect/install/legacy-install-worker.js @@ -6,7 +6,9 @@ // version variable (LEGACY_VERSION). Without it the script would install "the // newest release", which is a PGBoxDB release from v0.2.0 on, whose assets have // different names, so `curl … | sh` would fail. An explicit version set by the -// user still wins. The installer itself is not changed in any other way. +// user still wins. A second added line prints a notice (to stderr, so it never +// mixes with output a caller parses) that PGX is now PGBoxDB and how to switch. +// The installer itself is not changed in any other way. // // It serves only during the authorised transition: from REDIRECT_UNTIL on (or // if that is missing or invalid) every request gets 410 Gone, so the previous @@ -15,12 +17,18 @@ const REPO = "pgrundev/pgboxdb"; const REF_RE = /^v\d+\.\d+\.\d+[0-9A-Za-z.-]*$/; const VERSION_RE = /^\d+\.\d+\.\d+[0-9A-Za-z.-]*$/; const VERSION_VAR = "PGX_VERSION"; // the variable the tagged installer reads +export const notice = (version) => + `PGX is now PGBoxDB. This installs the last PGX release (${version}), which gets no updates.\n` + + "Switch: curl -fsSL https://pgboxdb.com/install | sh then: pgboxdb migrate (https://pgboxdb.com)"; export function pin(script, version) { const nl = script.indexOf("\n"); if (!script.startsWith("#!") || nl < 0) return null; const line = `${VERSION_VAR}="\${${VERSION_VAR}:-${version}}" # pinned by the pgx.dev /install Worker\n`; - return script.slice(0, nl + 1) + line + script.slice(nl + 1); + // Single-quoted for the shell. The text has no single quote (the version is + // checked against VERSION_RE first), so nothing in it expands. + const say = `printf '%s\\n' '${notice(version).replace(/\n/g, "' '")}' >&2 # added by the pgx.dev /install Worker\n`; + return script.slice(0, nl + 1) + line + say + script.slice(nl + 1); } const text = (status, msg) => diff --git a/dist/legacy-domain-redirect/install/legacy-install-worker.test.js b/dist/legacy-domain-redirect/install/legacy-install-worker.test.js index db4a397daf..b5d8f0bebd 100644 --- a/dist/legacy-domain-redirect/install/legacy-install-worker.test.js +++ b/dist/legacy-domain-redirect/install/legacy-install-worker.test.js @@ -1,7 +1,7 @@ // node --test dist/legacy-domain-redirect/install/legacy-install-worker.test.js import { test } from "node:test"; import assert from "node:assert/strict"; -import worker, { pin } from "./legacy-install-worker.js"; +import worker, { pin, notice } from "./legacy-install-worker.js"; const SCRIPT = '#!/bin/sh\nset -eu\nversion="${PGX_VERSION:-}"\n'; const END = "2027-02-17T19:58:29Z"; @@ -21,7 +21,8 @@ test("serves the tagged script with the version default after the shebang", asyn const lines = (await r.text()).split("\n"); assert.equal(lines[0], "#!/bin/sh"); assert.match(lines[1], /^PGX_VERSION="\$\{PGX_VERSION:-0\.1\.3\}"/); - assert.equal(lines[2], "set -eu"); + assert.match(lines[2], /^printf .*PGX is now PGBoxDB.* >&2 /); + assert.equal(lines[3], "set -eu", "the rest of the tagged script is unchanged"); assert.deepEqual(calls, ["https://raw.githubusercontent.com/pgrundev/pgboxdb/v0.1.3/dist/install.sh"]); }); @@ -63,3 +64,18 @@ test("from the deadline on, or without one: 410 Gone, upstream never fetched", a } assert.equal(calls.length, 0); }); + +test("the served script tells the user PGX is now PGBoxDB, on stderr, before installing", async () => { + const { spawnSync } = await import("node:child_process"); + const body = pin('#!/bin/sh\necho "installing ${PGX_VERSION}"\n', "0.1.3"); + const lines = body.split("\n"); + assert.match(lines[1], /^PGX_VERSION=/, "the version default stays on line 2"); + assert.match(lines[2], /^printf .* >&2 /, "the notice goes to stderr"); + // Run it: stdout is only the installer's own output; stderr has the notice. + const s = spawnSync("sh", ["-c", body], { encoding: "utf8" }); + assert.equal(s.stdout, "installing 0.1.3\n"); + assert.equal(s.stderr, notice("0.1.3") + "\n"); + assert.match(s.stderr, /PGX is now PGBoxDB/); + assert.match(s.stderr, /curl -fsSL https:\/\/pgboxdb\.com\/install \| sh/); + assert.match(s.stderr, /pgboxdb migrate/); +}); diff --git a/docs/pgboxdb/local-dev/upgrading.md b/docs/pgboxdb/local-dev/upgrading.md index 579ab5cd82..136019ed16 100644 --- a/docs/pgboxdb/local-dev/upgrading.md +++ b/docs/pgboxdb/local-dev/upgrading.md @@ -90,10 +90,12 @@ there. | Before | Now | Note | |---|---|---| | `pgx …` | `pgboxdb …` | same subcommands, flags, output and exit codes | -| `npx pgxdb@latest` | `npx pgboxdb@latest` | new package; the old one is not changed by this release | +| `npx pgxdb@latest` | `npx pgboxdb@latest` | new package; `pgxdb` is deprecated and gets no new versions | +| `curl -fsSL https://pgx.dev/install \| sh` | `curl -fsSL https://pgboxdb.com/install \| sh` | the old URL installs the last previous release (0.1.3) with a notice, and stops working on 2027-02-17 | | `PGX_HOME`, `PGX_PORT`, `PGX_RUN_DIR`, `PGX_DURABILITY`, `PGX_LISTEN`, `PGX_PASSWORD`, `PGX_PG_BINDIR`, `PGX_SOURCE`, `PGX_TTL_INTERVAL`, `PGX_GIT`, `PGX_GIT_SKIP` | `PGBOXDB_…` | the old names are not read; `init`, `run`, `start`, `status`, `doctor` and `migrate` print a note when one is set | | variables exported into agent sessions and `git exec` (`PGX_AGENT_ID`, `PGX_BRANCH`, `PGX_GIT_BRANCH`, `PGX_ISOLATION`, …) | `PGBOXDB_…` | scripts that read them must be updated | | `pgx --json version` key `pgx_version`, `share/pgx/dist.json` | `pgboxdb_version`, `share/pgboxdb/dist.json` | | | new Git databases `pgx__…` | `pgboxdb__…` | existing databases keep their names and mappings | | Docker volume `/var/lib/pgx`, image user `pgx` | `/var/lib/pgboxdb`, user `pgboxdb` (same uid 10001) | mount an existing volume at `/var/lib/pgboxdb`; the data inside works unchanged | -| Claude Code plugin `pgx` | plugin `pgboxdb` | install the new plugin; uninstall the old one | +| Claude Code plugin `pgx@pgx-plugin` | `pgboxdb@pgboxdb-plugin` | the old marketplace now serves the new plugin; reinstall: `/plugin uninstall pgx@pgx-plugin`, `/plugin marketplace remove pgx-plugin`, `/plugin marketplace add pgrundev/pgboxdb-plugin`, `/plugin install pgboxdb@pgboxdb-plugin` | +| Agent Skill `--skill pgx` | `npx skills add pgrundev/pgboxdb --skill pgboxdb` | remove the old skill directory (`.claude/skills/pgx`, `.agents/skills/pgx`) after installing the new one | diff --git a/plugins/pgboxdb/README.md b/plugins/pgboxdb/README.md index d0dc36c41a..c684fe5704 100644 --- a/plugins/pgboxdb/README.md +++ b/plugins/pgboxdb/README.md @@ -2,6 +2,20 @@ One plugin. Every Claude Code agent gets its own Postgres. +> **Coming from PGX?** PGX is now PGBoxDB. The plugin `pgx@pgx-plugin` is +> replaced by this one; reinstall it: +> +> ```text +> /plugin uninstall pgx@pgx-plugin +> /plugin marketplace remove pgx-plugin +> /plugin marketplace add pgrundev/pgboxdb-plugin +> /plugin install pgboxdb@pgboxdb-plugin +> ``` +> +> Then install the runtime (`curl -fsSL https://pgboxdb.com/install | sh`) and +> run `pgboxdb migrate` to keep your existing databases. Guide: +> [upgrading](https://github.com/pgrundev/pgboxdb/blob/main/docs/pgboxdb/local-dev/upgrading.md). + PGBoxDB is a local, PostgreSQL-compatible runtime built for disposable databases: copy-on-write branches created in milliseconds and removed automatically when their time-to-live runs out. This plugin ships the `pgboxdb` Agent Skill, which