/neon:setup-drizzle [--http | --ws]from neon
Set up Drizzle ORM with Neon serverless PostgreSQL
Ships in neon. Installing the plugin adds it to Claude Code.
Set up a complete Drizzle ORM configuration for Neon serverless PostgreSQL.
Check if the project has an existing package.json. If not, inform the user they need to initialize a project first.
Determine the adapter type:
--http flag: Use HTTP adapter (for serverless/edge)--ws flag: Use WebSocket adapter (for transactions)Install required dependencies:
npm install drizzle-orm @neondatabase/serverless dotenv
npm install -D drizzle-kit tsx
For WebSocket adapter, also install:
npm install ws bufferutil
npm install -D @types/ws
Create the directory structure:
src/db/schema.ts - Schema definitionssrc/db/index.ts - Database clientdrizzle.config.ts - Drizzle Kit configurationUse templates from ${CLAUDE_PLUGIN_ROOT}/templates/drizzle/:
drizzle.config.tsschema.ts as a starting pointAdd scripts to package.json:
{
"scripts": {
"db:generate": "drizzle-kit generate",
"db:migrate": "drizzle-kit migrate",
"db:push": "drizzle-kit push",
"db:studio": "drizzle-kit studio"
}
}
Create or update .env.example with required variables:
DATABASE_URL=postgresql://user:[email protected]/neondb?sslmode=require
Add .env to .gitignore if not already present.
Print next steps:
npm run db:generate to create migrationsnpm run db:migrate to apply migrationsFiles this command reads when invoked
What the command file sets; muted values are Claude Code's defaults
7-day visitors to each command page
11 commands in this plugin
/add-docsAdd Neon best practices documentation to the project/branchNeon Branch CommandCreate a Neon database branch for testing, development, or preview environments. Branches are instant copy-on-write snapshots./create-ephemeral-dbCreate an ephemeral Neon database for testing/migrateNeon Migrate CommandRun Drizzle migrations on your Neon database. Supports generate, migrate, push, and studio commands with proper connection handling./setup-auth-nextjsSet up Neon Auth for a Next.js App Router application/setup-auth-reactSet up Neon Auth for a React SPA (Vite)npx claudepluginhub innocraft-systems/innocraft-plugin --plugin neon