Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

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

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Command-Line Apps
  3. usql

usql

MITGov0.21.4

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

GitHubGitHub
10.0k stars391 forks0 contributors

What is usql?

usql is a universal command-line interface for SQL and NoSQL databases. It provides a single tool to interact with multiple database systems using a syntax inspired by PostgreSQL's psql, eliminating the need to switch between different database clients.

Target Audience

Database administrators and developers who work with multiple database systems and prefer command-line tools. It's particularly useful for those familiar with PostgreSQL's psql who need similar functionality for other databases.

Value Proposition

Developers choose usql because it offers a consistent interface across different databases, reduces tool fragmentation, and provides advanced features like syntax highlighting and cross-database copying that aren't available in most native clients.

Overview

Universal command-line interface for SQL databases

Use Cases

Best For

  • Database administrators managing heterogeneous database environments
  • Developers who need to query multiple database types from the command line
  • Teams standardizing on a single SQL client tool across projects
  • Migrating data between different database systems
  • Learning SQL across multiple database platforms with a consistent interface
  • Automating database tasks with a unified toolchain

Not Ideal For

  • Projects requiring deep, database-specific optimizations or extensions only available in native clients (e.g., PostgreSQL extensions or Oracle PL/SQL debugging)
  • Environments with minimal dependency requirements where pre-installed, vendor-supported database clients are preferred for security and simplicity
  • Teams that rely heavily on GUI-based database management tools for visual query building or schema design

Pros & Cons

Pros

Broad Database Support

Supports over 30 SQL and NoSQL databases, including PostgreSQL, MySQL, Oracle, and Cassandra, as detailed in the extensive driver table, reducing tool fragmentation.

psql Compatibility

Emulates PostgreSQL's psql with core features like variables, backslash commands, and backticks, making it intuitive for users familiar with that tool.

Enhanced CLI Usability

Includes syntax highlighting, context-based tab completion, and terminal graphics, improving the command-line experience beyond basic database clients.

Cross-Database Data Copy

The \copy command enables copying data between different database systems, a unique feature not commonly found in native clients, as demonstrated in the examples.

Cons

CGO Dependency for Drivers

Drivers like ODBC and godror require CGO, complicating cross-platform builds and setup, as noted in the build tags section, which can hinder easy installation.

Incomplete Native Feature Support

While aiming for psql compatibility, it may not support all database-specific commands or advanced features, limiting use for specialized tasks.

Complex Build Configuration

Requires understanding build tags (e.g., 'most', 'all') to include specific drivers, adding overhead compared to using simple, pre-packaged native clients.

Frequently Asked Questions

Quick Stats

Stars9,988
Forks391
Contributors0
Open Issues91
Last commit1 month ago
CreatedSince 2017

Tags

#database#postgresql-compatible#devops#database-tool#database-administration#microsoft-sql-server#multi-database#postgresql#mariadb#golang#mysql#sql-client#sqlite3#command-line#go#oracle-database#sql

Built With

G
Go

Included in

Shell36.8kCommand-Line Apps19.2kDatabase Tools5.1k
Auto-fetched 1 day ago

Related Projects

fuckfuck

Magnificent app which corrects your previous console command.

Stars97,282
Forks3,946
Last commit1 year ago
fzffzf

:cherry_blossom: A command-line fuzzy finder

Stars80,921
Forks2,804
Last commit1 day ago
ripgrepripgrep

ripgrep recursively searches directories for a regex pattern while respecting your gitignore

Stars64,877
Forks2,597
Last commit3 days ago
fdfd

A simple, fast and user-friendly alternative to 'find'

Stars43,270
Forks1,072
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