From 0abef2d38e5f76c6e780a8fd64f9be53f9cc2db2 Mon Sep 17 00:00:00 2001
From: Alex Shapalov
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_