VS Code Extension · Free & Open Source · MIT Licensed

The VS Code SQL editor built for data work with AI

RunQL auto-documents your schemas and queries, it saves ERDs and charts as code, and keeps everything in your workspace — where your AI tools, your team, and your version control can actually use it.

active_users.sql — RunQL
-- RunQL: Connected to Prod Postgres
SELECT
u.id,
u.email,
COUNT(l.id) AS logins
FROM public.users u
LEFT JOIN public.logins l
ON u.id = l.user_id
GROUP BY 1, 2
ORDER BY logins DESC
LIMIT 10;
Results 10 rows · 0.04s
idemaillogins
102j.doe@co.com43
271admin@co.com38
89m.chen@co.com31

Works with

PostgreSQL MySQL DuckDB Snowflake Extensible

AI is only as good as the context you give it

Without documented schemas, indexed queries, and structured artifacts in your codebase, your AI tools are guessing — and so is everyone who joins your team.

AI generates wrong SQL without context

Your AI assistant doesn't know your tables, relationships, or what columns actually mean. Without documented schema context, every suggestion is a guess — and you spend more time fixing AI output than writing SQL yourself.

Nobody documents their database

Table descriptions live in someone's head. Column meanings are tribal knowledge. When they leave, the context leaves with them — and your AI tools, new hires, and even you next quarter are all starting from scratch.

Queries, ERDs, and charts aren't treated as code

That perfect JOIN from last month? Gone. ERDs are screenshots in Confluence. Charts are one-time renders. Nothing is indexed, searchable, version-controlled, or stored where AI and teammates can actually find it.

How it works

Connect. Query. Document. Commit.

1

Connect your database

Add connections from the sidebar explorer. RunQL introspects your schemas to power autocomplete, ERD generation, and AI context.

2

Write and run SQL

Author .sql files with schema-aware autocomplete. Run single statements or full scripts with Shift+Cmd+R. View results, edit data, and generate charts — all in the dedicated panel.

3

Document everything

Auto-generate schema descriptions, inline SQL comments, and markdown docs with AI. Every query is auto-indexed and searchable by title, tags, SQL, and description.

4

Commit your artifacts

ERDs, charts, schema snapshots, and documentation all save as human-readable JSON and Markdown in your RunQL/ folder. Diff them in PRs. Feed them to AI.

RunQL/schemas/api-db.erd.json
{
  "version": "1.0",
  "connection": "api-db",
  "tables": [
    {
      "name": "users",
      "columns": [
        { "name": "id", "type": "uuid", "pk": true },
        { "name": "email", "type": "varchar" }
      ]
    },
    {
      "name": "api_keys",
      "columns": [
        { "name": "id", "type": "int", "pk": true },
        { "name": "user_id", "type": "uuid", "fk": "users.id" }
      ]
    }
  ]
}

This file lives in your repo. Diff it. Review it. Ship it.

The SQL editor built for the AI era

Auto-document your database, index every query, and store every artifact as code — so both your team and your AI tools have the context they need.

AI-Powered Documentation

Auto-document every table and column with AI-generated descriptions. Generate inline SQL comments and structured Markdown docs. Schema context is automatically fed to your AI provider so it understands your database — not just generic SQL.

Query Library & Smart Search

Every .sql file is auto-indexed the moment you save it. Search across title, tags, SQL content, description, and metadata. Detect duplicate queries. Browse full query history with recall. Organize work into query bundles.

Everything Stored as Code

ERDs, charts, schema snapshots, descriptions, and prompt templates are all stored as .json and .md files in your workspace. Commit them to Git. Diff them in PRs. Feed them to AI agents. No proprietary formats.

Interactive ERDs

Auto-generate entity-relationship diagrams from any connection. Drag tables to customize layout. Add custom relationships. Color-coded foreign keys. ERD topology, layout, and relationships all stored as committable JSON.

Charts & Visualization

Create bar, line, pie, doughnut, scatter, and radar charts from any query result. Customize colors per dataset. AI can recommend chart types. Chart configs are stored as .chartconfig.json alongside your SQL.

Schema Management

Create new tables with full constraint support (PKs, FKs, unique, check, indexes). Edit columns and data inline. Compare schemas and tables side-by-side across environments. Backup databases with structure and data.

Advanced Results Grid

Sort, filter, and resize columns. Edit rows inline and write changes back to the database. Export results or entire tables to CSV. Virtual scrolling handles large datasets. Per-connection edit and export permissions.

Bring Your Own AI

Choose your provider: GitHub Copilot, OpenAI, Anthropic, Azure OpenAI, Ollama (local), or any OpenAI-compatible endpoint. Customize every prompt template. AI is strictly opt-in — set it to "none" and nothing leaves your machine.

And more

