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 🙏

© 2025 – Pkg Stats / Ryan Hefner

@prisma/ppg-tunnel

v0.4.0

Published

A CLI for tunneling TCP traffic to Prisma Postgres

Downloads

4,401

Readme

Prisma Postgres TCP Tunnel

[!WARNING]
This package has been deprecated in favor of direct TCP connections, please use those if you want to interact with Prisma Postgres with another library/tool than Prisma ORM.

@prisma/ppg-tunnel is an authentication proxy for Prisma Postgres. It uses a Prisma Data Platform API key to connect to a secure proxy while opening a local TCP server for client connections. This enables secure connections from local tools while automatically routing traffic to and authenticating with the correct Prisma Postgres instance.

Usage

Standard mode

In this mode, the tunnel opens a connection to the database and waits for client tooling to connect.

The tunnel expects either a PDP_API_KEY or DATABASE_URL environment variable to be set. PDP_API_KEY is expected to be a Prisma Data Platform API key. DATABASE_URL is expected to be Prisma Postgres connection string. If both are set, PDP_API_KEY has precedence.

To start the proxy server, run the following command:

npx @prisma/ppg-tunnel

This will start the tunnel on a randomly assigned TCP port for client connections. The proxy handles authentication for you, so any database credentials are allowed. The tunnel will also handle encryption of traffic, so clients should be set to not require SSL.

By default, the tunnel will listen on 127.0.0.1 and a randomly assigned port. Since the tunnel provides access to your Prisma Postgres database, it should only be exposed to a trusted network. You can override the default host and port bindings with the --host and --port flags:

npx @prisma/ppg-tunnel --host 0.0.0.0 --port 5432

Interactive mode

This mode can help upgrade a Prisma Postgres Early Access database to a fresh Prisma Postgres General Availability database:

npx @prisma/ppg-tunnel migrate-from-ea

The tunnel will ask for a DATABASE_URL or API key, then use pg_dump to download the early-access database to a file in the current working directory. When the dump is finished, the tunnel will ask for an API key for the new Prisma Postgres database, and use pg_restore to migrate the dump file.

Interactive mode does not accept arguments or read API keys from the environment. It requires version 16 of the PostgreSQL client tools. You can read more about migrating from an early-access database in the official documentation.