Drizzle studio

From TerminalSkills/skills · View interactive version

Drizzle studio is an AI agent skill from the GitHub repository TerminalSkills/skills. Explore and manage databases with Drizzle Studio. Use when a user asks to browse database contents visually, inspect tables and data, run ad-hoc queries, manage database records through a GUI, debug database issues, or use a lightweight alternative to pgAdmin or DBeaver. Covers setup with Drizzle OR

How to use this skill

Skill file

Drizzle Studio

Overview

Drizzle Studio is a visual database browser and admin tool that runs in your browser. Unlike heavyweight tools like pgAdmin or DBeaver, it starts in one command and works with any Drizzle ORM project. Browse tables, filter data, edit records inline, run SQL queries, and inspect relationships — all through a clean web interface. It is started by drizzle-kit studio, which opens a local server and serves the UI from local.drizzle.studio in your browser. It supports PostgreSQL, MySQL, SQLite and SingleStore. Drizzle Studio itself is closed source and free for local development; Drizzle Kit and Drizzle ORM are open source.

Instructions

Step 1: Install and configure

Studio is a command of drizzle-kit and needs drizzle-orm installed in the same project (without it the command stops with "Please install latest version of drizzle-orm"). It takes its connection from a config file; it does not read DATABASE_URL by itself.

npm install drizzle-orm
npm install -D drizzle-kit
npx drizzle-kit studio
// drizzle.config.ts - Studio reads this file by default
import { defineConfig } from 'drizzle-kit'

export default defineConfig({
  dialect: 'postgresql', // postgresql | mysql | sqlite | turso | singlestore | mssql | cockroach
  schema: './src/db/schema.ts',
  dbCredentials: {
    url: process.env.DATABASE_URL!,
  },
})

The old driver: 'pg' and dbCredentials.connectionString keys are gone from current Drizzle Kit; use dialect and url. driver now only selects special cases such as aws-data-api or pglite. For SQLite use dialect: 'sqlite' with url: './dev.db' and a SQLite driver (for example better-sqlite3) installed.

The terminal prints Drizzle Studio is up and running on https://local.drizzle.studio?port=4983. Open that link; the page talks to the server on your own machine.

Step 2: Options, ports and environments

npx drizzle-kit studio --config=drizzle-staging.config.ts   # another config file
npx drizzle-kit studio --port=4990                          # default port is 4983
npx drizzle-kit studio --verbose                            # print every SQL statement Studio runs

Step 3: What you can do in the UI

Examples

Example 1: Debug production data issues

User prompt: "I need to quickly inspect the users table and find all accounts created in the last 24 hours that haven't verified their email."

The agent will:

  1. Create drizzle-readonly.config.ts whose dbCredentials.url reads process.env.READONLY_DATABASE_URL (a role with SELECT only).
  2. Run npx drizzle-kit studio --config=drizzle-readonly.config.ts and open the printed local.drizzle.studio link.
  3. Open the users table and filter email_verified = false and created_at after yesterday, or paste the same condition into the SQL runner.
  4. Report the matching rows back to the user.

Example 2: Inspect a local SQLite database

User prompt: "Show me what is in dev.db after my seed script ran."

// drizzle.config.ts
import { defineConfig } from 'drizzle-kit'

export default defineConfig({
  dialect: 'sqlite',
  schema: './src/db/schema.ts',
  dbCredentials: { url: './dev.db' },
})
npm install drizzle-orm better-sqlite3
npx drizzle-kit studio --port=4990

Open https://local.drizzle.studio?port=4990, check that the seeded rows are in each table, and stop the server with Ctrl+C when finished.

Guidelines

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.