Auto-completion kicks in as soon as you start typing. The suggestions are context sensitive so the REPL will only suggest relevant items.
The config file for pgcli is located in the home folder (~/.config/pgcli/config).
Syntax highlighting has plenty of themes that can be changed via the config file.
Showcase of various color themes:
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
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.
Named Queries (favorites)
Frequently used queries can be saved as named queries.
Default log file is located at
~/.config/pgcli/log. There is additional user friendly audit logging.
\e command in the prompt, to launch the default editor.
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.
History & Search
Pgcli keeps track of the queries entered in the repl. Up/Down arrow can be used to navigate the history.
<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
Pgcli uses pager programs to make it easier to view large result sets. This can be configured or disabled.
Pgcli has a configurable prompt.
Pgcli can be run from IPython console, with the help of