better-drizzle is a type-safe repository helper library designed to work with Drizzle ORM, aiming to simplify and streamline database operations in JavaScript and TypeScript projects. The tool addresses the common challenge of repetitive query code by wrapping the Drizzle client and generating a consistent repository API for each table, all while preserving Drizzle's type safety.
Key features include automatic support for reads, writes, relation loading, pagination, hooks, and plugins across database tables. It enables typed nested filters, allowing queries across relations using operators such as some, every, none, and is, inferred directly from the Drizzle schema without requiring manual subqueries. Pagination is standardized, with both offset and cursor approaches returning a unified structure that includes data and pagination metadata such as count, hasNext, and hasPrevious. The library also provides transaction support, including nested transactions, opt-in retries, explicit rollback, and afterCommit or afterRollback callbacks, all accessible from a single client interface.
better-drizzle supports first-class plugins, with official options for timestamps and soft delete functionality. These plugins can add typed arguments, rewrite operations, and extend delegates, centralizing behavior management. Users can also create custom plugins with transforms, lifecycle hooks, and typed operation arguments. Lifecycle hooks are available for auditing, tracing, and authorization, allowing these concerns to be handled in a single location rather than distributed across the codebase. For advanced needs, the tool exposes raw SQL methods, including $raw, $executeRaw, and a guarded $rawUnsafe, enabling direct SQL execution when necessary.
Performance benchmarks indicate that reads through better-drizzle can use significantly less memory and have comparable or improved latency compared to raw Drizzle usage. The tool does not require code generation or build steps and is compatible with existing databases, supporting PostgreSQL, SQLite, and MySQL through Drizzle's drivers. Installation is available via npm, pnpm, or bun.
In the Frameworks & SDKs space, better-drizzle takes a focused approach. It focuses on reducing repetitive query code and improving type safety when using Drizzle ORM in JavaScript/TypeScript projects. better-drizzle is an open-source project aimed at javaScript and TypeScript developers using Drizzle ORM. The project is open source (Apache-2.0). The product ships for the command line.
It is developed by almeidazs, and the product first shipped in 2026. The project is developed in the open on GitHub with 251 stars and 90 commits in the last 90 days. Among its 5 catalogued features are type-safe queries, relation loading, and pagination.
Latest indexed changes and source events
almeidazs/better-drizzle verified by the PulseGate indexer
Other apps tracked under the same category.