`neon-new` (version 0.14.0) is a specialized command-line interface (CLI) and Software Development Kit (SDK) designed to facilitate the rapid, ephemeral provisioning of new, claimable Neon PostgreSQL databases. It aims to eliminate initial setup friction by allowing developers to instantiate a functional database with a single command or function call, without requiring immediate sign-up. The package currently ships with TypeScript types and targets Node.js environments. Its primary differentiating feature is the speed and ease of obtaining a fully functional PostgreSQL connection string, which is highly beneficial for rapid prototyping, local development, and CI/CD environments where temporary, on-demand databases are advantageous. While not having a strictly defined release cadence, the project is under active development, indicated by its pre-1.0.0 versioning, and has seen frequent updates. Users should be aware that databases generated this way are temporary and will expire if not formally claimed within 72 hours, making them ideal for short-lived use cases or as an initial stepping stone before migrating to a persistent, owned Neon project.
npm install neon-newVerified import paths — ran on the pinned version, not inferred.
Demonstrates how to programmatically create a new Neon PostgreSQL database using the SDK, save its credentials to a .env file, and log the connection details and claim URL. Requires Node.js >= 22.
Upgrade your Node.js environment to version 22 or newer. Consider using a Node Version Manager (like `nvm` or `volta`) to manage different Node.js versions.
Always provide a `referrer` string in the options object, for example: `instantPostgres({ referrer: 'your-app-name', ... })`.For long-term usage, ensure you visit the provided `claimUrl` within the 72-hour window to link the database to your Neon account. For ephemeral use, be aware of the data lifetime.
It is advisable to pin your `neon-new` dependency to an exact version or to thoroughly review release notes when upgrading to new versions to anticipate and mitigate potential changes.
Ensure you pass a `referrer` string in the options, such as `{ referrer: 'your-application-identifier' }`.Switch to ES Module `import` syntax: `import { instantPostgres } from 'neon-new/sdk';`. Ensure your Node.js environment is configured for ESM (e.g., `"type": "module"` in `package.json`).To use the SDK, ensure your project's `package.json` contains `"type": "module"` or use `.mjs` file extensions for your source code. Then, use `import` statements.
Upgrade your Node.js installation to version 22 or newer. If you need to manage multiple Node.js versions, tools like `nvm` are highly recommended.
No dependency data recorded yet.