productdevbook

Type-safe SQL query builder. Zero dependencies, AST-first, hookable, tree-shakeable. Pure TypeScript.

36
0
100% credibility
Found Apr 04, 2026 at 36 stars -- GitGems finds repos before they trend. Get early access to the next one.
Sign Up Free
AI Analysis
TypeScript
AI Summary

Sumak is a TypeScript library that lets you build type-safe SQL queries for PostgreSQL, MySQL, SQLite, and SQL Server with automatic type checking and dialect-aware SQL generation.

How It Works

1
🔍 Discover sumak

You hear about sumak while searching for a simple way to talk to your database without making mistakes.

2
📦 Add to your project

You bring sumak into your work with a quick, easy step.

3
📋 Describe your tables

You list out your data tables and their fields in plain terms.

4
Build your first query

You create a search or update command using friendly guides that catch errors before they happen.

5
🔄 Add joins or extras

You connect multiple tables or add sorting and limits just as easily.

6
See the ready SQL

You preview the exact database instructions it creates, perfect every time.

🎉 Safe database magic

Your app now chats with the database confidently, with types ensuring no surprises.

Sign up to see the full architecture

5 more

Sign Up Free

Star Growth

See how this repo grew from 36 to 36 stars Sign Up Free
Repurpose This Repo

Repurpose is a Pro feature

Generate ready-to-use prompts for X threads, LinkedIn posts, blog posts, YouTube scripts, and more -- with full repo context baked in.

Unlock Repurpose
AI-Generated Review

What is sumak?

Sumak is a pure TypeScript type-safe SQL query builder for Postgres, MySQL, SQLite, and MSSQL. Define table schemas once, then chain fluent APIs for selects, inserts, updates, deletes, joins, window functions, CTEs, and full-text search—everything compiles to clean SQL strings with params. Zero dependencies, tree-shakeable, and hookable, it delivers type safe sql typescript that works in Node, browsers, or Deno.

Why is it gaining traction?

Its AST-first design ensures precise, dialect-aware SQL without template hacks or codegen, standing out from Prisma or Kysely with auto type inference and plugins for soft deletes or schema prefixes. Hookable lifecycle lets you inject logging or multi-tenancy easily, while the callback API makes complex type safe sql queries readable: `where(({ age, active }) => and(age.gte(18), active.eq(true)))`.

Who should use this?

TypeScript full-stack devs building REST APIs or serverless functions with SQL backends, seeking Prisma-like type safety without schema migrations or runtime overhead. Perfect for those inspired by go type safe sql, rust type safe sql, or java type safe sql patterns but needing a lightweight, pure TypeScript builder.

Verdict

Solid pick for type safe sql query builder needs—install via npm, tweak the playground, and ship. At 36 stars and 1.0% credibility, it's early-stage with great docs but light tests; prototype first, watch for 1.0.

(187 words)

Sign up to read the full AI review Sign Up Free

Similar repos coming soon.