CouchSet is a Couchbase ORM/model layer for TypeScript and Node.js. Current stable version is 0.3.0, released with weekly cadence. It provides both a legacy default API and a modern API under 'couchset/next' for gradual migration. Key differentiators: built-in TypeScript types, schema support, soft delete, paginated queries, and automatic reconnect. Compared to mongoose for MongoDB, CouchSet is purpose-built for Couchbase with N1QL support.
npm install couchsetNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Modern API setup: connect to Couchbase, define a model with indexes, perform CRUD operations, and run paginated queries.
Use 'couchset/next' for all new code. For existing projects, migrate gradually following the migration guide.
Use await couchset(...) in modern API. If using legacy, ensure connection is established before operations.
Explicitly provide { hard: true } for permanent deletion, or set softDelete: false in model options.Set COUCHSET_RECONNECT=false or COUCHSET_RECONNECT=0 to disable auto-reconnect.
Use import { couchset } from 'couchset/next' or { couchset } from 'couchset' (legacy) instead of import couchset from 'couchset'.Add await couchset.ready() after calling couchset() before performing any model operations.
Verify bucket name and ensure Couchbase cluster is accessible. For local development, use 'couchbase://localhost' and create bucket 'dev' via admin UI.
Consistently use either 'couchset' (legacy) or 'couchset/next' (modern) for all imports and model method calls. They are not interchangeable.