Multi-statement execution Schema-aware autocomplete SQL formatting Query history & recall Customizable AI prompts AI inline SQL comments AI Markdown doc generation Custom chart colors Data & column editors Table creation Database backup Schema comparison & diff Production safety tags SSL connections SSH tunneling Query bundles Duplicate query detection Stored procedures & functions CodeLens toolbar Custom ERD relationships Per-connection permissions CSV export (results & tables)

Connect to what you use

Built-in support for popular databases, with an extensible architecture for everything else.

PostgreSQL

Built-in

MySQL

Built-in

DuckDB

Built-in

Snowflake

Add-on Extension

Built to extend

RunQL exposes a public extension API. Third-party VS Code extensions can register new database providers and query adapters — just like the Snowflake connector does. Build support for your database and share it with the community.

Security

Offline-first.
Private by default.

RunQL works without an internet connection.

Offline-first architecture No cloud dependency. Core features work without internet.
Encrypted credential storage Passwords and keys stored in VS Code's encrypted secret storage or stored per session.
Production safety tags Tag connections as "production" to display visual warnings and prevent accidental edits.
Local file artifacts All outputs are local files. No proprietary cloud formats or vendor lock-in.
AI is completely optional Set the AI provider to "none" and no data ever reaches an LLM. Configurable per-workspace.
SSL & SSH tunneling Connect over SSL (disable, require, verify-ca, verify-full) or tunnel through SSH with password or private key authentication.
Open source under MIT Read every line. Audit the code. Contribute improvements.

Need data access governance?

RunQL is also the official client for SecureQL — a database proxy that adds enterprise security controls without changing how you write SQL.

  • Per-user API key authentication
  • Identifiable audit trail for every query
  • Sensitive column tagging and access reporting for PII, PHI, PCI, and other data
  • One-click user access revocation
  • Admin-controlled data export and editing permissions
Analyst or Engineer
SELECT *
SecureQL

SecureQL

Verified Identity
Classify Data Access
Audit Log
Authorized
Your Databases
Audit Log
Searchable Audit Trail

Frequently asked questions

AI coding tools like Copilot, Claude, and Cursor generate better SQL when they understand your schema. RunQL auto-documents your tables, columns, and relationships into files that live in your workspace. Your AI tools pick up that context automatically — no copy-pasting schema definitions, no hand-written descriptions. The result: AI suggestions that actually understand your data model instead of generic guesses.

Saved queries, schema documentation, ERD diagrams, and charts are all stored as files in your project. That means they're version-controlled, reviewable in pull requests, and available to your entire team. No more digging through a standalone tool's proprietary storage to find that query someone wrote last quarter.

RunQL reads your live schema and generates documentation for tables, columns, and relationships with a single click. If you have an AI provider configured, it can also generate human-readable descriptions based on column names, types, and context. Everything is automatically indexed so you can search across all your documentation, queries, and metadata instantly.

Those are solid tools, but they live outside your editor — which means your AI coding tools can't see your schema, your saved queries, or your ERDs. RunQL keeps everything inside VS Code as workspace files. Your AI assistant gets full database context, your queries are version-controlled alongside your application code, and you skip the extra RAM for another Electron or JVM app.

Yes. Run a query and visualize the results as a chart directly in VS Code — bar, line, pie, and more with customizable colors. ERDs are generated automatically from your schema and can be customized to focus on the tables you care about. Both charts and ERDs are stored as code files in your workspace, so they're versioned, diffable, and always up to date.

Yes. RunQL is open source under the MIT license. Install it directly from the VS Code Marketplace at no cost.

PostgreSQL, MySQL, and DuckDB are built in. Snowflake is supported via a separate add-on extension. RunQL also exposes a public extension API so the community can build adapters for additional database types.

Snowflake is supported through a separate VS Code extension (runql-snowflake) that registers itself with RunQL's adapter API. Install it alongside RunQL and Snowflake appears as a connection type in the explorer. This is the same pattern any community member can use to add support for other databases.

No. All AI features are completely opt-in. Set the AI provider to "none" in settings and the extension works entirely offline. You still get auto-documentation, schema snapshots, ERDs, charts, query search, and everything-as-code — all without any external service. When you do want AI, you choose the provider: VS Code's built-in LM API (including GitHub Copilot), OpenAI, Anthropic, Azure OpenAI, Ollama (local), or any OpenAI-compatible endpoint.

SecureQL is a database governance proxy designed for regulated industries. It sits between RunQL and your database to enforce per-user access control, log every query with identity attribution, and tag sensitive columns. RunQL is the official client — the workflow feels identical, but every query passes through SecureQL's security layer.

RunQL is offline-first by design. Database credentials are stored in VS Code's encrypted secret storage and never written to plain-text settings files. Connections support SSL (with full mode options on PostgreSQL and MySQL) and SSH tunneling with password or private-key authentication. All generated artifacts — schemas, ERDs, docs — are local files in your workspace. The extension is open source under MIT, so you can audit every line of code.

Better context in. Better SQL out.

Install RunQL from the VS Code Marketplace. Free, open source, and ready in under a minute.