usql

No Change
trial
First Added:May 28, 2026 Updated: July 2, 2026

usql. Is a single binary that speaks the psql-style command line to many SQL and NoSQL databases.

Summary

What it is: Go-based CLI with \ meta-commands, variables, syntax highlighting, context completion, and optional copy between connections.

When to use: daily ad hoc queries across heterogeneous data stores; jump hosts or bastion workflows where installing every native client is painful; scripting with -c and -f like psql.

When to skip: deep admin features tied to one vendor (e.g. \copy parity gaps); GUI-first analysts; teams standardized on a single cloud console.

Covers: relational engines (Postgres, MySQL, SQL Server, SQLite, Oracle) plus Cassandra, ClickHouse, MongoDB, Redis, and more (see upstream database support table).

Details

FeatureNotes
Installbrew install usql or release binaries from GitHub
Connectusql pg://..., usql mysql://..., DSN-style URLs
Copy\copy between databases (cross-engine data moves)
OutputCSV, JSON, vertical, HTML table formats

Practices: store credentials in env vars or .usqlrc, not on the command line in shell history; test \d / describe behavior per engine before relying on it in runbooks.

References