Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Go
  3. usql

usql

MITGov0.21.4

A universal command-line interface for SQL and NoSQL databases, inspired by PostgreSQL's psql.

GitHubGitHub
9.9k stars387 forks0 contributors

What is usql?

usql is a universal command-line interface for SQL and NoSQL databases. It provides a unified, psql-like experience for interacting with a wide variety of database systems, including PostgreSQL, MySQL, Oracle, SQLite, Microsoft SQL Server, and many others, through a single tool. It solves the problem of needing to learn and switch between multiple database-specific CLI clients.

Target Audience

Database administrators and developers who work with multiple database systems and prefer a consistent, command-line interface. It is particularly useful for PostgreSQL users familiar with psql who need to work with non-PostgreSQL databases.

Value Proposition

Developers choose usql because it offers a familiar psql-like interface with enhanced features like syntax highlighting, context-based tab completion, and the ability to copy data between different databases. Its unique selling point is providing a single, consistent CLI tool for over 30 database systems, reducing the need to learn multiple client tools.

Overview

Universal command-line interface for SQL databases

Use Cases

Best For

  • Database administrators who need to manage and query multiple types of databases (PostgreSQL, MySQL, SQL Server, etc.) from a single command-line interface.
  • Developers working in polyglot environments who want a unified SQL client with psql-like commands and features like backslash commands and variables.
  • Teams needing to copy or migrate data between different database systems using the built-in \copy command.
  • Users who want enhanced CLI features like syntax highlighting, context-based tab completion, and terminal graphics not available in standard database clients.
  • Developers who prefer installing tools via package managers (Homebrew, AUR, Scoop) or Docker, as usql offers flexible installation options.
  • Scripting and automation scenarios where a consistent interface is required for interacting with various databases programmatically.

Not Ideal For

  • Teams requiring advanced, database-specific tools like PostgreSQL's pg_dump or MySQL's mysqladmin for specialized operations.
  • Large-scale data migration projects where performance is critical; the README advises using native tools for datasets over 1GiB.
  • Environments where graphical database management interfaces are preferred over command-line interactions.
  • Systems with strict resource constraints that cannot accommodate CGO dependencies for drivers like SQLite3 or ODBC.

Pros & Cons

Pros

Extensive Database Support

Supports over 30 SQL and NoSQL databases including PostgreSQL, MySQL, Oracle, and Cassandra, with a detailed driver table listing all options.

psql-Like Familiarity

Emulates core psql features such as variables, backslash commands, and backticks, making it intuitive for PostgreSQL users transitioning to other databases.

Enhanced CLI Features

Includes syntax highlighting, context-based tab completion, and terminal graphics, which improve usability beyond basic database clients.

Cross-Database Data Copy

The \copy command enables transferring data between different database systems, useful for migrations and integrations without switching tools.

Cons

Complex Build Configuration

Including specific drivers requires using Go build tags (e.g., -tags most), which can be confusing and error-prone for users unfamiliar with Go tooling.

Incomplete Native Feature Parity

Admits that its \copy command is distinct from psql's and may not support all database-specific commands or optimizations available in native clients.

CGO Dependencies for Key Drivers

Drivers like SQLite3 and ODBC require CGO, complicating installation on platforms where CGO is unsupported or undesirable, such as some constrained environments.

Frequently Asked Questions

Quick Stats

Stars9,926
Forks387
Contributors0
Open Issues89
Last commit11 days ago
CreatedSince 2017

Tags

#database#postgresql-compatible#database-tool#no-sql#microsoft-sql-server#multi-database#postgresql#mariadb#golang#cli#mysql#sql-client#sqlite3#database-management#command-line#go#oracle-database#sql

Built With

G
Go

Included in

Go169.1k
Auto-fetched 1 day ago

Related Projects

fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars79,710
Forks2,789
Last commit3 days ago
divedive

A tool for exploring each layer in a docker image

Stars53,813
Forks1,992
Last commit4 months ago
HubHub

A command-line tool that makes git easier to use with GitHub.

Stars22,942
Forks2,216
Last commit2 years ago
lolo

💥 A Lodash-style Go library based on Go 1.18+ Generics (map, filter, contains, find...)

Stars21,207
Forks937
Last commit2 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub