I've been using Bun for a while and kept running into the same problem: every SQL library either requires Node.js internals, leans heavily on an ORM abstraction I don't want, or generates types from a schema file at build time.
So I built squn — a lightweight, type-safe SQL query library that works natively with Bun's built-in database clients.
The core idea
Every query goes through a tagged template literal called sql. Interpolated values always become bound parameters — they are never concatenated into the SQL string. SQL injection is structurally impossible by design.
import { createDb, PostgresAdapter, sql } from "@phonemyatt/squn";








