Skip to content

feat: add 'doctor' and 'explain' commands - #2

Closed
Asimatasert wants to merge 1 commit into
masterfrom
feat/doctor-explain
Closed

feat: add 'doctor' and 'explain' commands#2
Asimatasert wants to merge 1 commit into
masterfrom
feat/doctor-explain

Conversation

@Asimatasert

Copy link
Copy Markdown
Owner

Two terminal-native features distilled from the (now-dropped) web-console idea — the parts that are genuinely useful in a CLI, with no server or added attack surface.

t-pgsql doctor

Local, read-only health checks with ✓ / ! / ✗ output; exits non-zero on any problem (nice as a cron pre-flight or CI gate):

  • required + optional toolchain (pg_dump, pv, zstd, ssh, …)
  • output directory + free disk space
  • per-database backup freshness (age of the newest dump)
  • newest-archive readability (tar/pg_restore/zstd/xz header checks)
  • jobs file (+ referenced password files exist)
  • with --from/--to: connectivity test

t-pgsql explain [topic]

Built-in, offline reference for what each command is for and when to use it, with key options and examples. Topics: dump, restore, clone, stream, upgrade, fetch, batch, bot, list/meta/clean, doctor, masking, retention.

Wiring

Dispatch, help text, README, and bash/zsh/fish completions (also adds the previously-missing bot completion). New modules src/71-explain.sh, src/73-doctor.sh; bundled t-pgsql regenerated (build --check passes).

Note: version left at 3.9.0 — a bump + release is a separate step. Translated READMEs not yet updated for these two commands.

🤖 Generated with Claude Code

Two terminal-native features distilled from the (abandoned) web-console
exploration — the genuinely useful parts, with no server/attack surface.

- 'doctor': local, read-only health checks with ✓/!/✗ output and a non-zero
  exit on problems — required/optional toolchain, output dir + free disk,
  per-database backup freshness (age of the newest dump), newest-archive
  readability, and the jobs file. With --from/--to it also tests connectivity.
  Good as a cron pre-flight or CI gate.
- 'explain [topic]': built-in, offline reference for what each command is for
  and when to use it (dump/restore/clone/stream/upgrade/fetch/batch/bot/
  list/meta/clean/doctor + masking/retention), with key options and examples.

Wired into dispatch, help, README, and bash/zsh/fish completions (also adds the
previously-missing 'bot' completion). New modules src/71-explain.sh and
src/73-doctor.sh; regenerated the bundled t-pgsql (build --check passes).
@Asimatasert

Copy link
Copy Markdown
Owner Author

Closing — moving this work local for now.

@Asimatasert Asimatasert closed this Jul 6, 2026
@Asimatasert
Asimatasert deleted the feat/doctor-explain branch July 6, 2026 13:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant