sqlit is a free, open source databases project written in Python and released under MIT. It has 4,839 GitHub stars, 165 forks and 17 open issues, and was last pushed 8 days ago. On this registry it ranks #149 of 203 tracked projects in Databases, with 5 head-to-head comparisons available.

What is sqlit?

sqlit is a free, MIT-licensed terminal user interface for SQL databases, written in Python, that lets a developer connect to a database and run queries from the command line in seconds — it is built for developers who want database access without a heavyweight GUI.

What it is

sqlit is a keyboard-driven TUI in the mould of lazygit, living in the Python and command-line tooling ecosystem. It is published as the sqlit-tui package and runs as a single terminal application that manages connections, browses schema objects, writes and executes SQL, and formats results. It supports SQL Server, PostgreSQL, MySQL, SQLite, MariaDB, 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.

The concrete problem it solves is the cost of reaching a database at all. As the README's motivation puts it, the accepted route was "heavy GUI's like SSMS," a gigabyte-heavy application that "took ages to launch all for the mere purpose of running a few queries." The alternative, VS Code's SQL extension, still means launching a heavy Electron application built for coding. sqlit replaces both for the everyday case: it targets the developer who is not a DBA, does not need complex performance graphs, and does not want their RAM "eaten alive."

Key capabilities

  • Saved connection manager: connections are stored and switched without CLI arguments — run sqlit and pick a connection.
  • Docker discovery: sqlit automatically finds running database containers and connects on pressing Enter, working out the connection details itself.
  • SSH tunnels: remote databases are reachable with password or key authentication.
  • Secure credentials: passwords are stored in the operating system keyring rather than a plain-text config file.
  • Query editing: syntax highlighting, searchable per-connection query history, and Vim-style modal keybindings with context-aware help shown on screen.
  • Result handling: millions of rows load into a viewer with content filtering and fuzzy search.
  • CLI mode: sqlit query -c "MyConnection" -q "SELECT * FROM Users" --format csv or --format json, and -f script.sql to run a file.
  • Cloud CLI integration: browsing and connecting to external databases through the Azure, AWS and GCP CLIs.
  • Themes: Rose Pine, Tokyo Night, Nord and Gruvbox.

Who uses it and how

  • Developers on Linux or macOS who lost SSMS when they left Windows and need a replacement that starts instantly.
  • Engineers whose databases run in Docker locally — the container picker removes the need to remember ports and credentials during development.
  • Teams querying cloud-hosted databases (Snowflake, BigQuery, RedShift, Supabase) through their existing Azure, AWS or GCP CLI login.
  • Anyone reaching a remote database that is only exposed behind SSH, using tunnel support with key or password auth.
  • Terminal-first users who already work in Neovim-style modal editing and want the same keybinding model for SQL.

Getting started

Install with pipx install sqlit-tui (the recommended route); uv tool install sqlit-tui, pip install sqlit-tui, AUR yay -S sqlit and nix run github:Maxteabag/sqlit are also documented. Then run sqlit, or sqlit --mock=sqlite-demo to explore the interface without a real database.

How it compares

Among the tools named in its own README, sqlit positions itself as the lazygit of SQL databases: a small, fast, keybinding-focused terminal program rather than a GUI such as SSMS or the VS Code SQL extension, both of which the author describes as heavy applications to launch for a few queries. It follows lazygit's model of immediate, pick-up-and-go use rather than the DBA-oriented, performance-graphing role of SSMS.

When to use it — and when not to

The self-hoster operates nothing beyond a local install, but should expect to have an OS keyring available for credential storage, to install the relevant database drivers (a dependency wizard helps), and to hold SSH credentials if remote tunnelling is used. It is not the right pick for DBAs who need the complex performance graphs and administrative depth of SSMS, nor for anyone who wants a shared, server-side query console — sqlit is a per-developer terminal tool. It is actively maintained (4,839 stars, 165 forks, 17 open issues, last push September 2026), though as a single-maintainer Python project its long-term support rests on that one maintainer.

