npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

query-cli

v1.0.8

Published

Terminal database client

Readme

query-cli

A terminal database client with a keyboard-driven TUI, multi-connection support, and built-in AI assistance.

Bun TypeScript npm

Features

  • Multi-database support — PostgreSQL, SQLite, and MySQL
  • Keyboard-driven TUI — built with OpenTUI and React
  • Query editor — tabbed queries with syntax highlighting, save/rename, and clipboard copy
  • Schema explorer — browse tables, columns, and indexes side-by-side
  • AI assistant — generate and explain SQL using Anthropic, OpenAI, OpenRouter, or Google Gemini
  • Slash commands — quick actions like /export, /clear, /quit, and more
  • Connection manager — save, edit, and switch between database connections

Install

# npm
npm i -g query-cli

# pnpm
pnpm add -g query-cli

# yarn
yarn global add query-cli

# bun
bun add -g query-cli

Or run once without installing:

npx query-cli

query-cli is distributed as a self-contained binary per platform, so you don't need Bun or Node.js installed.

Homebrew and Winget distribution is planned. See PUBLISHING.md for the current npm-based distribution model.

Usage

query-cli

On first launch, you'll land on the connection selection screen. Add a new connection, pick a driver, and start querying.

Keybindings

| Key (Linux / Windows) | macOS | Action | |---|---|---| | F5 / Ctrl + R | F5 / Control + R | Run query | | F9 / Ctrl + P | F9 / Control + P | Open command palette | | Ctrl + S | Control + S | Save query | | Ctrl + N | Control + N | New query | | Ctrl + D | Control + D | Delete query | | Ctrl + Y | Control + Y | Copy selection to clipboard | | F1 / Ctrl + H | F1 / Control + H | Show keyboard shortcuts help | | Ctrl + C | Control + C | Quit |

Note: Ctrl+S may freeze some Unix terminals (XOFF). Press Ctrl+Q to resume, or disable flow control with stty -ixon.

Tab management (new, switch, save, rename, delete) and other actions are available through slash commands in the editor — type / to see the list.

Configuration

Saved connections and queries are stored in:

~/.config/query-cli/
├── connections.json
└── queries/

AI provider settings (API keys, model selection) are configured in-app via the AI Config modal (Ctrl + P → "Configure AI").

Supported AI Providers

  • Anthropic (Claude)
  • OpenAI (GPT)
  • OpenRouter
  • Google Gemini

Supported Databases

| Driver | Status | |--------|--------| | PostgreSQL | ✅ | | SQLite | ✅ | | MySQL | ✅ |

Release

Releases are built and published via GitHub Actions. See PUBLISHING.md for details on the multi-platform binary distribution model.

License

MIT