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

sqltree

v1.4.3

Published

Interactive TUI database client for PostgreSQL and MySQL

Readme

🌳 sqltree

npm version License: MIT Node.js Tests Coverage

A beautiful, interactive terminal database client for PostgreSQL and MySQL. Navigate your databases with a tree browser, run SQL in a full-screen REPL — all from your terminal.

  ╔══════════════════════════════════════╗
  ║   🌳 sqltree v1.3                    ║
  ║   PostgreSQL · MySQL · CLI Client    ║
  ╚══════════════════════════════════════╝

Features

  • Two-column TUI — tree browser on the left, detail panel on the right
  • Interactive tree navigation — browse databases, schemas, tables, and roles with arrow keys
  • Full-screen SQL REPL — press Tab or s to enter SQL mode with auto-completion
  • Two databases, one tool — PostgreSQL and MySQL with a unified interface
  • Database switching — select a different database in the tree to reconnect automatically
  • Paginated browsing — press Enter on a table to browse data page by page
  • Export — save query results to CSV or JSON
  • Saved connections — store and reuse connection profiles
  • Tab completion — SQL keywords and table names in REPL mode

Quick Start

The easiest way to use sqltree is with npx — no install needed:

# Interactive mode — guided connection setup
npx sqltree

# Connect via URI
npx sqltree --uri postgresql://user:pass@localhost:5432/mydb
npx sqltree --uri mysql://root:[email protected]:3306/app

# Connect with individual params
npx sqltree -t postgres -H localhost -p 5432 -U postgres -d mydb
npx sqltree -t mysql -H 127.0.0.1 -U root -d test

Global Install (optional)

npm install -g sqltree
sqltree

Keyboard Shortcuts

Tree Browser

| Key | Action | | ------------------- | ---------------------------- | | / k | Move up | | / j | Move down | | Enter / / l | Expand node / browse table | | / h | Collapse node / go to parent | | Tab / s | Enter SQL REPL mode | | d | Describe table structure | | e | Export last result to CSV | | r | Refresh tree | | q | Quit |

Browse Mode

| Key | Action | | --- | ------------- | | | Next page | | | Previous page | | | Exit browse | | w | Scroll up | | s | Scroll down |

SQL REPL

| Command | Action | | --------------------- | ------------------------------- | | SQL ending with ; | Execute query | | \back | Return to tree browser | | \export <csv\|json> | Export last result | | \save <name> | Save current connection profile | | Ctrl+C | Cancel / return to tree |

Saved Connections

Connection profiles are stored in ~/.sqltree/connections.json with file permissions restricted to your user (mode 0600).

Note: Profiles may contain passwords — treat this file as sensitive.

Requirements

  • Node.js 20+
  • Network access to your database server

Contributing

See CONTRIBUTING.md for guidelines.

License

MIT