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

tusk-cli

v0.1.0

Published

Automate the synchronization of sanitized PostgreSQL schemas and seed data from remote sources into high-fidelity local Docker development environments.

Readme


Tusk CLI

Tusk CLI is a pragmatic tool designed for Senior DBREs and Backend Engineers to synchronize Schema (DDL) and seed data from remote PostgreSQL Databases into a local Dockerized environment.


🏗 Architecture

Tusk bridges the gap between complex remote cloud databases and your local development workflow.

Architecture Diagram

🔄 Lifecycle Workflow

Understand how Tusk manages your data lifecycle from discovery to operations.

Workflow Diagram


🚀 Quick Start

1. Check your environment

Ensure you have the required system tools (psql, docker, node).

Environment Check Demo

tusk ops:env:check

2. Scaffold your config

Initialize your tusk.yaml and directory structure.

tusk init

3. Generate Local DDL

Extract sanitized schema from your remote sources.

DDL Generation Demo

tusk generate:db:ddl

📖 Documentation


🔌 Local Connectivity

Once your Docker environment is running, you can connect to your local databases using the following settings:

  • Host: 127.0.0.1 (Preferred over localhost to avoid IPv6 conflicts)
  • Port: 5432
  • User: postgres (default)
  • Password: postgres (or as defined in your environment)
  • SSL: Disabled

💻 Command Line (via Docker)

docker exec -it tusk-local-db psql -U postgres -d local_db

💻 Command Line (Native psql)

psql -h 127.0.0.1 -U postgres -d local_db

🎨 GUI Tools (PGAdmin / DBeaver)

Create a new connection pointing to 127.0.0.1:5432 with the credentials above. Disable SSL requirements for local development.


✨ Key Features

  • AWS Sanitization: Automatically comments out cloud-exclusive extensions (aws_s3, rds_tools, etc.).
  • Smart Seeding: Supports pg_dump, Custom SQL, CSV, and high-fidelity Faker data.
  • Prisma Integration: Uses Prisma Migrate Diff for schema comparison and deployment planning.
  • Source Mocking: Generate "Mock Remotes" to test your sync pipeline locally.

🛠 Command Reference

generate Namespace

| Command | Options | Description | | :--- | :--- | :--- | | db:init | -f, --force | Generates 000_init.sql to create configured databases. | | db:ddl | -b, --database, -f, --force | Extracts sanitized schema from remote sources. | | db:seed | -f, --force | Populates data using Dump, Faker, CSV, or Query methods. | | db:reset | -f, --force | Full reset: Resets config, cleans artifacts, and re-scaffolds demo. | | db:query | -f, --file, -v, --verbose, --force | Executes a remote query and generates a local seed artifact. | | config:csv | N/A | Generates an example CSV scaffold. | | config:faker | N/A | Generates an example Faker YAML scaffold. | | config:query | -t, --table, -f, --force | Generates a custom SQL query scaffold with metadata. | | config:db | -n, --name | Appends a new database configuration template to tusk.yaml. | | config:reset | -f, --force | Resets tusk.yaml to the default demo configuration. | | diagram:mmd | -f, --force | Generates Mermaid source files. | | diagram:render | -f, --force | Renders Mermaid files to PNG. | | demo:tape | -f, --force | Generates VHS tape source files. | | demo:render | -f, --force | Renders VHS tapes to GIFs. | | test:source | -c, --context | Generates a mock remote database suite for testing. |

ops Namespace

| Command | Options | Description | | :--- | :--- | :--- | | env:check | N/A | Verifies system health, port 5432, and .pgpass. | | env:test | N/A | Execute a self-test by running all commands in dry-run mode. | | db:check | N/A | Verifies connectivity and privileges for remote sources. | | db:sync | N/A | Loads generated data artifacts into the local container. | | db:diff | N/A | Wrapper for Prisma migrate diff (Schema comparison). |

bundle Namespace

| Command | Options | Description | | :--- | :--- | :--- | | prep:deploy | -s, --slug | Generates a grouped deployment plan artifact for DBA review. | | prep:revert | -s, --slug | Generates a grouped rollback artifact for DBA review. | | prep:verify | -s, --slug | Generates a grouped verification artifact using DO blocks. |

cleanup Namespace

| Command | Options | Description | | :--- | :--- | :--- | | db:artifacts | -f, --force | Removes all SQL artifacts and documentation assets. | | docs:all | -f, --force | Removes all documentation assets (MMD, PNG, Tapes, GIFs). | | docs:diagram | -f, --force | Removes only diagram assets (MMD, PNG). | | docs:demo | -f, --force | Removes only demo assets (Tapes, GIFs). | | test:source | -f, --force | Removes all generated mock source data. |


Global Note: All commands (except ops:env:check) support the -d, --dry-run flag to simulate execution without modifying the filesystem or database.

✨ Key Features