What problem does it solve?
Create and manage Replit's built-in PostgreSQL databases, check status, execute SQL queries with safety checks, and run read-only queries against the production database. Use when the user wants to check prod data, debug database issues in production, or asks to "check the prod db", "query production", "look at live data", or "see what's in the database on the deployed app".
Core Features & Use Cases
- Check database provisioning with checkDatabase() to confirm readiness.
- Create or verify a PostgreSQL database with createDatabase(), returning environment variables like DATABASE_URL and PGHOST.
- Execute SQL safely with executeSql(), supporting targets such as replit_database, bigquery, databricks, and snowflake, with development and production modes and built-in safety guards.
- Run read-only queries against production replicas and perform data inspection while protecting sensitive operations; can also query data warehouses for analytics.
Quick Start
Ask the AI to check the database status and run a simple SELECT query to verify connectivity.