Skip to content

cyyeh/duckdb-web

Repository files navigation

DuckDB SQL Playground

Note: This project is built with Claude Code(using Opus 4.6) by more than 95% and human-reviewed by author.

A browser-based SQL playground powered by DuckDB-WASM. Upload CSV files and query them with SQL — everything runs entirely in your browser with no server required.

Live site: https://cyyeh.github.io/duckdb-web/

Features

SQL Playground

  • In-browser SQL engine — DuckDB compiled to WebAssembly, no server required
  • CSV file upload — Drag-and-drop or click to import CSV files (up to 500 MB) with automatic schema detection
  • Sample dataset — One-click load of the Titanic dataset to get started quickly
  • SQL query editor — Write and execute queries with Ctrl+Enter
  • Results table — Sortable columns, per-column filters, and global search across results
  • EXPLAIN support — Markdown-rendered output for EXPLAIN and EXPLAIN ANALYZE queries
  • Collapsible table sidebar — Browse uploaded tables, inspect columns and types, toggle to expand your workspace

AI Agent

  • Natural language data analysis — Ask questions about your data in plain English and get SQL queries + results
  • Powered by Claude — Uses the Anthropic SDK to stream responses with tool use
  • Thinking steps — Collapsible thinking block shows the agent's reasoning and intermediate SQL queries
  • Inline query results — SQL results displayed inline within the conversation
  • Requires Anthropic API key — Enter your API key in the app to use agent mode; the key is stored in memory only and never persisted to disk or sent to any server besides the Anthropic API

Getting Started

npm install
npm run dev

Open http://localhost:5173 to use the playground.

Build

npm run build
npm run preview

Deployment

The project includes a GitHub Actions workflow that automatically deploys to GitHub Pages on push to main.

Tech Stack

License

MIT

About

A browser-based SQL playground powered by DuckDB-WASM

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors