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

pg-docker-setup

v1.0.4

Published

Interactive CLI to spin up PostgreSQL Docker containers — works on Windows, macOS and Linux

Readme

🐘 pg-docker-setup

Interactive CLI to spin up PostgreSQL Docker containers in seconds.
Works on Windows, macOS, and Linux — no bash required.


Requirements


Usage

No install needed — just run:

npx pg-docker-setup

Or install it globally once:

npm install -g pg-docker-setup
pg-docker

What it does

The CLI walks you through every field one by one:

╔══════════════════════════════════════════════╗
║   🐘  PostgreSQL Docker Setup                ║
╚══════════════════════════════════════════════╝

  Platform : macOS
  Node     : v20.11.0

  ✔  Docker is running

  ── Container settings ────────────────────────

  Container name [postgresDB]: myapp-db
  PostgreSQL version [16]:
  Database name [mydb]: myapp
  Database user [admin]:
  Password: ********
  Host port [5432]:

  ── Review ────────────────────────────────────

  Container  : myapp-db
  Image      : postgres:16
  Database   : myapp
  User       : admin
  Password   : ********
  Port       : 5432 → 5432
  Conn str   : postgresql://admin:***@localhost:5432/myapp

  Proceed? [Y/n]:

After confirming, it pulls the image, starts the container, waits until PostgreSQL is ready, then prints everything you need:

  ✔  PostgreSQL is ready!

  Connection string:
  postgresql://admin:password@localhost:5432/myapp

  Prisma .env:
  DATABASE_URL="postgresql://admin:password@localhost:5432/myapp"

  Useful commands:
  Stop    : docker stop myapp-db
  Start   : docker start myapp-db
  Remove  : docker rm -f myapp-db
  Shell   : docker exec -it myapp-db psql -U admin -d myapp
  Logs    : docker logs myapp-db

Options / defaults

All fields have sensible defaults — just hit Enter to accept them.

| Field | Default | |---|---| | Container name | postgresDB | | PostgreSQL version | 16 | | Database name | mydb | | Database user | admin | | Password | password | | Host port | 5432 |


Platform notes

Windows — runs natively in PowerShell or cmd. No Git Bash or WSL needed. Password input is visible (no raw mode on Windows cmd), which is fine for a local dev tool.

macOS / Linux — password input is hidden as you type. Colors render in any modern terminal.

CI / non-TTY — colors are automatically disabled when output is piped or redirected.


Prisma setup

After running pg-docker, copy the printed DATABASE_URL into your .env:

DATABASE_URL="postgresql://admin:password@localhost:5432/myapp"

Then run your migrations:

npx prisma migrate dev

If you use the Neovim plugin

There's a companion Neovim plugin — pg-docker.nvim — that gives you the same workflow inside Neovim with :PgCreate, :PgQuickStart, floating output windows, and clipboard copy of DATABASE_URL.


License

MIT