Repository navigation
v0.2.0
pgrun v0.2.0 — connect your production database from the terminal
New pgrun source command family, the first complete CLI path for
Connect Postgres → Protect Data → Create Safe Copy → Create Branch:
pgrun auth login
pgrun project use production
pgrun source add --name production --url "$DATABASE_URL" # or omit --url for a hidden prompt
pgrun source status production
pgrun source protect production # review table; --set / --acknowledge; --approve to activate
pgrun source copy production --wait
pgrun branch create production --name dev --waitsource list/get/status— Production Database table, one-line view, and a
four-step checklist with the next command;statusexits 1 when action is needed.source add/update— the connection URL travels only in the request body,
is read hidden when omitted, and every byte these commands print is scrubbed of the
URL and its password (even if a server echoes it back).source protect— reviews never activate; only--approvemints a policy version,
and the server refuses it while any column is unresolved. Copying a sensitive column
unmasked needs--acknowledge.--reviewasks pgrun to look at what is left.source copy [--wait]— refuses schema drift, existing or failed copies, and
unprotected sources; the server stays authoritative.- On
sourcecommands the API base override is--api-url(--urlis the connection
URL onadd/update); every other command keeps--url. - A Safe Copy is a one-time copy in this release — refresh/continuous sync is not part of
v0.2.0. No new MCP tools;branch,project,auth,skill,mcpare unchanged.
Requires the PGRun API at or after 2026-09-06 (/api/v1/sources with explicit approve).
Changelog
- d8690e4 chore(api): keep sources.go's file comment out of the package doc
- 3f80228 chore(cli): usage lists the remove alias for --set
- 94a51c2 docs(cli): clarify non-fallthrough comment in source copy
- a1c42b4 docs(plan): pgrun source CLI slice — 6 tasks over /api/v1/sources, structural URL redaction, explicit --approve, execution rulings
- c657fc0 docs(plan): ruling 8 — --url is the connection URL on add/update, --api-url overrides the API base there
- bb09ce4 docs(plan): ruling 9 — --api-url on every source subcommand; --url only on add/update
- 73963d2 docs(spec): pgrun source CLI slice brief, verbatim from the operator (garbles listed in the header); ignore harness worktrees
- b2605ee feat(api): sources client — list/get/create/update/protect/review/copy + WaitForSource
- 9851068 feat(cli): pgrun source add/update — hidden URL prompt, structural redaction, --wait on the connection check
- 8b3fa31 feat(cli): pgrun source copy — server-enforced preconditions surfaced, --wait to Safe Copy ready
- cfe2df0 feat(cli): pgrun source list/get/status — Production Database table, checklist view, next step
- c0179b6 feat(cli): pgrun source protect — review table, --set/--acknowledge decisions, explicit --approve, --review
- 3183c88 fix(cli): final-review fixes — no usage error echoes a URL-shaped argument, redaction tests that bite, schema-unchanged gate, approve-not-activated exit, JSON-token-safe redactor; docs carve-outs
- 5c79a2d fix(cli): redact the duplicate --set key and the top-level unknown-command echo; scope the redactor comment; long numeric passwords stay scrubbed; doc wording for protect/copy pre-flight reads
- 72fd028 fix(cli): source add/update — case-insensitive URL refusal guard, fenced flag output, redactor password floor, --api-url and guard tests
- 4e67e26 fix(cli): source protect — approve never sent without --approve (asserted), exit code cannot contradict the table; --api-url on every source command
- 972a042 refactor(cli): drop redundant "remove" case from dispositionLabel
- ee61ce1 test(cli): pin every protection rendering string; per-command usage text in sourceNameArgs