$ open-source database client · v2.4
Talk to any database
without leaving the shell.
One binary. Postgres, MySQL, SQLite, ClickHouse. Sub-10ms first query, output piped straight into jq, csv, or your next command.
brew install dq-io/tap/dq
or curl -fsSL dq.sh | sh · MIT licensed · no telemetry
dq prod -e "select plan, count(*) from users group by plan"
plan │ count ──────────┼──────── free │ 48,210 pro │ 9,884 team │ 1,207 enterprise│ 142 4 rows · 6.8ms · postgres@prod
dq connect prod --url postgres://checkout.internal:5432/app
✓ resolved driver postgres 16.2 ✓ tls handshake 11ms ✓ saved profile prod (~/.dq/profiles) connected. type \d to list tables, \q to quit.
dq prod -e "select id,email from users limit 3" --json | jq .[].email
"ada@hey.dev" "grace@navy.mil" "linus@kernel.org" 3 rows · streamed as ndjson · 4.1ms
Latency
Cold start to first row, measured.
Same query, same Postgres, warm cache. Time from process launch to the first printed row, median of 500 runs on an M2.
query: select * from orders where id = $1
connection pooling + a statically-linked driver. no per-query fork.
Four commands, one workflow.
From a fresh clone to piping results into your build script. Real commands, real output.
-
1 connect
Point it at a URL once. The profile is saved, encrypted, reused by name.
dq connect prod \ --url $DATABASE_URL
-
2 query
Inline SQL or an interactive REPL with completion and history.
dq prod -e \ "select * from orders limit 50"
-
3 migrate
Versioned, plain-SQL migrations. Up, down, and a dry-run diff.
dq migrate up \ --dir ./migrations \ --dry-run
-
4 pipe
Emit JSON, CSV or TSV to stdout and hand it to the next tool.
dq prod -e "..." \ --csv > report.csv
Open source
Your credentials never leave your machine.
MIT licensed, no account, no phone-home. Read every line, build it from source, pin the version your CI trusts.
- No lock-in. Plain-SQL migrations and standard connection URLs, portable to any client.
- Self-host the docs and tap. Zero external dependencies at runtime.
- Auditable releases. Every binary is reproducible and signed.
Built for every database on your team.
Six drivers, one syntax
Switch engines without switching muscle memory. The same flags work everywhere.
Any output format
Aligned table for humans, ndjson for pipes.
Scriptable
Non-zero exit on error, quiet mode, and env-var interpolation. Drops straight into CI.
Cross-DB joins
Read a table from Postgres, join it against a local SQLite file in one query.
Guardrails
Read-only profiles and a confirm prompt before any unbounded delete.
Install it. Query in one line.
A single 8MB binary. No runtime, no daemon, no account.
brew install dq-io/tap/dq