Command reference
Commands
| Command |
Purpose |
pgcue |
Start the interactive browser. |
pgcue run <check\|investigation> |
Run a check, or every step of an investigation, without prompts. |
pgcue investigate [id] |
List investigations, or work through one step by step. |
pgcue list [--available] |
List checks, optionally marking those the connected server can run. |
pgcue find <terms...> |
Search checks, topics and investigations. |
pgcue describe <id> |
Show the documentation for a check, topic or investigation. |
pgcue topic [topic] |
List topics, or show one. |
pgcue sql <check> |
Show the SQL a check runs on each supported version. |
pgcue doctor |
Report connectivity, privileges and optional extensions. |
pgcue completion <bash\|zsh\|fish> |
Print a shell completion script. |
pgcue version |
Show the installed version. |
pgcue help |
Show usage. |
Options
Options go after the command and the check or investigation ID.
| Option |
Applies to |
Description |
--dsn <dsn> |
Commands that connect |
Connection string. Overrides the environment. |
--timeout <duration> |
Commands that connect |
Limit for each database operation. Defaults to 30s; 0 removes it. |
--output <format> |
run |
table, the default, or json. |
--watch <duration> |
run |
Rerun at this interval until interrupted. |
--count <n> |
run --watch |
Stop after this many runs. |
--available |
list |
Mark the checks the connected server can run. |
--<parameter> <value> |
run with a check |
Set a check parameter. describe lists them. |
--help, -h |
All |
Show usage. |
--version |
All |
Show the installed version. |
Durations are seconds (30), Go durations (1m30s) or PostgreSQL intervals (2 hours). The same formats apply to check parameters.
Environment variables
| Variable |
Effect |
PGCUE_TIMEOUT |
Default for --timeout. |
NO_COLOR |
Turns off coloured output. |
PGHOST, PGSERVICE and the other PostgreSQL variables |
Connection settings, as for psql. See Connecting. |
Exit status
| Status |
Meaning |
0 |
Success. |
1 |
A check or investigation step failed, or pgcue could not connect. |
2 |
Invalid command, option or argument. |
130 |
Interrupted with Ctrl+C. |
143 |
Terminated by SIGTERM. |
Command help
The output of pgcue help.
pgcue - PostgreSQL operational checks and guidance, ready to run.
Usage:
pgcue [--dsn <dsn>] [--timeout <duration>]
Start the interactive browser.
pgcue completion <bash|zsh|fish>
Generate shell completion scripts.
pgcue describe <id>
Show documentation for a check, topic, or investigation.
pgcue doctor [--dsn <dsn>] [--timeout <duration>]
Inspect PostgreSQL connectivity, permissions, and extensions.
pgcue find <terms...>
Search checks, topics, and investigations.
pgcue help
Show this help message.
pgcue investigate [id] [--dsn <dsn>] [--timeout <duration>]
List investigations or work through one step by step.
pgcue list [--available [--dsn <dsn>] [--timeout <duration>]]
List checks, optionally showing compatibility with the connected server.
pgcue run <check|investigation> [--dsn <dsn>] [--timeout <duration>] [--output <format>] [--watch <duration> [--count <n>]] [check parameters]
Run a check, or every step of an investigation, without prompts.
pgcue sql <check>
Show the SQL variants defined for a check.
pgcue topic [topic]
List topics or display information about a topic.
pgcue version
Show the installed pgcue version.
Options:
Options follow their command and check/investigation ID.
--dsn PostgreSQL connection string (otherwise pgx environment defaults).
--timeout Limit for each PostgreSQL operation (default: 30s; 0 disables).
--output table (default) or json (run only).
--watch Rerun at this interval until interrupted (run only).
--count Stop --watch after this many runs.
--available Mark the checks the connected server can run (list only).
--help, -h Show help.
--version Show version.
Durations are seconds (30), Go durations (1m30s), or intervals (2 hours).
Environment:
PGCUE_TIMEOUT Default PostgreSQL operation timeout; overridden by --timeout