vi-sql logo

Getting Started

Install

See the Installation page for all install options, version pinning, and build-from-source instructions.

First launch

On the first run — whether via vi-sql or vi-sql --connect — the options page opens so you can configure general settings and UI preferences. Each option includes a description in the right-hand panel, for more details visit Configuration page. Once saved, you can proceed to connecting to a database.

Connect to a database

A connection URI can be either added via Connection Form that can be opened directly from the connection list page or passed directly on the command line:

sh
vi-sql --connect postgres://user:password@localhost:5432/mydb
vi-sql --connect file:/home/user/data.db
# or add it with name that you like, name can be used later as reference
vi-sql --connect dev=postgres://user:password@localhost:5432/mydb
vi-sql --connect prod=mysql://user:password@prod.com/mydb

The driver is detected automatically from the URI scheme. You can also fill in individual fields (host, port, user, password, database) in the connection form, or connect to a saved connection by name:

sh
vi-sql --connection-name mydb

Run vi-sql --help to see all available flags.

Basic navigation

Once connected, vi-sql opens the schema browser on the left and a query editor on the right.

tip

Open the help page via F1 or the command palette via Ctrl+Space to explore all available actions.

Some other useful keybindings:

NormalVimAction
Alt+↑/↓/←/→Ctrl+k/j/h/lSwitch panels
kMove up
jMove down
Enter/SpaceEnter/SpaceOpen table from list
Ctrl+EnterCtrl+sExecute query
Ctrl+Space:Open actions palette
Ctrl+oCtrl+oOpen connections
Ctrl+cCtrl+cQuit

See the vim mode page for the full list of vim keybindings.