Latest Threat Research:SANDWORM_MODE: Shai-Hulud-Style npm Worm Hijacks CI Workflows and Poisons AI Toolchains.Details
Socket
Book a DemoInstallSign in
Socket

get-db

Package Overview
Dependencies
Maintainers
1
Versions
11
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-db

create a claimable Neon database in seconds!

Source
npmnpm
Version
0.10.0
Version published
Weekly downloads
1.6K
-26.88%
Maintainers
1
Weekly downloads
 
Created
Source

get-db

CLI to help you hit the ground running without any sign-up. Instantiate a database with a single-command!

Note: This package was previously named neondb. The old package is now deprecated. If you're upgrading from neondb, simply replace it with get-db in your commands and imports.

Usage

npx get-db

CLI Usage

npx get-db [options]

Options:

  • -y, --yes Use defaults, skip prompts
  • -e, --env Path to .env file (default: ./.env)
  • -k, --key Env key for connection string (default: DATABASE_URL)
  • -p, --prefix Prefix for public env vars (default: PUBLIC_)
  • -s, --seed Path to SQL file to execute after database creation
  • -h, --help Show help

SDK/API Usage

Import the SDK:

import { instantNeon } from "get-db/sdk";

Create a claimable Neon Postgres database and save credentials to your .env:

await instantNeon({
	dotEnvFile: ".env",
	dotEnvKey: "DATABASE_URL",
	envPrefix: "PUBLIC_",
	// This below is to help us understand where usage comes from.
	// If you're publishing a library, we'd love that you re-expose a
	// referrer parameter in your lib and set this to `npm:your-lib-package-name|${referrer}`
	// So we can understand the chain better and give you all the credit you deserve!
	referrer: "npm:your-cli-package-name",
});
OptionDefaultDescriptionValidation
dotEnvFile".env"Path to env fileletters and .
dotEnvKey"DATABASE_URL"Environment variable name`SCREAMING_SNAKE_CASE
envPrefix"PUBLIC_"Prefix for public environment vars-
referrer"unknown"Referrer identifier-

Note: The Vite plugin uses VITE_ as the default envPrefix to match Vite's convention for client-side environment variables.

Returns:

PropertyDescription
databaseUrlconnection string
poolerUrlpooled connection string
claimUrlclaim link
claimExpiresAtexpiration date

Types

// Params for instantNeon
interface InstantNeonParams {
	dotEnvFile?: string;
	dotEnvKey?: string;
	envPrefix?: string;
	referrer?: string;
}

See documentation on Neon for more.

This package was templated with create-typescript-app using the Bingo engine.

Keywords

neon

FAQs

Package last updated on 24 Nov 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts