$ 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
Run your first query

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

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

Four commands, one workflow.

From a fresh clone to piping results into your build script. Real commands, real output.

  1. 1 connect

    Point it at a URL once. The profile is saved, encrypted, reused by name.

    dq connect prod \
      --url $DATABASE_URL
  2. 2 query

    Inline SQL or an interactive REPL with completion and history.

    dq prod -e \
      "select * from orders
       limit 50"
  3. 3 migrate

    Versioned, plain-SQL migrations. Up, down, and a dry-run diff.

    dq migrate up \
      --dir ./migrations \
      --dry-run
  4. 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.
dq-io/dq
14.2k
GitHub stars
318
contributors
1.9M
brew installs
MIT
license
Star on GitHub

Built for every database on your team.

Six drivers, one syntax

Switch engines without switching muscle memory. The same flags work everywhere.

PostgreSQL MySQL SQLite ClickHouse DuckDB MariaDB

Any output format

Aligned table for humans, ndjson for pipes.

--table · --json
--csv · --tsv · --md

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
Made with Baljia