Drizzle ORM: A Headless TypeScript ORM for Modern Web Development
This repository profile is provided by osrepos.com, an open source repository discovery platform.

Summary
Drizzle ORM is a modern, lightweight, and headless TypeScript ORM designed for NodeJS, TypeScript, and JavaScript environments. It offers robust support for various SQL databases, including serverless options, and emphasizes type-safety and extensibility. With over 31,000 stars, Drizzle ORM is a popular choice for developers seeking a performant and flexible solution for their data interactions.
Repository Information
Topics
Click on any tag to explore related repositories
Use at your own risk
OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.
Introduction
Drizzle ORM is a powerful and lightweight headless ORM built for TypeScript and JavaScript. It provides a modern approach to interacting with SQL databases, focusing on performance, type-safety, and developer experience. Supporting PostgreSQL, MySQL, and SQLite, Drizzle ORM is designed to work seamlessly across various environments, including serverless functions and edge runtimes. Its zero-dependency architecture and tree-shakeable design make it an efficient choice for any project.
Installation
Getting started with Drizzle ORM is straightforward. You can install the core package using npm or yarn:
npm install drizzle-orm
# or
yarn add drizzle-orm
For database migrations and schema management, it's recommended to also install drizzle-kit:
npm install drizzle-kit
# or
yarn add drizzle-kit
Examples
Drizzle ORM allows you to define your SQL schemas using TypeScript and build both relational and SQL-like queries. Here's a basic example of defining a schema and performing a simple select query:
// schema.ts
import { pgTable, serial, text, varchar } from 'drizzle-orm/pg-core';
export const users = pgTable('users', {
id: serial('id').primaryKey(),
fullName: text('full_name'),
phone: varchar('phone', { length: 256 }),
});
// query.ts
import { eq } from 'drizzle-orm';
import { db } from './db'; // Assume db is an initialized Drizzle client
import { users } from './schema';
async function getUserById(userId: number) {
const result = await db.select().from(users).where(eq(users.id, userId));
console.log(result);
}
getUserById(1);
Why use Drizzle ORM?
Drizzle ORM stands out for several reasons:
- Lightweight and Zero Dependencies: At only ~7.4kb minified+gzipped, it's highly efficient with no external dependencies.
- Serverless-Ready: Designed to work in all major JavaScript runtimes, including NodeJS, Bun, Deno, and Cloudflare Workers, making it ideal for serverless architectures.
- Broad Database Support: Compatible with every PostgreSQL, MySQL, and SQLite database, including popular serverless providers like Turso, Neon, PlanetScale, and Vercel Postgres.
- Type-Safe and Extensible: Offers a robust TypeScript experience for declaring SQL schemas and building queries, balancing type-safety with flexibility.
- Powerful Ecosystem: Comes with
Drizzle Kitfor hassle-free migrations andDrizzle Studiofor effortless data browsing and manipulation. - Performance: Engineered for speed, allowing developers to build fast applications without introducing data proxies.
Links
Related repositories
Similar repositories that may be relevant next.

code-session-memory: Automatic Vector Memory for AI Coding Sessions
August 15, 2026
code-session-memory provides automatic vector memory for various AI coding tools like OpenCode, Claude Code, Cursor, VS Code, Codex, and Gemini CLI. It indexes new messages into a vector database after each AI agent turn, enabling semantic search across all your past coding sessions. This tool ensures memory is shared across different platforms, enhancing developer productivity.

Cloudflare Computer: Give Your Agent a Virtual Filesystem
August 14, 2026
Cloudflare Computer is an innovative project that provides a virtual filesystem within a Durable Object, allowing agents to interact with a persistent state. It offers pluggable execution backends, including containerized Linux environments and serverless Workers, enabling flexible and powerful agent computing. Currently in preview, it's ideal for experiments and prototypes leveraging Cloudflare's edge infrastructure.

SwarmClaw: Self-Hosted AI Agent Runtime for Autonomous Swarms
August 13, 2026
SwarmClaw is an open-source, self-hosted AI agent runtime and multi-agent framework designed for autonomous agent swarms. It offers durable agent memory, MCP tools, schedules, and delegation, supporting over 23 LLM providers including Claude, GPT, Gemini, OpenRouter, and Ollama. This platform serves as a practical alternative to solutions like Claude Code and LangChain for those seeking self-hosted AI agent orchestration.

json-render: The Generative UI Framework for Dynamic Interfaces
August 12, 2026
json-render is a powerful Generative UI framework that allows developers to create dynamic, personalized user interfaces from natural language prompts. It ensures reliability by constraining AI-generated output to predefined components and actions, offering a predictable and safe way to build cross-platform UIs.
Source repository
Open the original repository on GitHub.
11 counted GitHub visits