Mongoose
MongoDB object modeling library providing schema validation and query building.
Databases, ORMs and clients npm MIT
Used in agent projects
142
1.1% of 12,697 public repos built with AI coding agents
Rank in databases, orms and clients
#8 of 30
by use in those projects
Downloads
6.6M
npm, last 7 days, mongoose
GitHub stars
27.5K
last push Oct 9, 2026
How Mongoose is used
Mongoose is a dependency in 142 of the 12,697 public GitHub projects set up for AI coding agents that we scanned (1.1%), #8 of 30 in databases, orms and clients. The most used alternative there is Prisma. Projects that use it most often also use dotenv (67.6%), Express (46.5%), Axios (42.3%).
Often used with Mongoose
| dotenv | 67.6% of Mongoose projects · 4.3× more than average |
|---|---|
| Express | 46.5% of Mongoose projects · 7.2× more than average |
| Axios | 42.3% of Mongoose projects · 4.2× more than average |
| cors | 35.2% of Mongoose projects · 10.6× more than average |
| jsonwebtoken | 30.3% of Mongoose projects · 16.0× more than average |
| nodemon | 28.2% of Mongoose projects · 16.0× more than average |
| bcryptjs | 25.4% of Mongoose projects · 12.6× more than average |
| Next.js | 45.8% of Mongoose projects · 2.0× more than average |
By coding agent
| GitHub Copilot | 0.9% of projects set up for it |
|---|---|
| Claude Code | 0.7% of projects set up for it |
| Cursor | 0.9% of projects set up for it |
| Devin Desktop | 3.3% of projects set up for it |
| Gemini CLI | 1.1% of projects set up for it |
Share of public repos configured for each agent that list Mongoose as a dependency.
Install
| Package | npm install mongoose |
|---|---|
| Main stacks | TypeScript / JavaScript (79), Next.js (61), React Native / Expo (1), Other (1) |
| Example projects | Luganodes/Solana-Indexer, Mebius1916/NextTalk_web, greengod63/solana-sniper-bot, Murphy-CodeLabs/murphy, terter21002/copy-trading-bot |
Alternatives to Mongoose
| 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 | — |
| better-sqlite3 npm Fastest and simplest SQLite library for Node.js with synchronous API. |
162 (1.3%) | 11.3M | 7,513 | MIT |
| psycopg2 pypi Popular PostgreSQL adapter for Python with full database access and query execution. |
143 (1.1%) | 50.7M | 3,656 | LGPL with exceptions |
| Neon Serverless Driver npm PostgreSQL driver optimized for serverless environments from Neon. |
126 (1.0%) | 4.5M | 552 | MIT |