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

semanticql

v1.0.3

Published

Simplified semantic SQL shell for PostgreSQL

Readme

SemanticQL

SemanticQL is a lightweight CLI that lets you query PostgreSQL in plain English directly from your terminal without AI agents or heavy abstractions.

The Philosophy

This is an experimental project built to understand the under-the-hood structure of parsers, tokenizers, and ASTs (Abstract Syntax Trees). The goal is to make everyday database lookups feel fast, intuitive, and less annoying.

You do need reasonably clear English, but you definitely don't need to be Shashi Tharoor. Simple, everyday words are all it takes.

Before:

SELECT *
FROM startups
WHERE founder_name LIKE 'sam%'
ORDER BY funding DESC;

After:

semanticql > show startups with founder_name starts with sam sort by funding desc

yes! that simple.

Installation

If PostgreSQL is already configured locally (psql setup), SemanticQL automatically uses the existing connection configuration. SemanticQL is a CLI tool, so you should install it globally.


# 1. Install globally:
npm install -g semanticql


# 2. Start the CLI:
semanticql db_name

Connecting without psql config

SemanticQL also accepts psql-style connection flags, so it works on macOS, Windows, Linux, and environments where psql is not already configured. If no flags are provided, SemanticQL will automatically fallback to your system defaults:

semanticql -d db_name -h localhost -p 5432 -U postgres -W
semanticql --url postgres://postgres:password@localhost:5432/db_name

You can also use PostgreSQL-compatible environment variables:

PGDATABASE=db_name PGHOST=localhost PGPORT=5432 PGUSER=postgres PGPASSWORD=password semanticql

SemanticQL also recognizes DATABASE_URL, DB_NAME, DB_HOST, DB_PORT, DB_USER, and DB_PASSWORD.

Usage Examples

1. Built-in Cheat Sheet

Don't remember the syntax? You don't have to exit the shell to check!

just type \g or grammar to instantly view the syntax cheat sheet and examples.

semanticql > \g

We can also view grammer sheet outside of semanticQL REPL?

semanticql --grammar

# Or use the short flag:
semanticql -g

2. Normal Mode

try typing:

semanticql > show users
semanticql > how many website
semanticql > top 10 orders sort by amount descending
semanticql > show name, email from customers where age is greater than 18

3. Debug Mode

Want to inspect the generated SQL?

semanticql > show users -d

4. Raw SQL Mode

Need to bypass the SemanticQL engine completely?

semanticql > -r SELECT * FROM pg_stat_activity;

Contributing!

We <3 contributions big and small: it is a fantastic playground for developers wanting to learn how languages and databases work under the hood.

How you can help:

  1. Fork the repo and explore the src/core pipeline (Normaliser -> Tokeniser -> Parser -> SQL Builder).
  2. Add a new language parser: Want to support lowest, average, or new filter words?
  3. Submit a PR: We welcome all PRs, from documentation tweaks to massive engine overhauls.

Feel free to open an issue if you have a cool idea or find a bug!


Hey! If you're reading this, you've proven yourself as a dedicated README reader. You might also make a great addition to our community.