npx create-db is an open-source CLI from Prisma that provisions a temporary Postgres database in seconds with no sign-up required. Databases live for 24 hours and auto-delete, but can be claimed permanently via a URL. The --json flag makes output machine-readable, enabling AI coding agents like Cursor, Claude Code, and Codex to provision and use real Postgres databases autonomously. Compared to Docker (requires a daemon), SQLite (dialect mismatches), and mocks (hide real SQL bugs), create-db offers real PostgreSQL in restricted agent sandboxes with zero setup. Key use cases include testing migrations safely, reproducing production bugs, running integration tests without Docker, and giving parallel agents isolated database state.
Table of contents
What is npx create-db?Why coding agents need ephemeral databasesHow create-db compares to Docker, SQLite, and mocksHow an agent provisions a database with --jsonWhat agents use it forTeach your agent to reach for itThe trade-offsFrequently asked questionsTry it674 Impressions