afpsql CLI Reference

Regenerate with afpsql --help-markdown.

Command-Line Help for afpsql

This document contains the help content for the afpsql command-line program.

Command Overview:

afpsql

Agent-First PostgreSQL client.

Interface Policy

Query Sources and Parameters

Connection Sources

Result Shaping

Examples

afpsql --sql "select now() as now_rfc3339"
afpsql --sql-file ./query.sql
afpsql --sql "select * from users where id = $1" --param 1=123
afpsql --dsn-secret "postgresql://app:secret@127.0.0.1:5432/appdb" --sql "select 1"
afpsql --mode psql -h 127.0.0.1 -p 5432 -U app -d appdb -c "select 1"
afpsql --sql "select * from big_table" --stream-rows --batch-rows 1000
afpsql --mode pipe
afpsql psql status
afpsql psql install

Exit Codes

Usage: afpsql [OPTIONS] [COMMAND]

Subcommands:
Options:

afpsql psql

Manage the local psql wrapper for afpsql –mode psql

Usage: afpsql psql <COMMAND>

Subcommands:

afpsql psql status

Show whether the afpsql-managed psql wrapper is installed and active

Usage: afpsql psql status [OPTIONS]

Options:

afpsql psql install

Install an afpsql-managed psql wrapper

Usage: afpsql psql install [OPTIONS]

Options:

afpsql psql uninstall

Remove an afpsql-managed psql wrapper

Usage: afpsql psql uninstall [OPTIONS]

Options: