Type-safe ORM for Azure CosmosDB NoSQL, inspired by Prisma. Version 1.0.4 (stable). Active development on GitHub. Provides a Prisma-like, fluent API over @azure/cosmos with built-in type-safe filtering, field selection, pagination, and input validation. Differentiator: eliminates raw SQL for CosmosDB, enforces TypeScript types at query time, and generates optimized queries automatically. Lightweight abstraction — not a replacement for @azure/cosmos.
npm install cosmoxNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to define types, initialize a Cosmox client with two models, and query users with filters, field selection, sorting, and pagination.
Run: npm install @azure/cosmos@latest
Provide only connectionString or only endpoint and key in the options.
Upgrade to v1.0.3+ and use t.createModel inside the models callback.
Use import syntax or dynamic import(). If using Node.js, set "type": "module" in package.json.
Run: npm install @azure/cosmos
Switch to import syntax or use dynamic import(). Ensure your project is configured for ESM.
Use: import { createClient } from 'cosmox'Upgrade to cosmox v1.0.3 or later.