Skip to content

Repository files navigation

sqlens

A terminal UI for exploring SQLite databases.

uv installuv run sqlens path/to/database.sqlite

sqlens screenshot

sqlens opens databases in read-only mode.

Interface

The screen is split into two panes:

  • Left — table/view list. Navigate with /, press Enter to focus the data table.
  • Right — schema, data table, row detail, and query bar.

Data table hotkeys

KeyAction
s / SSort focused column ASC / DESC (press again to clear)
fLIKE filter on focused column (%text%)
CReset all filters and sort
cCopy focused cell value to clipboard
19, 0Toggle visibility of columns 1–10
+Add a custom SQL SELECT expression as an extra column
azRemove custom expression (when expressions exist)
EnterOpen full cell detail view
PgDn / PgUpNext / previous page (50 rows per page)
Esc / BackspaceReturn focus to table list
Ctrl+Q / Ctrl+CQuit

Column indicators

  • — visible column
  • — hidden column
  • — active LIKE filter on this column
  • / — current sort column and direction

Cell detail view

Press Enter on any cell to open a full-screen detail view. JSON values are automatically detected and rendered with syntax highlighting.

KeyAction
Ctrl+← / Ctrl+→Previous / next column (same row)
Ctrl+↑ / Ctrl+↓Previous / next row (same column)
cCopy value to clipboard
Esc / BackspaceBack to table

LIKE filter

Press f on a focused cell to open a filter input for that column. Entering text filters rows where column LIKE '%text%'. Submit empty to clear the filter for that column. Active filters are AND-ed together.

Custom expressions

Press + to add a SQL SELECT expression as an extra column (e.g. UPPER(name) AS upper_name, json_extract(data, '$.id') AS id). Press the assigned letter key (a, b, …) to remove it.

Requirements

About

Terminal UI for exploring SQLite databases with sortable tables, LIKE filters, row detail, JSON cell viewing, and read-only browsing.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Contributors

Languages