About this project
sqlit is a user-friendly terminal UI (TUI) for working with SQL databases, written in Python and built on Textual. It positions itself as "the lazygit of SQL databases": run `sqlit`, pick a connection from the UI, and start querying without CLI configuration or external documentation.
Supported databases include SQL Server, PostgreSQL, MySQL, MariaDB, SQLite, FirebirdSQL, Oracle, DuckDB, CockroachDB, ClickHouse, Snowflake, Databricks, Supabase, Cloudflare D1, Turso, Athena, BigQuery, Spanner, Redshift, IBM Db2, SAP HANA, Teradata, Exasol, Trino, Presto, Apache Flight SQL, Apache Impala, SurrealDB and osquery. Drivers for many of these are optional and can be installed on demand; sqlit detects missing drivers and shows the appropriate install command.
Key capabilities described in the README:
- Connection manager: save, list, delete and switch connections; connect via URL schemes or provider-specific CLI flags; temporary connections without saving.
- Docker discovery: automatically detects running database containers and connects on Enter.
- Cloud CLI integration: browse and connect to external databases through Azure, AWS and GCP CLIs.
- SSH tunnels: connect to remote databases with password or key authentication (requires the `ssh` extra).
- Credential handling: connection details live in `connections.json`, while passwords are stored in the OS keyring where available; passwords can also be fetched from secrets managers via `--password-command`.
- Query editor: syntax highlighting, searchable per-connection history, Vim-style modal editing and motions, and a SQL autocomplete engine for tables, columns and procedures.
- Results: load large result sets, inspect cells, filter by content and fuzzy search; copy cell, row or all rows.
- Explorer: browse tables, views, procedures, indexes, triggers and sequences.
- CLI mode: run queries from the command line with CSV or JSON output, or from a SQL script file.
- Themes: Rose Pine, Tokyo Night, Nord and Gruvbox.
- Custom keybindings via `keymap.json` in the config directory (`$XDG_CONFIG_HOME/sqlit/`, overridable with `SQLIT_CONFIG_DIR`).
Installation options listed are pipx (recommended), uv, pip, Arch Linux AUR and a Nix flake. A `--mock=sqlite-demo` flag allows exploring the interface without a real database.
The README explains the motivation as avoiding heavy GUI clients such as SSMS or launching a full IDE just to run SQL, aiming instead for a lightweight, keyboard-focused tool that is quick to pick up. It cites lazygit and lazysql as inspirations and notes that sqlit deliberately focuses on a limited set of tasks done well rather than matching the feature breadth of other SQL TUIs. The project is MIT licensed.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.