Sqltui Documentation

Installation

Sqltui is a single compiled binary built with Rust. It opens SQLite database files directly — no server, no credentials, no connection setup. One file you drop on PATH. Open source (GPL-3.0).

Download

sudo curl -L -o /usr/local/bin/sqltui https://dl-sqltui.voltrus.id/latest && sudo chmod +x /usr/local/bin/sqltui

System Requirements

RequirementMinimum
OSmacOS (aarch64), Linux (x86_64), or Windows (x86_64)
FilesAny SQLite file — .db, .sqlite3, .db3
PermissionsRead access to the file (read+write if you intend to run write queries)

First Launch

The binary is self-contained (~6 MB). On macOS, clear Gatekeeper's quarantine once: xattr -d com.apple.quarantine /usr/local/bin/sqltui.

No server, no drivers. Sqltui reads the SQLite file via the embedded rusqlite engine. There is nothing to start, configure, or authenticate against.

Quick Start

1. Open a database (10 seconds)

The fastest path — run with no flags and pick a file.

cd ~/projects/myapp
sqltui
  1. The built-in file picker scans the current directory for .db, .sqlite3, and .db3 files.
  2. Move with j/k and press Enter to open one.
  3. The sidebar lists every table and view with a live row count.

Or open a file directly:

sqltui -f myapp.db

2. Browse and inspect the schema

  1. Select a table and press Enter — paginated rows load 500 at a time.
  2. Open the Schema tab to view the CREATE TABLE statement with full syntax highlighting.
  3. Press / to filter the table list by name.

3. Run a query

Switch to the Query tab, type SQL, and press Ctrl+S to execute. Autocomplete fires on SQLite keywords, table names, and columns.

SELECT user_id, COUNT(*) AS sessions, MAX(login_at) AS last_seen
FROM sessions
GROUP BY user_id
ORDER BY last_seen DESC
LIMIT 25;

4. Export and launch the Web UI

Export the current table or query result as CSV, JSON, or SQL INSERTs from the export menu. Prefer a browser? Add --ui for a dark-theme web interface on port 5000.

sqltui -f myapp.db --ui

Configuration

Flags

FlagMeaning
-f, --filePath to a SQLite file (omit to use the file picker)
--uiLaunch the Web UI instead of the TUI
--listenWeb UI listen port (default 5000)

Supported File Extensions

ExtensionOrigin
.dbGeneric SQLite (most apps, web frameworks)
.sqlite3Alternative SQLite extension
.db3Another common SQLite extension

No extension match? Pass the path explicitly with -f — Sqltui will attempt to open any file as SQLite.

TUI Keybindings

KeyAction
i / k, j / lVim-style navigation / scroll
u / dPrev / Next page (500 rows)
q / eSwitch between Tables and Views
/Filter table/view list
Ctrl+SExecute query in the editor
cCopy row/selection as TSV or JSON

Large databases

The pagination system loads 500 rows at a time, so tables with millions of rows stay responsive. Row counts are pre-fetched so you always see the scale before you open a table.

Key Features

Instant file picker

No --file flag? No problem. Run sqltui in any directory and it scans for .db/.sqlite3/.db3 files, arrow-key to the one you want, hit Enter. Faster than typing a path.

Zero-dependency single binary

One ~6 MB file with the SQLite engine compiled in. No DB Browser for SQLite install, no Java for SQLiteStudio, no IDE. Drop it on a Raspberry Pi over SSH and you're browsing a file in seconds.

Schema inspector with DDL

View the full CREATE TABLE statement with syntax highlighting. Instantly answers "what columns does this table have and what are their types?" without a query.

SQL editor with autocomplete

Autocomplete on SQLite keywords, table names, and column names. Ctrl+S to execute. Errors show inline next to the statement.

Multi-format export

Export any table or query result as CSV, JSON, or SQL INSERT statements — full table or current 500-row page, from the TUI or the Web UI.

Perfect for mobile & embedded debugging

Open CoreData stores pulled from iOS, Room databases from Android, and edge-device SQLite stores without Android Studio, Xcode, or a GUI. Just the file and the binary.

Troubleshooting

"database is locked"

Symptom: Queries fail with database is locked or the file appears read-only.
Fix: Another process holds a write lock — typically the app that owns the database. Stop that app (or copy the .db file aside and open the copy). SQLite uses file-level locking, so a running server or mobile app will hold the lock during writes.

File not recognized as a database

Symptom: "file is not a database" or a garbled schema.
Fix: The file isn't actually SQLite. Check the header — every SQLite file starts with the literal string SQLite format 3:

head -c 16 myapp.db

If you see something else, it's a different format (often a LevelDB/RocksDB store, a Realm file, or a binary blob). Sqltui only opens genuine SQLite files.

Encrypted / SQLCipher databases

Symptom: An app's .db file fails to open with a parse error.
Fix: Many mobile apps encrypt their SQLite store with SQLCipher. Sqltui reads standard SQLite only. Decrypt the file first with the app's key using sqlcipher CLI, then open the decrypted copy.

WAL file shows stale data

Symptom: You opened the file but recent writes from the owning app don't appear.
Fix: The database is in WAL mode and uncommitted changes live in the -wal sidecar. Sqltui reads the main file. Either let the app checkpoint (it does so periodically) or copy the .db, -wal, and -shm files together so the snapshot is consistent.

Write query silently does nothing

Symptom: An UPDATE or DELETE runs without error but row count doesn't change.
Fix: You likely lack write permission on the file (or its directory — SQLite needs write access to the directory to create journal files). Check ls -l myapp.db and the directory permissions.

Wide table columns truncated in TUI

Symptom: Long text columns are cut off in the terminal.
Fix: Use horizontal scroll in the TUI, or launch the Web UI (--ui) where the browser gives native horizontal scrolling.

Support

When reporting an issue, include the OS, how the SQLite file was created (which app/framework), the file size, and the exact command and error output.