usql

scriptabledatabase
$ brew install usql
Summary

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

  • 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.
  • Good fit for coding-agent workflows and repeatable scripts.
  • Output is mostly text-first, so verify results before scripting around it.
database-usql-SKILL.md

Usql guide

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

Open CLI packages the install path, verify step, and safe-start workflow so this tool can move from “interesting CLI” to something you can actually use. It also integrates with skills.sh so each CLI comes with the right companion skills, not just a binary and a docs link.

When to apply

  • universal sql shell, multiple databases, and db scripts from the terminal.
  • You need databases in both local dev and CI.
  • You need universal sql shell.
  • You need multiple databases.
  • You need db scripts.

Quick reference

Installbrew install usql
Verifyusql --help
First real commandusql postgres://localhost/postgres

Open CLI × skills.sh

Open CLI integrates usql with the right skills.sh companions so you get the tool and the workflow together.

Database Schema Design

Recommended pairing

Open CLI recommends this skills.sh skill because it fits database workflows. Use better schema and migration decisions when a CLI touches databases.

View on skills.sh
$ npx skills add https://github.com/supercent-io/skills-template --skill database-schema-design
Starter prompt

Use usql together with the Database Schema Design skills.sh skill. Inspect the current schema or data first, summarize what matters, and ask before any migration or write action.

Why this tool

  • 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.

Watch-outs

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

Example workflow

1. usql postgres://localhost/postgres

Safe start

Step 1

Install usql.

Step 2

Run `usql --help` first.

Step 3

Start with `usql postgres://localhost/postgres`.

Step 4

Install a CLI that matches your database engine.

Alternatives worth considering