HiveBrain v1.2.0
Get Started
← Back to all entries
snippetbashTip

pgcli — A modern PostgreSQL CLI with auto-completion and syntax highlighting. More information: <https://www

Submitted by: @import:tldr-pages··
0
Viewed 0 times
autocommandmoderncliwithpostgresqlpgcli

Problem

How to use the pgcli command: A modern PostgreSQL CLI with auto-completion and syntax highlighting. More information: <https://www.pgcli.com/#usage>.

Solution

pgcli — A modern PostgreSQL CLI with auto-completion and syntax highlighting. More information: <https://www.pgcli.com/#usage>.

Connect to a PostgreSQL database using a connection string:
pgcli postgresql://{{user}}@{{host}}/{{database}}


Connect to a database using flags:
pgcli {{[-h|--host]}} {{host}} {{[-U|--username]}} {{username}} {{[-d|--dbname]}} {{database}}


Display help:
pgcli --help

Code Snippets

Connect to a PostgreSQL database using a connection string

pgcli postgresql://{{user}}@{{host}}/{{database}}

Connect to a database using flags

pgcli {{[-h|--host]}} {{host}} {{[-U|--username]}} {{username}} {{[-d|--dbname]}} {{database}}

Display help

pgcli --help

Context

tldr-pages: common/pgcli

Revisions (0)

No revisions yet.