better-sqlite3
Fastest and simplest SQLite library for Node.js with synchronous API.
Databases, ORMs and clients npm MIT
Used in agent projects
162
1.3% of 12,697 public repos built with AI coding agents
Rank in databases, orms and clients
#6 of 30
by use in those projects
Downloads
11.3M
npm, last 7 days, better-sqlite3
GitHub stars
7,513
last push Aug 10, 2026
How better-sqlite3 is used
better-sqlite3 is a dependency in 162 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.3%), #6 of 30 in databases, orms and clients. The most used alternative there is Prisma. Projects that use it most often also use Vitest (51.2%), tsx (44.4%), Zod (52.5%). It is more common in projects set up for Continue (7.9%) than for Cursor (2.1%).
Often used with better-sqlite3
| Vitest | 51.2% of better-sqlite3 projects · 4.2× more than average |
|---|---|
| tsx | 44.4% of better-sqlite3 projects · 4.5× more than average |
| Zod | 52.5% of better-sqlite3 projects · 3.1× more than average |
| TypeScript | 83.3% of better-sqlite3 projects · 1.5× more than average |
| Model Context Protocol SDK (JavaScript) | 27.2% of better-sqlite3 projects · 5.7× more than average |
| Playwright (JavaScript) | 29.0% of better-sqlite3 projects · 3.3× more than average |
| Express | 24.7% of better-sqlite3 projects · 3.8× more than average |
| dotenv | 38.3% of better-sqlite3 projects · 2.4× more than average |
By coding agent
| Claude Code | 2.6% of projects set up for it |
|---|---|
| GitHub Copilot | 2.3% of projects set up for it |
| Cursor | 2.1% of projects set up for it |
| OpenAI Codex | 3.6% of projects set up for it |
| OpenCode | 4.7% of projects set up for it |
| Gemini CLI | 3.2% of projects set up for it |
| Devin Desktop | 3.6% of projects set up for it |
| Continue | 7.9% of projects set up for it |
Share of public repos configured for each agent that list better-sqlite3 as a dependency.
Install
| Package | npm install better-sqlite3 |
|---|---|
| Main stacks | TypeScript / JavaScript (124), Next.js (28), Python (4), React Native / Expo (4) |
| Example projects | LeagueAkari/LeagueAkari, wesbos/wesbos, cin12211/orca-q, ask-the-hive/the-hive, debs-obrien/debbie.codes |
Alternatives to better-sqlite3
| Tool | Used in agent projects | Downloads / wk | GitHub stars | License |
|---|---|---|---|---|
| Prisma npm Modern ORM with intuitive schema, migrations, and type-safe database queries. |
381 (3.0%) | 19M | 23 | Apache-2.0 |
| pg npm PostgreSQL client for Node.js with pure JavaScript and libpq API compatibility. |
372 (2.9%) | 63.4M | 13.2K | MIT |
| Drizzle ORM npm TypeScript ORM for SQL databases with type safety and zero-runtime overhead. |
323 (2.5%) | 27.2M | 36K | Apache-2.0 |
| Drizzle Kit npm CLI migration tool for Drizzle ORM that auto-generates SQL migrations intelligently. |
309 (2.4%) | 22.3M | 36K | MIT |
| SQLAlchemy pypi Python SQL toolkit and object-relational mapper for database abstraction. |
250 (2.0%) | 85.7M | 12.2K | — |
| psycopg2 pypi Popular PostgreSQL adapter for Python with full database access and query execution. |
143 (1.1%) | 50.7M | 3,656 | LGPL with exceptions |
| Mongoose npm MongoDB object modeling library providing schema validation and query building. |
142 (1.1%) | 6.6M | 27.5K | MIT |
| Neon Serverless Driver npm PostgreSQL driver optimized for serverless environments from Neon. |
126 (1.0%) | 4.5M | 552 | MIT |