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.

LobeHub: Your Chief Agent Operator for AI Team Orchestration
August 8, 2026
LobeHub acts as a Chief Agent Operator, streamlining the management of your AI team. It enables hiring, scheduling, and reporting on agents for 24/7 operations, allowing users to maintain control without constant online presence. This platform transforms individual AI tools into a cohesive, productive team.

Memori: Agent-Native Memory Infrastructure for LLM Production Systems
August 6, 2026
Memori provides agent-native memory infrastructure, offering an LLM-agnostic layer that transforms agent execution and conversations into structured, persistent state. Designed for enterprise use, it seamlessly integrates with existing data infrastructure and supports various deployment environments, ensuring robust memory management for AI agents.

Leetcode Patterns: A Pattern-Based Approach to Technical Interview Prep
July 18, 2026
Leetcode Patterns is a highly-starred GitHub repository offering a structured, pattern-based approach to mastering technical interview questions. It helps individuals improve problem-solving skills by grouping LeetCode problems under specific subtopics, allowing for focused practice and application of common algorithms and data structures.

TencentDB Agent Memory: Enhancing AI Agents with Layered Long-Term Memory
July 7, 2026
TencentDB Agent Memory provides AI agents with fully local, long-term memory through a 4-tier progressive pipeline, eliminating external API dependencies. It significantly reduces token usage and improves task success rates by employing symbolic short-term memory and layered long-term memory. This innovative approach helps agents learn workflows and retain context more effectively.
Source repository
Open the original repository on GitHub.
11 counted GitHub visits