rsql
Interactive SQL client for multiple databases
TLDR
SYNOPSIS
rsql [--url url] [-c query | -f file] [options]
DESCRIPTION
rsql is a command-line SQL client written in Rust that provides a unified interface for connecting to many database engines, including PostgreSQL, MySQL, MariaDB, SQLite, DuckDB, Redshift, Snowflake, SQL Server, and others. It supports both interactive mode for exploratory queries and batch mode for running SQL files and single commands from scripts.Output can be formatted as CSV, JSON, Markdown, HTML, or formatted tables, making it suitable for both human reading and data pipeline integration. The --url flag specifies a database connection URL, while -c executes a query directly and -f runs a SQL file against the specified database.
PARAMETERS
--url URL
Database connection URL (e.g. `postgres://user:pass@host/db`, `mysql://...`, `sqlite://path`).-c, --commands QUERY
Execute one or more semicolon-separated SQL commands and exit.-f, --file FILE
Execute commands from an SQL script file and exit.--format FORMAT
Output format: ascii, csv, expanded, html, json, jsonl, markdown, plain, psql, sqlite, tsv, unicode, xml, yaml.--csv
Shorthand for `--format csv`.--json
Shorthand for `--format json`.--color WHEN
Colorize output: always, auto, or never.--theme THEME
Syntax highlighting theme (e.g. solarized-dark, base16-ocean.dark).--echo MODE
Echo commands before execution: on, off, prompt.--timer
Print the elapsed time for each command.--history
Enable command history.--help
Display help information.--version
Display version information.
CAVEATS
Connection string required. Database drivers needed. Rust-based tool.
HISTORY
rsql is a command-line SQL client written in Rust, providing a unified interface for multiple database types.
