usql is a universal command-line interface for SQL databases that provides a unified way to interact with PostgreSQL, MySQL, Oracle Database, SQLite3, Microsoft SQL Server, and many other databases including NoSQL systems.
The tool solves the problem of having to learn different command-line clients for each database system. It works by providing a psql-inspired interface that works across multiple database types, allowing users familiar with PostgreSQL's command-line tool to apply that knowledge to other databases. The tool supports core psql features including variables, backticks, and backslash commands, while adding capabilities that psql lacks such as multiple database support, copying data between databases, syntax highlighting, context-based completion, and terminal graphics.
Database administrators and developers who prefer psql-style workflows but need to work with non-PostgreSQL databases will find this tool intuitive and easier than learning each database's native client. It suits teams managing multiple database systems who want a consistent interface across them. The tool includes base drivers for PostgreSQL, MySQL, SQLite3, Microsoft SQL Server, and Oracle by default, with additional databases available through build tags, and ODBC database support available through an install flag.
The project maintains an official container image for Docker and other container runtimes. Installation is available through multiple channels including release downloads, Homebrew, AUR, Scoop, Go's package manager, and Docker. The codebase is written in Go and uses a modular build system where database drivers can be selectively included or excluded at compile time.