Skip to content

usql

Agent-readyData & DBDatabase

Universal SQL shell, multiple databases, and db scripts from the terminal.

Universal SQL shell, multiple databases, and db scripts from the terminal. Built by xo.

Task fit

universal sql shell, multiple databases, and db scripts from the terminal.

Lane

Inspect schemas, run safe queries, and understand your data fast.

Operator brief

Use usql for universal sql shell, multiple databases, and db scripts from the terminal.

Run `usql postgres://localhost/postgres` and see what comes back.

Repository family

xo

First trust check

usql responds and shows available connection options.

Safe first loop

Install, verify, then run one real command.

Safe database loop

Install command

$ brew install usql

Operator pack

Copy or export the working notes for this CLI before handing it to an agent.

Verify

$ usql --help

usql responds and shows available connection options.

First real command

$ usql postgres://localhost/postgres

First steps

  1. 01Install usql.
  2. 02Run `usql --help` first.
  3. 03Start with `usql postgres://localhost/postgres`.
  4. 04Install a CLI that matches your database engine.

When to use / hold off when

Best for

universal sql shell, multiple databases, and db scripts from the terminal.

Use this when

You need databases in both local dev and CI.

Hold off when

You don't work with databases.

Trust and constraints

trusted89/100
Install readyTrustedCaution
JSON outputNo
Non-interactiveYes
CI-friendlyYes

Why operators pick it

  • usql fits data & db well, especially for universal sql shell, multiple databases, and db scripts from the terminal.
  • 9 crates recent downloads.
  • Easy to automate.

Constraints

  • Output is mostly plain text.
  • Start with read-only or dry-run commands.

Repository context

Other CLIs in this family

This is the only CLI surfaced from this family right now.

Facts and links

Install withbrew
crates recent downloads9
GitHub stars9.9K
LicenseMIT
UpdatedMar 23, 2026