Coming from pgcli, mycli or litecli
quarry is built to feel familiar if you've used pgcli, mycli or litecli. Most of your habits carry over.
What works the same
- Connecting:
quarry dbname userlike pgcli, the same short flags (-h -p -u -d, and-U -P -D), URLs, and the usual environment variables and password files (PG*,~/.pgpass,MYSQL_*,~/.my.cnf). - Commands:
- pgcli's
\dfamily (\dt,\dv,\di,\df,\dn,\du,\l, …), on every database. - mycli's words:
use,source,tee,notee,pager,nopager,status,delimiter,rehash,system,prompt. - litecli's dot commands:
.tables,.schema,.indexes,.databases,.mode,.read,.open,.load,.once,.output.
- pgcli's
- Output:
\x,\G,\T(with the tabulate-style namesfancy_grid,grid,github,psql), and theless -SRXFpager. - Favourites:
\f,\fs,\fdwith$1and$*placeholders, and\n,\ns,\ndas aliases. - Safety: destructive-statement confirmation.
- Editing:
\ein your editor,\watch,F2–F4toggles, and history search with Ctrl+R.
What's different
- One tool for all three databases. No more remembering which client you're in.
- A full-screen TUI is built in:
\tuiorquarry --tui. - No Python. quarry is a single native binary. TLS is built in and SQLite is bundled.
- One config file,
~/.config/quarry/config.toml, in TOML. Setting names are similar but not identical. See Configuration file. Your old~/.config/pgcli/configor~/.myclircisn't read. - Saved connections replace pgcli's
[alias_dsn]and mycli's[alias_dsn]:quarry URL --save NAME, thenquarry NAME. \tis timing, as in mycli, not psql's tuples-only mode.\Rsets the prompt, andpromptdoes too.- Destructive warnings are configured as a list of rules (
drop,unconditional_delete, …) rather than on/off. See Staying safe. - Themes replace Pygments syntax styles. There are 27 built in, and you can use base16 schemes. See Themes.
\llmasks a language model to write SQL for your schema. See Asking a model for SQL.
Settings that map across
| pgcli / mycli / litecli | quarry [main] |
|---|---|
smart_completion | smart_completion |
multi_line | multi_line |
vi | vi |
keyword_casing | keyword_casing |
table_format | table_format |
destructive_warning | destructive_warning (a list of rules) |
prompt | prompt (same \u \h \d escapes, plus \t \T \x \D \R) |
row_limit | row_limit |
less_chatty | less_chatty |
log_file | log_queries = true (fixed location in the data directory) |
syntax_style | theme |
enable_pager, pager | enable_pager, pager |
max_field_width | max_field_width |
null_string | null_string |