Docs

AutoCompletion

Auto-completion kicks in as soon as you start typing. The suggestions are context sensitive so the REPL will only suggest relevant items.

Read More...

Config

The config file for pgcli is located in the home folder (~/.config/pgcli/config).

Read More...

Colors

Syntax highlighting has plenty of themes that can be changed via the config file.

Showcase of various color themes:

Gallery

Special Commands (Meta-Commands)

Pgcli has tried to implement most of the back-slash commands that are available in psql. These commands make it easy to interact with the meta-data of a database, such as \d, \l, \i, etc.

Read More...

Keybindings

There are two types of keybindings available. Emacs mode and Vi mode. The keybindings can be changed via the config file (~/.config/pgcli/config) or toggled via F4 key.

Read more...

Named Queries (favorites)

Frequently used queries can be saved as named queries.

Read More...

Logging

Default log file is located at ~/.config/pgcli/log. There is additional user friendly audit logging.

Read More..

Open Editor

Use the \e command in the prompt, to launch the default editor.

Read More...

Multi-line mode

Pgcli doesn't expect a semi-colon at the end of a line to execute the query. But this can be changed by setting the multi-line mode.

Read more...

History & Search

Pgcli keeps track of the queries entered in the repl. Up/Down arrow can be used to navigate the history.

Pressing <C-r> will enable incremental history search. So press <C-r> and then start typing your search term to see the queries narrowed down. You can cycle through the matches by pressing <C-r> again.

Read more...

Pager Output

Pgcli uses pager programs to make it easier to view large result sets. This can be configured or disabled.

Prompt

Pgcli has a configurable prompt.

IPython integration

Pgcli can be run from IPython console, with the help of pgcli.magic extension.

blogroll

social