project readme (upstream, from github) — read inline

The lazygit of SQL databases

Connect and query your database from your terminal in seconds.

GitHub Stars Python License

pipx install sqlit-tui

Buy Me a Coffee


Connect

Supports all major databases: SQL Server, PostgreSQL, MySQL, SQLite, MariaDB, 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.

Database Providers

Query

Syntax highlighting. History. Vim-style keybindings.

Query History

Results

Load millions of rows. Inspect data, filter by content, fuzzy search.

Filter results

Docker Discovery

Automatically finds running database containers. Press 'Enter' to connect, sqlit figures out the details for you.

Docker Discovery


Features

Connection manager: Save and switch connections without CLI args

Just run sqlit: No CLI config needed, pick a connection and go

Multi-database support: PostgreSQL, MySQL, SQLite, SQL Server, and 10+ more

Docker integration: Auto-detect running database containers

Cloud CLI integration: Easily browse and connect to your external databases through Azure, AWS and GCP CLI's

SSH tunnels: Connect to remote databases securely with password or key auth

Secure credentials: Passwords stored in your OS keyring

Vim-style editing: Modal editing for terminal purists

Query history: Searchable, per-connection history

Filter results: Fuzzy search through millions of rows

Context-aware help: Keybindings shown on screen

Browse databases: Tables, views, procedures, indexes, triggers, sequences

Autocomplete: Sophisticated SQL completion engine for tables, columns, and procedures

CLI mode: Execute SQL from the command line

Themes: Rose Pine, Tokyo Night, Nord, Gruvbox

Dependency wizard: Auto-install missing drivers


Motivation

Throughout my career, the undesputed truth was that heavy GUI's like SSMS was the only respectable way to access a database. It didn't matter that I wasn't a DBA, or that I didn't need complex performance graphs. I was expected to install a gigabyte-heavy behemoth that took ages to launch all for the mere purpose of running a few queries to update and view a couple of rows.

When I switched to Linux, I was suddenly unable to return to the devil I know, and I asked myself: how do I access my data now?

The popular answer was VS Code's SQL extension. But why should we developers launch a heavy Electron app designed for coding just to execute SQL?

I had recently grown fond of Terminal UI's for their speed and keybinding focus. I looked for SQL TUIs, but the options were sparse. The ones I found lacked the user-friendliness and immediate "pick-up-and-go" nature of tools I loved, like lazygit, and I shortly returning to vscode sql extension.

Something wasn't right. I asked myself, why is it that running SQL queries can't be enjoyable? So I created sqlit.

sqlit is for the developer who just wants to query their database with a user friendly UI without their RAM being eaten alive. It is a lightweight, beautiful, and keyboard-driven TUI designed to make accessing your data enjoyable, fast and easy like it should be-- all from inside your favorite terminal.


Installation

# pipx (recommended)
pipx install sqlit-tui

# uv
uv tool install sqlit-tui

# pip
pip install sqlit-tui

# Arch Linux (AUR)
yay -S sqlit

# Nix (flake)
nix run github:Maxteabag/sqlit

Usage

sqlit

The keybindings are shown at the bottom of the screen.

Try it without a database

Want to explore the UI without connecting to a real database? Run with mock data:

sqlit --mock=sqlite-demo

CLI

sqlit -c "MyConnection"
sqlit --connection "MyConnection"

# Run a query
sqlit query -c "MyConnection" -q "SELECT * FROM Users"

# Output as CSV or JSON
sqlit query -c "MyConnection" -q "SELECT * FROM Users" --format csv
sqlit query -c "MyConnection" -f "script.sql" --format json

