Neon CLI expert for serverless PostgreSQL. Use when users need to manage Neon projects, branches, databases, roles, or connection strings.
/plugin marketplace add leobrival/topographic-plugins-official/plugin install dev@topographic-plugins-officialThis skill inherits all available tools. When active, it can use any tool Claude has access to.
reference/commands-reference.mdreference/common-patterns.mdreference/troubleshooting.mdNeon is a serverless PostgreSQL platform providing instant database provisioning, branching, and scaling. This guide provides essential workflows and quick references for common Neon operations.
# Check Neon CLI installation
neon --version
# Authenticate with Neon
neon auth
# View current user
neon me
# List all projects
neon projects list
# Create new project
neon projects create --name myapp --region aws-us-east-1
# Authenticate first
neon auth
# Create project
neon projects create --name myapp --region aws-us-east-1
# Get project ID (from output or list)
neon projects list
# Create database
neon databases create --branch-id <branch_id> --name app_db
# Create application role
neon roles create --branch-id <branch_id> --name app_user --password secret123
# Get connection string
neon connection-string
# Create feature branch from main
neon branches create --project-id <project_id> --name feature/new-api --parent-id <main_branch_id>
# Add compute to branch
neon branches add-compute <feature_branch_id> --size small
# Create database for feature
neon databases create --branch-id <feature_branch_id> --name app_db
# Get connection string for development
neon connection-string feature/new-api
# After testing, delete feature branch
neon branches delete <feature_branch_id>
# Create production branch with medium compute
neon branches create --project-id <project_id> --name production
neon branches add-compute <prod_branch_id> --size medium
# Create staging branch with small compute
neon branches create --project-id <project_id> --name staging --parent-id <prod_branch_id>
neon branches add-compute <staging_branch_id> --size small
# Create development branch
neon branches create --project-id <project_id> --name development --parent-id <prod_branch_id>
# Setup databases per environment
neon databases create --branch-id <prod_branch_id> --name app_db
neon databases create --branch-id <staging_branch_id> --name app_db
neon databases create --branch-id <dev_branch_id> --name app_db
# List existing roles
neon roles list --branch-id <branch_id>
# Create application user
neon roles create --branch-id <branch_id> --name app_user --password app_password
# Create read-only user
neon roles create --branch-id <branch_id> --name readonly_user --password readonly_password
# Create migration user (for deployment scripts)
neon roles create --branch-id <branch_id> --name migration_user --password migration_password
# View IP allowlist
neon ip-allow list --project-id <project_id>
# Add specific IP
neon ip-allow add --project-id <project_id> --ip 203.0.113.42/32
# Add IP range for organization
neon ip-allow add --project-id <project_id> --ip 192.168.1.0/24
# Create VPC endpoint for private connection
neon vpc endpoint create --project-id <project_id> --region us-east-1
When to use which command:
neon projects create with name and regionneon databases create with branch IDneon roles create with branch IDneon branches create with parent IDneon connection-stringneon ip-allow for IP whitelistingneon branches createneon branches add-compute with size option# Authenticate
neon auth
# Create project
neon projects create --name myapp --region aws-us-east-1
# Setup main branch database
neon databases create --branch-id <main_branch_id> --name app_db
# Create application user
neon roles create --branch-id <main_branch_id> --name app_user --password secret
# Get connection string
neon connection-string
# Create isolated development branch
neon branches create --project-id <project_id> --name dev
# Create feature branch from development
neon branches create --project-id <project_id> --name feature/auth --parent-id <dev_branch_id>
# Add small compute for feature development
neon branches add-compute <feature_branch_id> --size small
# Export connection strings for each environment
export PROD_DATABASE_URL=$(neon connection-string production)
export STAGING_DATABASE_URL=$(neon connection-string staging)
export DEV_DATABASE_URL=$(neon connection-string dev)
# Use in deployment
docker run -e DATABASE_URL=$PROD_DATABASE_URL myapp:latest
# Delete feature branches after development
neon branches list --project-id <project_id> -o json | \
jq -r '.[] | select(.name | startswith("feature/")) | .id' | \
xargs -I {} neon branches delete {}
Common Issues:
Cannot authenticate
neon auth to complete OAuth flowBranch has no compute
neon branches add-compute <branch_id> --size smallConnection timeout
neon ip-allow add --project-id <project_id> --ip <your_ip>/32Database not found
neon databases create --branch-id <branch_id> --name app_dbProject deletion fails
For detailed troubleshooting steps, see the Troubleshooting Guide.
Load as needed for detailed information:
Commands Reference - Complete CLI command documentation with all flags and options. Use when you need exact syntax or flag details for any Neon command.
Common Patterns - Real-world patterns and workflows for project setup, multi-environment configuration, feature branching, role management, IP allowlisting, and scripting examples. Use for implementing specific workflows or automating operations.
Troubleshooting Guide - Detailed error messages, diagnosis steps, and resolution strategies for authentication, projects, branches, databases, roles, connections, and security issues. Use when encountering errors or unexpected behavior.
When to use each reference:
This skill should be used when the user asks to "create a slash command", "add a command", "write a custom command", "define command arguments", "use command frontmatter", "organize commands", "create command with file references", "interactive command", "use AskUserQuestion in command", or needs guidance on slash command structure, YAML frontmatter fields, dynamic arguments, bash execution in commands, user interaction patterns, or command development best practices for Claude Code.
This skill should be used when the user asks to "create an agent", "add an agent", "write a subagent", "agent frontmatter", "when to use description", "agent examples", "agent tools", "agent colors", "autonomous agent", or needs guidance on agent structure, system prompts, triggering conditions, or agent development best practices for Claude Code plugins.
This skill should be used when the user asks to "create a hook", "add a PreToolUse/PostToolUse/Stop hook", "validate tool use", "implement prompt-based hooks", "use ${CLAUDE_PLUGIN_ROOT}", "set up event-driven automation", "block dangerous commands", or mentions hook events (PreToolUse, PostToolUse, Stop, SubagentStop, SessionStart, SessionEnd, UserPromptSubmit, PreCompact, Notification). Provides comprehensive guidance for creating and implementing Claude Code plugin hooks with focus on advanced prompt-based hooks API.