2 stable releases
1.0.3 | Mar 2, 2025 |
---|---|
1.0.2 | Mar 1, 2025 |
0.1.0 |
|
#640 in Development tools
625 downloads per month
195KB
5K
SLoC
sqli
sqli (as in, "sql" + "cli" = "sqli") is a simple & sleek SQL client, used as a terminal UI or as a command line tool, to help you query your Postgres database!
heavily inspired by tools like posting, curl, and bruno.
features ๐
- ๐ view query results directly in the terminal
- or pipe it into other tools like
jq
- or pipe it into other tools like
- ๐งช simple syntax for ad-hoc queries from the terminal
- ๐ save and reuse database connections
- ๐ collections are stored in your local file system
- repo-level collections are stored in
./sqli
- add these to your source control to share with others! - user-level settings & collections are stored in
<CONFIG_DIR>/sqli
- repo-level collections are stored in
- ๐ฆ written in rust btw ๐
installation ๐ฆ
homebrew
brew tap jcserv/cask
brew install sqli
cargo
cargo binstall sqli
(cargo-binstall)
or
cargo install sqli
usage โ๏ธ
tui ๐ฅ๏ธ
sqli
- open the TUI
Keybindings:
Key | Action |
---|---|
Tab | Switch between panels (when in nav mode) |
Arrow keys | Switch between panels (when in nav mode) |
Space/Enter | Focus on a pane |
Ctrl+N | Create new file/folder |
Ctrl+E | Edit selected file/folder |
Ctrl+S | Save current file |
Ctrl+Space | Run SQL query |
Esc | Exit edit mode |
Ctrl+C | Quit application |
cli โถ๏ธ
- ad-hoc queries:
sqli query --url postgres://user:password@host:port/database --sql "SELECT * FROM table;"
- configure a connection:
sqli config set --name local --url postgres://user:password@host:port/database
- query using a pre-configured connection:
sqli query --conn local --sql "SELECT * FROM table;"
- query using a file:
sqli query --conn local --sql path/to/file.sql
references ๐
Dependencies
~62MB
~1M SLoC