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

@truthmaker/db-connect

v0.1.2

Published

Connect your database to Truth Maker securely via an outbound-only tunnel

Readme

@truthmaker/db-connect

Securely connect your database to Truth Maker from inside your network.

How It Works

┌─────────────────────────────────────────────────────────────────┐
│ Your Network (VPC/On-prem)                                      │
│                                                                 │
│  ┌──────────┐      ┌─────────────────────────────────────────┐  │
│  │ Database │◄────►│ truthmaker-db-connect                   │  │
│  └──────────┘      │                                         │  │
│                    │ • Introspects schema (tables, columns)  │  │
│                    │ • Opens outbound WebSocket tunnel       │  │
│                    │ • Executes validated queries            │  │
│                    │ • Returns sanitized results             │  │
│                    └───────────────┬─────────────────────────┘  │
│                                    │ Outbound only (port 443)   │
└────────────────────────────────────┼────────────────────────────┘
                                     ▼
                          Truth Maker Cloud

Quick Start

1. Setup

npx @truthmaker/db-connect setup

This will:

  • Scan for databases (environment variables, config files, Docker)
  • Let you select or enter a connection string
  • Test the connection
  • Introspect the schema
  • Save configuration locally

2. Connect

npx @truthmaker/db-connect connect

This starts the tunnel. Keep it running while you want Truth Maker to access your database.

3. Check Status

npx @truthmaker/db-connect status

Database Discovery

The setup command automatically scans for databases in:

| Source | What it checks | | ------------ | ------------------------------------------------------------------- | | Environment | DATABASE_URL, POSTGRES_URL, PGHOST, etc. | | Config files | .env, .env.local, config/database.yml, prisma/schema.prisma | | Credentials | ~/.pgpass | | Processes | PostgreSQL listening on port 5432 | | Docker | Running PostgreSQL containers |

Security

  • Outbound only: No inbound firewall rules needed
  • Read-only: Only SELECT queries are allowed (enforced server-side)
  • Schema-aware: Queries are validated against your discovered schema
  • No credentials stored on our servers: Connection happens from your network

Recommended: Create a Read-Only User

CREATE USER truthmaker_readonly WITH PASSWORD 'your-secure-password';
GRANT CONNECT ON DATABASE your_database TO truthmaker_readonly;
GRANT USAGE ON SCHEMA public TO truthmaker_readonly;
GRANT SELECT ON ALL TABLES IN SCHEMA public TO truthmaker_readonly;
ALTER DEFAULT PRIVILEGES IN SCHEMA public GRANT SELECT ON TABLES TO truthmaker_readonly;

Configuration

Configuration is stored locally at:

  • macOS: ~/Library/Preferences/truthmaker-db-connect-nodejs/config.json
  • Linux: ~/.config/truthmaker-db-connect-nodejs/config.json
  • Windows: %APPDATA%\truthmaker-db-connect-nodejs\Config\config.json

Environment Variables

| Variable | Description | | ----------------------- | ----------------------------------------------------------------------------- | | TRUTHMAKER_TUNNEL_URL | Override tunnel server URL (default: wss://api.truthmaker.io/api/tunnel/ws) |

Supported Databases

Currently supported:

  • PostgreSQL 12+

Coming soon:

  • MySQL 8+
  • SQL Server
  • Snowflake
  • BigQuery