Explore
Databases, schemas, tables, views and routines, with columns, indexes, foreign keys, DDL and sizes a key away.
squi is a keyboard-driven SQL client: browse schemas, write queries with completion, edit rows and read query plans, locally or on a server you reached over SSH. One small static binary.
$ brew install farvisun/tap/squi
A DataGrip-style workflow without the weight, built for the keyboard.
Databases, schemas, tables, views and routines, with columns, indexes, foreign keys, DDL and sizes a key away.
Tabs with syntax highlighting, context-aware completion, vim or standard keys, a formatter and your $EDITOR.
A streaming grid: lazy loading, sort, filter, a cell inspector, and export to CSV, TSV, JSON or SQL.
Filter and sort whole tables on the server, follow foreign keys and jump to referencing rows.
Change rows in the grid, review the generated SQL, then apply it in one transaction that rolls back on any surprise.
EXPLAIN and EXPLAIN ANALYZE as a tree with the hot path highlighted.
Bastions, ~/.ssh/config aliases and ProxyJump chains, with keys, agents and host-key checks.
Sessions, cancel and kill, server variables, users and grants, table sizes.
squi import datagrip imports data sources with their SSH tunnels, passwords and query consoles.
Write :name, $1 or ? and squi asks for the values before
the query runs, then remembers them, so the next run is one key. Strings, comments, casts and
dollar-quoted bodies are left alone.
SELECT id, total, status FROM orders WHERE customer_id = :customer AND created_at > :since; ┌ Query parameters ─────────────────┐ │ :customer 42 │ │ :since now() - interval '7d' │ │ enter run · esc cancel │ └───────────────────────────────────┘
squi diff staging prod compares tables, columns, primary keys, indexes, foreign
keys and views, then writes the ALTER script that brings the target in line.
It never runs anything; drops stay commented out until you ask for them, and
-exit-code fails a CI job when schemas drift.
$ squi diff staging prod -- staging → prod: 3 difference(s) -- missing column users.org_id -- nullability users.email: null → not null -- missing index users.users_org_idx ALTER TABLE "public"."users" ADD COLUMN "org_id" bigint; ALTER TABLE "public"."users" ALTER COLUMN "email" SET NOT NULL; CREATE INDEX "users_org_idx" ON "public"."users" ("org_id");
The guard rails are on by default, because the scary server is the one you open most.
The session itself is read-only where the engine supports it, and squi blocks writes before they reach the server.
DROP, TRUNCATE, and DELETE or UPDATE without a real WHERE need the database name typed out.
A red status bar, a confirmation before every write, and a 30-second statement timeout by default.
Run changes inside a transaction and commit or roll back from the transaction menu.
Passwords go to the OS keychain or environment variables, never the config.
Inline edits, imports and diffs show their SQL before anything runs.
macOS, Linux and Windows. No runtime, no daemon.
brew install farvisun/tap/squiscoop bucket add farvisun https://github.com/farvisun/scoop-bucket; scoop install squigo install github.com/farvisun/squi/cmd/squi@latest$ squi # connection manager $ squi --connect prod-api # a saved connection $ squi --connect 'mysql://root@127.0.0.1/shop' # a URL, never saved $ squi --connect ./app.db # a SQLite file
| F1 ? | Every key binding | ctrl+p | Command palette |
| ctrl+enter F5 | Run the statement under the cursor | tab | Explorer, editor, results |
| ctrl+t alt+1…9 | New tab, switch tab | ctrl+g | Transaction menu |