The sqluv (sql + love) is a straightforward text-based user interface designed for interacting with various Relational Database Management Systems (RDBMS) as well as CSV, TSV, and LTSV files. The sqluv read CSV, TSV, and LTSV files from local storage, HTTPS, and Amazon S3. The sqluv automatically decompresses compressed files in .gz, .bz2, .xz, and .zst formats.With sqluv, executing SQL queries becomes a user-friendly experience, allowing seamless connections to databases or local files with ease.
The sqluv is a command derived from nao1215/sqly. Its starting point is to provide a more user-friendly interface for writing SQL compared to sqly.
Warning
sqluv is under development. You use sqluv for viewer. Do not execute UPDATE or DELETE in the production environment.
- Multi-DBMS Support: Connect and interact with popular database systems like MySQL, PostgreSQL, SQLite3, and SQL Server.
- File Compatibility: Read data from files in CSV, TSV, and LTSV formats from HTTPS, S3, and local storage.
- Support Compressed File: Automatically decompresses compressed files in .gz, .bz2, .xz, and .zst.
- Query History: Save and access SQL query history for easy reference. Fuzzy search is also available.
- Customizable Themes: sqluv supports multiple color themes, enabling customization of the interface based on user preference.
go install github.com/nao1215/sqluv@latest
brew install nao1215/tap/sqluv
- Windows/macOS/Linux
- CSV/TSV/LTSV (file://, http://, https://)
- gz/bz2/xz/zst
- MySQL/PostgreSQL/SQLite3/SQL Server
- go1.24 or later
The sqluv interface prioritizes ease of use. Upon launching without specifying a file path, users are prompted to enter connection details for their database. Configuration is saved, allowing for easy reconnections in the future. Below is a brief overview of the capabilities:
sqluv [FILE_PATHS/HTTPS URL/S3 URL] ※ Supported file formats: CSV, TSV, LTSV
By running this command with the relevant file paths, users can initiate interactions with files.
When you start the sqluv command without specifying a file path, the following screen will appear.
Please enter the connection information for the DBMS you want to connect to.
If the connection is successful, database connection information will be saved in the configuration file. The next time you start the sqluv command, you will be able to select the DBMS you want to connect to from the list.
If you execute a SQL query, the history will be saved in the ~/.config/sqluv/history.db
. So, you can look up the history by pressing the history button.
The sqluv supports fuzzy search. You can search for the history by typing the keyword. If you select the history, the SQL query will be copied to the input field.
Please specify a file path (or url) when executing the sqluv command:
※ file at http/https
sqluv https://raw.githubusercontent.com/nao1215/sqluv/refs/heads/main/testdata/actor.csv
※ file at s3. file is compressed in gz format.
sqluv s3://not-exist-s3-bucket/user.csv.gz
※ Multiple files
sqluv https://raw.githubusercontent.com/nao1215/sqluv/refs/heads/main/testdata/actor.csv s3://not-exist-s3-bucket/user.tsv testdata/sample.ltsv
The file will be loaded before launching the TUI. When the sqluv import csv/tsv/ltsv, the sqluv checks the file extension and determines the file format. If the file extension is not csv/tsv/ltsv, the sqluv will display an error message. The sqluv does not automatically detect the file format.
You can save the result to a file by pressing the Ctrl + s
key. The sqluv will ask you to enter the file path. The supported file formats are CSV, TSV, and LTSV.
Key | Description |
---|---|
ESC | Quit |
Ctrl + d | Quit |
Ctrl + c | Copy the selected sql query |
Ctrl + v | Paste the copied text |
Ctrl + x | Cut the selected text |
Ctrl + s | Save the result to a file |
Ctrl + t | Change the theme |
TAB | Move to the next field |
Shift + TAB | Move to the previous field |
Name | Description |
---|---|
jorgerojas26/lazysql | A cross-platform TUI database management tool written in Go. |
vladbalmos/mitzasql | MySQL command line / text based interface client |
TaKO8Ki/gobang | A cross-platform TUI database management tool written in Rust |
First off, thanks for taking the time to contribute! See CONTRIBUTING.md for more information. Contributions are not only related to development. For example, GitHub Star motivates me to develop!
If you introduce sqluv on social media or blogs, more users will discover it, and we can gather more ideas for improvement. We hope you enjoy using sqluv!
If you would like to send comments such as "find a bug" or "request for additional features" to the developer, please use one of the following contacts.