Skip to content
/ sqluv Public

simple terminal UI for RDBMS & local/https/s3 CSV/TSV/LTSV

License

Notifications You must be signed in to change notification settings

nao1215/sqluv

Repository files navigation

dbms_demo

The sqluv (sql + love) provides a simple text user interface for multiple DBMSs and CSV/TSV/LTSV (local/http/https/s3) files. You execute SQL queries for the connected DBMS or local/http/https files. The sqluv has the color theme feature, so you can change the color theme to your liking.

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. sqluv can not update or delete data in the local file, but it can update or delete data in the connected DBMS.

How to install

Use "go install"

go install github.com/nao1215/sqluv@latest

Use homebrew

brew install nao1215/tap/sqluv

Supported OS, File Format, DBMS, go version

  • Windows/macOS/Linux
  • CSV/TSV/LTSV (file://, http://, https://)
  • MySQL/PostgreSQL/SQLite3/SQL Server
  • go1.24 or later

How to use

Syntax

sqluv [FILE_PATHS/HTTP URL/HTTPS URL]  ※ Supported file formats: CSV, TSV, LTSV

Connect to DBMS

When you start the sqluv command without specifying a file path, the following screen will appear.

first_screen

Please enter the connection information for the DBMS you want to connect to.

dbms_connection

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.

dbms_list

home_screen

SQL query history

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.

history_button

If you select a history, the SQL query will be copied to the query text area.

history_list

Read from a file

Please specify a file path (or url) when executing the sqluv command. 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.

sqluv_demo

Key bindings

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 + t Change the theme
TAB Move to the next field
Shift + TAB Move to the previous field

Color theme

Defaulut

color_default

Sublime

color_sublime

VS Code

color_vscode

Atom

color_atom

Dark

color_dark

Light

color_light

Solarized

color_solarized

Monokai

color_monokai

Nord

color_nord

Cappuccino

color_cappuccino

Gruvbox

color_gruvbox

Tokyo Night

color_tokyo_night

Dracula

color_dracula

Altenative Tools

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

Contributing

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!

Star History Chart

Contact

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.

LICENSE

MIT License