usql

Universal command-line interface for SQL databases

What is usql?

Universal command-line interface for SQL databases

Overview of usql

What it is

usql is a universal command-line interface for SQL databases. It supports PostgreSQL, MySQL, Oracle Database, SQLite3, Microsoft SQL Server, and many other databases including NoSQL and non-relational databases. The tool is modeled on PostgreSQL's psql and supports most of its core features such as variables, backticks, and backslash commands. It also includes additional features not found in psql, such as multiple database support, copying between databases, context-based completion, and terminal graphics.

Key features

  • Supports a wide range of SQL and NoSQL databases including PostgreSQL, MySQL, Oracle, SQLite3, Microsoft SQL Server, and others.
  • Modeled on PostgreSQL's psql, supporting variables, backticks, and backslash commands.
  • Allows copying data between different databases.
  • Provides context-based completion for commands and queries.
  • Supports terminal graphics for displaying charts and other visual output.
  • Can be installed via release binaries, Homebrew, AUR, Go, or Docker.

Use cases

Database administrators and developers who prefer a psql-like interface for non-PostgreSQL databases can use usql as a replacement for other database command-line clients. It is useful for managing multiple database types from a single tool, performing cross-database data transfers, and working with databases in environments where a unified CLI is needed.

Getting started

sh# install usql via Homebrew (macOS and Linux)$ brew install xo/xo/usql``````sh# install usql via Go$ go install github.com/xo/usql@latest``````sh# run usql via Docker$ docker run --rm -it docker.io/usql/usql:latest

License and pricing

This project is licensed under the MIT license. It is open source and free to use.

Based on the project's public README and repository metadata.

Add this badge to your README

Featured on YunoDB Badge styles & help

Maintain this project? Show that it is featured on YunoDB.

Markdown[![Featured on YunoDB](https://yunodb.com/badge/xousql.svg)](https://yunodb.com/tools/xousql?utm_source=github&utm_medium=badge)
HTML<a href="https://yunodb.com/tools/xousql?utm_source=github&utm_medium=badge"><img src="https://yunodb.com/badge/xousql.svg" alt="Featured on YunoDB" height="20"></a>