Skip to content
Switch branches/tags
Go to file

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

CI codecov npm version Commitizen friendly License


Ottoman is an ODM built for Couchbase and Node.js.

Ottoman's goal is to provide a better development experience while using Couchbase, bringing to developers a reliable tool to build systems that are easy to design, maintain, and scale.


npm install ottoman

That's it, you are ready to use Ottoman.

Dependencies Matrix

Supported version are:

Ottoman Nodejs Couchbase SDK Couchbase Server
^2.0.0 ^8.0.0 ^3.0.0 ^6.5.0

Notice: make sure you are using supported versions

Getting started

const { connect, model, start, close } = require('ottoman');

const User = model('User', { name: String });

const user = new User({ name: 'Jane Doe' });
    .then(() => console.log('Nice Job!'))
    .finally(() => close());


You should see results similar to the following:

Nice Job!

::: tip Note If you are using legacy database must check out this :::

Ottoman v2 main goals

  • To add support to Couchbase SDK 3.
  • To add typescript support.
  • To have a powerful query builder built-in.
  • To allow adding indexes to improve queries performance.
  • To have extendable Schemas using statics, methods, hooks.
  • To have Pluggable Schemas.


Checkout our examples and docs for typescript and javascript implementation.


For questions and support please use the official forum or contact community. Please make sure to read the Issue Reporting Checklist before opening an issue.


Detailed changes for each release are documented in the release notes.

Stay In Touch


Thank you to all the people who already contributed to Couchbase Ottoman!

Guide for Developers

  1. Install Couchbase Server Using Docker.

::: tip Note Check results on http://localhost:8091/ couchbase web client. :::

  1. Get the repo and install dependencies
$ git clone
$ cd node-ottoman
$ yarn install
  1. Available scripts
$ yarn dev
$ yarn build
$ yarn lint
$ yarn test
$ yarn test --coverage
$ yarn docs
$ yarn docs:dev

Deploying Ottoman to NPM

  • Pull master branch from repo
  • yarn install
  • ensure version number is bumped
  • yarn build
  • yarn is:ready
  • npm publish (--tag alpha or --tag beta)


© Copyright 2021 Couchbase Inc.

Licensed under the Apache License, Version 2.0. See the Apache 2.0 license.