A database IDE for the terminal

SQLite, PostgreSQL, SQL Server and MySQL in one terminal. Several open at once, and the one marked read-only stays that way.

Get binsql

Builds for macOS, Linux and Windows. One binary, nothing else to install.

tar xzf binsql-3.0.0-darwin-arm64.tar.gz
mv binsql-3.0.0-darwin-arm64/binsql /usr/local/bin

Engines

What it does

Command mode

$ binsql query "SELECT TOP 3 CompanyName FROM Customers" -o csv
CompanyName
Alfreds Futterkiste
Ana Trujillo Emparedados y helados
Antonio Moreno Taquería

$ binsql exec -c northwind/local -f ship.sql --dry-run
UPDATE Orders SET ShippedDate = GETDATE() WHERE OrderID = 11077  — 1 row
UPDATE Orders SET ShipVia = 2 WHERE OrderID IN (11076, 11075)  — 2 rows
(3 rows affected, rolled back — nothing was kept)

$ binsql exec -c northwind/local "DELETE FROM Orders"
error: refusing statement 1: DELETE with no WHERE clause changes every row — pass --force if that is what you meant

Formats

Keys

⌃R
Run
⌃C
Cancel
⌃K
Commands
⌃T
New console
⌃N
New data source
⌥1…9
Jump to console
F5
Refresh
F1
Help
$ cargo build --release

macOS, Linux and Windows builds are on the releases page, with checksums. Or build it with Rust 1.90.