npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

mcouch

v2.1.0

Published

Put your CouchDB in Manta, attachments and docs and all

Downloads

16

Readme

manta-couch

Put your CouchDB in Manta, attachments and docs and all

Usage

In JavaScript

var mantaCouch = require('manta-couch')

var mc = mantaCouch({
  client: myMantaClient,
  path: '~~/stor/my-couchdb',
  db: 'http://localhost:5984/my-couchdb',

  // If specified, will save sequence in this file, and read from it
  // on startup.  Highly recommended to avoid extra PUTs!
  seqFile: '.sequence',

  // you can also optionally specify a numeric sequence here:
  seq: 1234
})

In the command line:

mcouch http://localhost:5984/my-couch ~~/stor/my-couchdb

Full options:

mcouch - Relax with the Fishes
Usage: mcouch [args] COUCHDB MANTAPATH

    COUCHDB                             Full url to your couch, like
                                        http://localhost:5984/database
    MANTAPATH                           Remote path in Manta, like
                                        ~~/stor/database
    -Q FILE, --seq-file=FILE            File to store the sequence in
    -q NUMBER, --seq=NUMBER             Sequence ID to start at
    --inactivity-ms=MS                  Max ms to wait before assuming
                                        disconnection.
    -d, --delete                        Delete removed attachments and docs from
                                        manta
    -f, --forensic                      Track changes in a non-destructive way
    -a ACCOUNT, --account=ACCOUNT       Manta Account (login name)
    -h, --help                          Print this help and exit
    -i, --insecure                      Do not validate SSL certificate
    -k FINGERPRINT, --keyId=FINGERPRINT SSH key fingerprint
    -u URL, --url=URL                   Manta URL
    -v, --verbose                       verbose mode

When using the command line, you can also specify all the typical MANTA environment variables, or you can pass the typical Manta command-line arguments.

Manta Folder Structure

In non-forensic mode, mcouch will put the doc contents at {path}/{id}/doc.json, and store attachments at {path}/{id}/_attachments/{filename}.

If you enable deletes, then it will also permanently delete documents and attachments when they are removed. If delete is not enabled, then removed attachments will remain in the _attachments folder, and removed docs will not be removed.

In forensic mode, in addition to storing a doc.json, this is linked to {path}/{id}/{rev}.json where {rev} is the document revision id. Attachments are linked to {path}/{id}/_attachments/{filename}-{digest}. This is so that, even as the documents or attachments are modified, past versions can still be reconstructed. Deleting an attachment will remove its main file, but the link to the digest-tagged version will remain.

In forensic mode, deletes do not remove data permanently from Manta. Instead, deleting a document will cause the doc and all its attachments to be moved to a _deleted-{index} folder, and a _deleted:true record will be written to doc.json. The {index} value on the trash folder is incremented with each subsequent delete.