---
name: "pgcli"
section: "1"
platform: "linux"
package: "pgcli"
version: "4.3.0-2"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/pgcli"
---

# pgcli(1)

CLI for PostgreSQL with auto-completion and syntax highlighting

## NAME

pgcli - CLI for PostgreSQL with auto-completion and syntax highlighting

## SYNOPSIS

**pgcli** \[*OPTIONS*\] \[*DATABASE*\] \[*USERNAME*\]

## DESCRIPTION

pgcli is a command line interface for PostgreSQL with auto-completion and syntax highlighting. It is also capable of pretty printing tabular data.

## OPTIONS

- \-h\|--host *TEXT*

  Host address of the postgres database.

- \-p\|--port *INTEGER*

  Port number at which the postgres instance is listening.

- \-U\|--user *TEXT*

  User name to connect to the postgres database.

- \-W\|--password

  Force password prompt.

- \-w\|--no-password

  Never prompt for password.

- \-v\|--version

  Version of pgcli.

- \-d\|--dbname *TEXT*

  Database name to connect to.

- \--pgclirc *TEXT*

  Location of pgclirc file.

- \--help

  Show this message and exit.

## EXAMPLES

$ pgcli local\_database

- $ pgcli postgres://amjith:passw0rd@example.com:5432/app\_db

  - $ pgcli -h localhost -p 5432 -U amjith app\_db

  ## SEE ALSO

litecli(1)

- [mycli(1)](/mycli/1.md)

  - iredis(1)

  ## HOMEPAGE

More information about pgcli and the DBCLI project can be found on the homepage at https://www.pgcli.com and https://www.dbcli.com.

## AUTHORS

pgcli was written by Amjith Ramanujam \<amjith.r@gmail.com\>.

- This manual page was written by Lennart Weller \<lhw@ring0.de\>, for the Debian project (but may be used by others).
