Lightweight JavaScript library (v0.1.5, MIT) that transforms static HTML SQL code blocks into interactive, browser-based SQL execution environments using DuckDB WASM. All SQL runs client-side—no backend needed. Key differentiators: zero-config auto-init via CSS class, lazy-loaded DuckDB, framework-agnostic (vanilla JS, React, Vue), privacy-first (no external data transmission), custom theming, and init queries for DuckDB extensions. Gzipped bundle is ~9.5 kB. Built with TypeScript, ships types. Compatible with modern browsers supporting WebAssembly.
npm install sql-workbench-embeddedNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows both automatic initialization via CSS class and manual embedding with theme configuration.
Install the exact peer dep: npm install @duckdb/duckdb-wasm@^1.33.1-dev19.0
Use dynamic import: const { SQLWorkbench } = await import('sql-workbench-embedded'); or switch to ESM.Replace @latest with a specific version tag like @0.1.4 in script src.
Access via SQLWorkbench.Embed after importing the main object.
Use import { SQLWorkbench } from 'sql-workbench-embedded'; or dynamic import.npm install @duckdb/duckdb-wasm@^1.33.1-dev19.0
Ensure baseUrl is set correctly if serving WASM from custom path, or use default CDN.