Lightning-fast PostgreSQL TUI client built with Rust and ratatui .
export-1779633777141.mp4
Method
Command
cargo
cargo install --git https://github.com/tse-wei-chen/lite-pg
binary
Download from Releases
Press n on the connection panel to add a PostgreSQL connection profile, then Enter to connect.
Connection profile management with AES-256-GCM encrypted password storage
Schema tree browser (schemas → tables/views → columns/indexes/triggers/constraints) with batch prefetch
SQL query editor with multi-tab buffers and auto-completion
Query execution with result viewer
Server dashboard — version, uptime, active connections, database stats, active queries, table statistics
Role/user management — list, create, drop roles with attributes
Database management — list, create, drop databases with size/owner/encoding
Function/procedure browser — list functions with DDL viewer
Extension manager — list installed extensions
Server configuration viewer — browse pg_settings
Replication management — publications and subscriptions
Global object search — find objects across all schemas
Query bookmarks — save and load frequently used queries
Object DDL viewer
DROP / TRUNCATE / VACUUM with confirmation
Table data browsing with pagination
Visual mode for selecting result rows
Export results: CSV, JSON, SQL INSERT, Markdown (file / clipboard)
Query history with fuzzy search
The interface uses a vim-inspired modal design: Normal (default, navigate + trigger actions), Insert (typing SQL), Visual (select result rows).
Key
Action
Tab
Cycle focus: Schema → Query Input → Results
Esc
Open / close main menu (overlay popup)
j / k
Move selection down / up
Enter
Expand/collapse tree node, confirm action
Ctrl+T
New query tab
Ctrl+W
Close current query tab
Alt+Enter
Execute current query
F5
EXPLAIN ANALYZE current query
i
Enter Insert mode (SQL editor) / Generate INSERT template (schema tree)
/
Toggle query history
q
Quit
Key
Action
o
Generate SELECT + execute in new tab
u
Generate UPDATE template in new tab
D
Show DDL of selected object
d
Drop selected object (with confirmation)
t
Truncate selected table (with confirmation)
v
Vacuum selected table (with confirmation)
n / p
Next / previous page of browsed table data
SQL Editor (Normal mode focus on editor)
Key
Action
i
Enter Insert mode
[ / ]
Previous / next query tab
Key
Action
h / l
Scroll left / right
v
Enter Visual mode
Key
Action
Esc / v
Return to Normal mode
j / k
Extend selection down / up
Key
Action
Esc
Return to Normal mode
Key
Action
Enter
Connect to selected profile
n
New connection profile
e
Edit selected profile
d
Delete selected profile
Esc
Close panel (if connected)
Key
Action
Enter
Next field / Save
Tab
Next field
Esc
Cancel
Shift+Insert / Ctrl+V
Paste into field
Key
Action
y / Enter
Confirm
n / Esc
Cancel
Key
Action
j / k
Navigate up / down
Enter
Select item / enter submenu
Esc
Close menu / go back from submenu
Menu items: Home, Dashboard, Bookmarks, Search, Management (Roles, Databases, Functions, Extensions, Settings, Replication), Connection (Connection Manager), Export (CSV, JSON, SQL INSERT, Markdown file, Markdown clipboard), Help, Quit.
A shortcut hint bar is shown at the bottom of every page, displaying the most relevant keys for the current focus.