Installation
Requirements
- Bun (used for development & compilation)
- Or no runtime at all if you use the prebuilt binary
Install from npm
bash
# npm
npm i -g query-cli
# pnpm
pnpm add -g query-cli
# yarn
yarn global add query-cli
# bun
bun add -g query-cliRun without installing
bash
npx query-cliPrebuilt binary
query-cli is distributed as a self-contained binary per platform. See the GitHub Releases page to download the binary for your OS.
Homebrew and Winget distribution is planned.
Development
If you want to build from source:
bash
git clone https://github.com/Tranthanh98/query-cli.git
cd query-cli
bun install
bun run startFirst Launch
After installation, simply run:
bash
query-cliYou'll land on the connection selection screen. From there:
- Select + New connection
- Pick your database driver
- Fill in connection details
- Start querying
query-cli — Connection Select
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
Configuration files
Saved connections and queries are stored in:
~/.config/query-cli/
├── connections.json
└── queries/AI provider settings are configured in-app via the AI Config modal (Ctrl + P → "Configure AI").
See the Configuration page for more details.