CLI Finder / tools / psql

psql for PostgreSQL inspection and query workflows

Query PostgreSQL databases and inspect schemas from terminal and agent workflows.

Agent Readiness: 75/100 Actively maintained
75 /100

psql is useful for agents when usage is constrained to predictable commands and documented output.

Installability 79/100

Availability through common package managers and simple install commands.

Structured output 75/100

JSON, YAML, CSV, markdown, or stable machine-readable output for agents.

Safety 61/100

Clear read-only commands, dry-run options, and approval gates for destructive work.

Agent docs 67/100

How easily an agent can learn the command surface from docs, help, and examples.

Install options

Recommended $ brew install libpq

Common commands

Show help · safe $ libpq --help

Inspect command surface before automation.

Check version · safe $ libpq --version

Verify the installed CLI.

Agent usage examples

Claude Code / Codex CLI / Gemini CLI Use psql only with non-interactive commands. Prefer structured output: csv, text, json. Ask before destructive operations.

Safety notes

  • Prefer non-interactive usage and explicit output flags when an agent runs this command.
  • Treat commands that deploy, delete, charge money, or mutate production data as approval-required.
  • Record the exact command, output format, and scope before adding it to an agent workflow.

What agents can use it for

Query PostgreSQL databases and inspect schemas from terminal and agent workflows.

Agent usage rule

Prefer non-interactive commands, structured output, and approval gates for state-changing operations.

Install

brew install libpq