Esix is a type-safe MongoDB ORM for TypeScript and Node.js (v5.4.0, monthly releases). It provides an ActiveRecord-like interface with zero configuration: define models as TypeScript classes extending BaseModel, and get automatic CRUD, query builder with where/whereIn/orderBy/limit/skip, pagination, firstOrCreate, and relationship support (hasMany). Unlike Mongoose, it requires no schema definitions and ships TypeScript types natively. Requires Node >= 20, peer dependencies mongodb ^6.0.0 and mongo-mock ^4.0.0.
npm install esixNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows defining a model class extending BaseModel, and performing create, find, update, query, and delete operations.
Use ES module imports or upgrade to Node >= 20.
Replace 'new User({...})' with 'await User.create({...})'.Use User.where({ isActive: true }).get() or User.where('isActive', true).get().Set DB_URL environment variable before using any model methods, e.g., process.env.DB_URL = 'mongodb://...'.
Add your own validation logic in model methods or before saving.
Use const titles = await Post.pluck('title'); // returns string[]Run 'npm install esix mongodb' (and optionally 'mongo-mock' for testing).
Change to import statement: import { BaseModel } from 'esix'. Ensure package.json has 'type':'module' or use .mjs extension.Set a valid MongoDB connection string: export DB_URL=mongodb://localhost:27017/myapp
Use await User.create(...) not await user.create(...).