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 🙏

© 2024 – Pkg Stats / Ryan Hefner

couchdocs

v1.2.11

Published

Command line tool to operate with JSON files in sync with CouchDB

Downloads

10

Readme

couchdocs

Command-line tools to operate with JSON files in sync with CouchDB

Installation

npm install -g couchdocs

.couchdocs File Configuration Example

Optional file with name .couchdocs contains properties of CouchDB connection which should be applied for sync of JSON files in the current folder.

[couchdb]
db=testdb
url=http://localhost:5984/

You could also use COUCH_URL and COUCH_DB variables too for database specification. url is optional, http://localhost:5984/ is used by default, but you typically must specify db parameter for simplifying operations

Use -v to have a verbose output about what is going on.

Operations

(c) Create CouchDB Database from all merged JSON documents in current folder

couchdocs create
couchdocs create http://example.com/database.tar.gz

(r) Delete existing and re-create CouchDB database from all merged documents in current folder

couchdocs recreate
couchdocs recreate http://example.com/database.tar.gz

(u) Update Database document using local json file

couchdocs update foo.json
couchdocs update --id _design/backend design_backend.json

(a) Partial database autoupdate

Read section in couchdocs file, it can declare what exact types or what documents can be safely autoupdated. [autoupdate] section can contain types that should be auto updated. [exclude] section can contain documents that should be auto updated.

couchdocs autoupdate
couchdocs autoupdate  http://example.com/database.tar.gz

Typical Example of couchdocs sections for configuring autoupdates

[autoupdate]
_id=_design/servers _design/public _design/auth
type=template layout widget webapp-config

[exclude]
_id=User-Backup

(s) Save database into JSON files

Each document becomes a separate file

couchdocs save

(z) Create tarball from JSON files in current folders

couchdocs zip

(b) Back up all databases using couchbackup into current folder

Each database would be saved as compressed .tar.gz file. couchbackup will be salled, so it should be installed for that operation

couchdocs backup

Disclaimer

  1. This CLI tool is designed only for Linux/Unix systems, so most of operations will not work on Windows if you have no Cygwin tools.
  2. Development is still in progress, please use at your own risk and feel free to leave your feedback in Issues.

Will be added before released

  • Improving verbosity levels
  • Support of big databases
  • More suitable error handling
  • Support for delayed publishing approach

You might also use

Other useful CLI utilities:

  • https://github.com/zaach/jsonlint
  • https://github.com/glynnbird/couchbackup