# Create connections for different databases
sqlit connections add mssql --name "MySqlServer" --server "localhost" --auth-type sql
sqlit connections add postgresql --name "MyPostgres" --server "localhost" --username "user" --password "pass"
sqlit connections add mysql --name "MyMySQL" --server "localhost" --username "user" --password "pass"
sqlit connections add cockroachdb --name "MyCockroach" --server "localhost" --port "26257" --database "defaultdb" --username "root"
sqlit connections add sqlite --name "MyLocalDB" --file-path "/path/to/database.db"
sqlit connections add turso --name "MyTurso" --server "libsql://your-db.turso.io" --password "your-auth-token"
sqlit connections add firebird --name "MyFirebird" --server "localhost" --username "user" --password "pass" --database "employee"
sqlit connections add athena --name "MyAthena" --athena-region-name "us-east-1" --athena-s3-staging-dir "s3://my-bucket/results/" --athena-auth-method "profile" --athena-profile-name "default"
sqlit connections add athena --name "MyAthenaKeys" --athena-region-name "us-east-1" --athena-s3-staging-dir "s3://my-bucket/results/" --athena-auth-method "keys" --username "ACCESS_KEY" --password "SECRET_KEY"

# Connect via SSH tunnel
sqlit connections add postgresql --name "RemoteDB" --server "db-host" --username "dbuser" --password "dbpass" \
  --ssh-enabled --ssh-host "ssh.example.com" --ssh-username "sshuser" --ssh-auth-type password --ssh-password "sshpass"

# Fetch password from a secrets manager (1Password, pass, Vault, etc.)
sqlit connections add postgresql --name "ProdDB" --server "prod.example.com" --username "dbuser" \
  --password-command "op read 'op://Work/prod-db/password'"

# Temporary (not saved) connection
sqlit connect sqlite --file-path "/path/to/database.db"

# Connect via URL - scheme determines database type (postgresql://, mysql://, sqlite://, etc.)
sqlit postgresql://user:pass@localhost:5432/mydb
sqlit mysql://root@localhost/testdb
sqlit sqlite:///path/to/database.db

# Save a connection via URL
sqlit connections add --url dbtype://user:pass@host/db --name "MyDB"

# Provider-specific CLI help
sqlit connect -h
sqlit connect supabase -h
sqlit connections add -h
sqlit connections add supabase -h

# Manage connections
sqlit connections list
sqlit connections delete "MyConnection"

Keybindings

Key Action
i Enter INSERT mode
Esc Back to NORMAL mode
e / q / r Focus Explorer / Query / Results
s SELECT TOP 100 from table
h Query history
d Clear query
n New query (clear all)
y Copy query (when query editor is focused)
v / y / Y / a View cell / Copy cell / Copy row / Copy all
Ctrl+Q Quit
? Help

Vim Motions (Query Editor, NORMAL mode)

Use with operators like y, d, c (e.g. dw, y$).

Motion Action
h / j / k / l Move cursor left / down / up / right
w / W Next word / WORD
b / B Previous word / WORD
0 / $ Line start / end
gg / G File start / end
f{c} / F{c} Find char forward / backward
t{c} / T{c} Till char forward / backward
% Matching bracket

Commands Menu (``)

Key Action
c Connect to database
x Disconnect
z Cancel running query
e Toggle Explorer
f Toggle Maximize
t Change theme
h Help
q Quit

Autocomplete triggers automatically in INSERT mode. Use Tab to accept.


Configuration

Connections and settings are stored in $XDG_CONFIG_HOME/sqlit/ (default: ~/.config/sqlit/). Override the location by setting SQLIT_CONFIG_DIR.

Custom keybindings

Edit the keymap.json file in your sqlit config dir. See config/keymap.template.json for the full default keymap. Keymap.json need to only contain the ov

readme truncated — read the full docs on github

Frequently asked questions

Is sqlit free to use?

sqlit is open source under the MIT licence. There is no licence fee and no seat count — you can self-host it or, where the project offers one, pay a vendor for a managed version instead.

What does sqlit do?

A user friendly TUI for SQL databases. Written in python. Supports SQL server, Mysql, PostreSQL, SQLite, Turso and more.

What is sqlit written in?

sqlit is primarily written in Python. Its source is publicly available at https://github.com/Maxteabag/sqlit, and it has 4,839 GitHub stars.