Skip to content
query-cli

>_ query_cliTerminal Database Client

A keyboard-driven TUI with multi-connection support, query editor, schema explorer, and built-in AI assistance.

query-cli
query-cli·myapp(postgres)
▶ Run
Active users
SELECT id, name, email FROM users
WHERE active = true
Result
idnameemail
1Alicealice@example.com
2Bobbob@example.com
… 18 more rows
✓ 20 rows · 42 ms

See it in action

Connection Manager

Select, create, and manage your database connections from a clean terminal interface.

query-cli — Connection Select
query-cli
Select a connection
↑/↓navigate·enterconfirm·ctrl+cquit
Production DB
postgres://admin@db.example.com:5432/app
Local Dev
postgres://postgres@localhost:5432/myapp
+ New connection
Create a new database connection
Quit
Exit query-cli
query-cli — Connection Form
New PostgreSQL connection
Name:My postgres db
Host:localhost
Port:5432
Database:postgres
User:postgres
Password:
tabmove·enternext / connect·escback

Main Interface

The main screen splits into a schema explorer, query editor, and result panel — all inside your terminal.

query-cli — Main Screen
query-cli·docme(postgres)
▶ Run (F5/Ctrl+R)·Ctrl+Ssave·(F9/Ctrl+P)commands·ctrl+cquit
Explorer
DatabaseQueries
drizzle.__drizzle_migrations
pgboss.bam
pgboss.job
pgboss.job_common
pgboss.queue
pgboss.schedule
pgboss.subscription
New query
SELECT * FROM users WHERE active = true
FROM
WHERE
Result
No results yet.F5 / ctrl+r runs the statement.

Command Palette & Help

Access every feature through the searchable command palette. Never forget a shortcut — press F1 or Ctrl+H anytime.

query-cli — Command Palette
Commands
Search by name or description...
↑/↓navigate·enterrun·escclose
Execute the current query
/run
Open the command palette
/commands
Show keyboard shortcuts
/help
Pick an AI adapter and model
/ai-config
Insert @ai: at the cursor
/ask-ai
query-cli — Help
Keyboard shortcuts
F5 / Ctrl+RF5 / ⌃RRun query
F9 / Ctrl+PF9 / ⌃PCommand palette
Ctrl+S⌃SSave query
Ctrl+N⌃NNew query
Ctrl+D⌃DDelete query
Ctrl+Y⌃YCopy selection
Ctrl+H / F1⌃H / F1This help
Ctrl+C⌃CQuit
Ask AI
@ai: …Ask AI in the editor
/ask-aiInsert @ai: at the cursor
/ai-configConfigure AI adapter

AI Configuration

Configure AI providers directly in the app — no manual file editing needed.

query-cli — AI Assistant
query-cli·myapp(postgres)
▶ Run
New query
@ai: list all active users of this month
Result
SELECT * FROM users
WHERE active = true
AND created_at >= DATE_TRUNC('month', NOW())

Released under the MIT License.