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

tuffet

v1.1.1

Published

The only adorable CouchDB CLI tool

Downloads

3

Readme

tuffet

The only adorable CouchDB CLI! The full couchdb API is supported along with some helpful extensions.

why tuffet?

You can only curl CouchDB so much to get things done. curling doesn't generally offer good type-ability. The CouchDB API, though powerful, doesn't on its own get a ton of work done for you. Generally, you need to execute a set of composite commands to do some useful things! tuffet is designed to be a typing-friendly CouchDB proxy-API with a set of extensions that you may find helpful. You can see some examples below to sell yourself :).

why can't I import this as a module?

Because Pouchy and plain ol' PouchDB already exist. They're great!

usage

install

npm install -g tuffet

config

Running tuffet will put a config in ~/.tuffetrc with some defaults. The content should be of type JSON.

  • url
    • Defaults to pointing to remote couchdb @ localhost:5984.

api

Again, the full couchdb API is loaded in. BONUS actions can be found below. For now, let's observe some basic commands.

$ tuffet get /
{ couchdb: 'Welcome',
  uuid: '0df364afbe336fcee34f25422da9798f',
  version: '1.6.1',
  vendor: { version: '1.6.1_3', name: 'Homebrew' } }


$ tuffet put my-new-db
{ ok: true }

$ tuffet get my-new-db
{ db_name: 'my-new-db',
  doc_count: 0,
  doc_del_count: 0,
  update_seq: 0,
  purge_seq: 0,
  compact_running: false,
  disk_size: 79,
  data_size: 0,
  instance_start_time: '1444289527569114',
  disk_format_version: 6,
  committed_update_seq: 0 }

$ tuffet post my-new-db '{"new": "doc!"}'
{ ok: true,
  id: '2fd98bdae478273f418a1d6c4f000f97',
  rev: '1-ac0f4654ecb99532dd8967dda8190ccb' }

flags

  • -v/--verbose - increase the log level (console only ATM)

sugar api

clear database

--clear Note, the history of these docs still exists. This isn't the same as deleting the db and recreating it. E.g. tombstones left behind! Also, this clears design docs. PR me to preserve them :) Dependent Pouchy package requires an update to support it.

cdieringer@Snapper-osx:~/node/tuffet$ tuffet mydb --clear
1 'docs deleted'

delete all databases

--dd

cdieringer@Snapper-osx:~/node/tuffet$ tuffet --dd
2 'dbs deleted'

TODO

  • match endpoint to formal couchdb endpoint
    • if no matching sig, test components for aliases
    • if no aliases, error
      • unless -f/--force supplied - exec HTTP request with params even if command not member of formal API
  • write tests
  • test ANY and binary endpoint(s)

changelog

  • 1.1.0 - add clear
  • 1.0.0 - Migrate from deebee. terribly boring name :) You can have it if you want it. Just ask!