{"id":19658115,"url":"https://github.com/cdaringe/tuffet","last_synced_at":"2025-04-28T20:31:11.325Z","repository":{"id":40396144,"uuid":"43829997","full_name":"cdaringe/tuffet","owner":"cdaringe","description":"The only adorable CouchDB CLI tool coated with sugar","archived":false,"fork":false,"pushed_at":"2025-03-29T07:37:15.000Z","size":999,"stargazers_count":3,"open_issues_count":31,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-22T16:02:52.960Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cdaringe.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-10-07T16:41:32.000Z","updated_at":"2020-05-19T02:58:09.000Z","dependencies_parsed_at":"2024-03-15T16:27:02.869Z","dependency_job_id":"c227ac74-c9a9-46d2-8f93-7eee96f4bef7","html_url":"https://github.com/cdaringe/tuffet","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ftuffet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ftuffet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ftuffet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cdaringe%2Ftuffet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cdaringe","download_url":"https://codeload.github.com/cdaringe/tuffet/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251383650,"owners_count":21580915,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T15:36:08.695Z","updated_at":"2025-04-28T20:31:11.000Z","avatar_url":"https://github.com/cdaringe.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# tuffet\nThe only adorable CouchDB CLI!  The [full couchdb API](http://docs.couchdb.org/en/latest/http-api.html) is supported along with some helpful extensions.\n\n\u003cimg src=\"https://raw.githubusercontent.com/cdaringe/tuffet/master/tuffet.png\" width=\"175\"\u003e\n\n# why tuffet?\nYou can only `curl` CouchDB so much to get things done.  `curl`ing 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 :).\n\n# why can't I import this as a module?\nBecause [Pouchy](https://www.npmjs.com/package/pouchy) and plain ol' [PouchDB](https://www.npmjs.com/package/pouchdb) already exist.  They're great!\n\n# usage\n\n## install\n`npm install -g tuffet`\n\n## config\nRunning `tuffet` will put a config in `~/.tuffetrc` with some defaults.  The content should be of type `JSON`.\n\n- url\n    - Defaults to pointing to remote couchdb @ localhost:5984.\n\n## api\nAgain, the [full couchdb API](http://docs.couchdb.org/en/latest/http-api.html) is loaded in.  BONUS actions can be found below.  For now, let's observe some basic commands.\n\n```bash\n$ tuffet get /\n{ couchdb: 'Welcome',\n  uuid: '0df364afbe336fcee34f25422da9798f',\n  version: '1.6.1',\n  vendor: { version: '1.6.1_3', name: 'Homebrew' } }\n\n\n$ tuffet put my-new-db\n{ ok: true }\n\n$ tuffet get my-new-db\n{ db_name: 'my-new-db',\n  doc_count: 0,\n  doc_del_count: 0,\n  update_seq: 0,\n  purge_seq: 0,\n  compact_running: false,\n  disk_size: 79,\n  data_size: 0,\n  instance_start_time: '1444289527569114',\n  disk_format_version: 6,\n  committed_update_seq: 0 }\n\n$ tuffet post my-new-db '{\"new\": \"doc!\"}'\n{ ok: true,\n  id: '2fd98bdae478273f418a1d6c4f000f97',\n  rev: '1-ac0f4654ecb99532dd8967dda8190ccb' }\n\n```\n\n## flags\n- `-v/--verbose` - increase the log level (console only ATM)\n\n\n## sugar api\n\n### clear database\n`--clear`\nNote, 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.\n\n```bash\ncdieringer@Snapper-osx:~/node/tuffet$ tuffet mydb --clear\n1 'docs deleted'\n```\n\n### delete all databases\n`--dd`\n\n```bash\ncdieringer@Snapper-osx:~/node/tuffet$ tuffet --dd\n2 'dbs deleted'\n```\n\n# TODO\n- match endpoint to formal couchdb endpoint\n    - if no matching sig, test components for aliases\n    - if no aliases, error\n        - unless `-f/--force` supplied - exec HTTP request with params even if command not member of formal API\n- write tests\n- test `ANY` and binary endpoint(s)\n\n# changelog\n- 1.1.0 - add `clear`\n- 1.0.0 - Migrate from `deebee`.  terribly boring name :)  You can have it if you want it. Just ask!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ftuffet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcdaringe%2Ftuffet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcdaringe%2Ftuffet/lists"}