pip install pgcli mycli
These are replacements for the standard mysql and postgresql command line clients. This is appealing because it provides a (somewhat) consistent end user experience to these databases and provides some seriously handy features; including:
-
Command line completion
-
History (with search)
-
Integrates with your favourite command line editor \e
-
Named queries (favorites) - these can be configured to take parameters! I have lots of little SQL snippets I keep in a text file, this makes it much easier!
-
Allows you to easily define the output format using the \T special command (write to file by using the \o special command).
-
Use the "watch" command to easily set up a query that auto refreshes
Output formats: double sql-update-1 orgtbl grid latex rst csv latex_booktabs mediawiki textile plain pipe html ascii fancy_grid psql sql-insert sql-update-2 vertical tsv jira simple moinmoin sql-update github
Written in python too!!
https://www.mycli.net/ https://www.pgcli.com/
Great pycon presentation by the developer (Amjith Ramanujam): https://www.youtube.com/watch?v=hJhZhLg3obk&feature;=player_embedded