{"id":25883147,"url":"https://github.com/maxlath/couchdb-view-by-keys","last_synced_at":"2026-04-21T03:32:37.814Z","repository":{"id":57209744,"uuid":"89818486","full_name":"maxlath/couchdb-view-by-keys","owner":"maxlath","description":"A command-line tool to query CouchDB views, focused on easing queries with complex JSON keys","archived":false,"fork":false,"pushed_at":"2023-11-30T14:48:45.000Z","size":184,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-20T04:19:49.420Z","etag":null,"topics":["cli","couchdb","docs","json","ndjson","views"],"latest_commit_sha":null,"homepage":"","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/maxlath.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2017-04-29T23:26:51.000Z","updated_at":"2021-11-30T20:50:12.000Z","dependencies_parsed_at":"2025-03-02T16:41:51.974Z","dependency_job_id":null,"html_url":"https://github.com/maxlath/couchdb-view-by-keys","commit_stats":null,"previous_names":["maxlath/couch-view-by-keys"],"tags_count":15,"template":false,"template_full_name":null,"purl":"pkg:github/maxlath/couchdb-view-by-keys","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fcouchdb-view-by-keys","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fcouchdb-view-by-keys/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fcouchdb-view-by-keys/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fcouchdb-view-by-keys/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxlath","download_url":"https://codeload.github.com/maxlath/couchdb-view-by-keys/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxlath%2Fcouchdb-view-by-keys/sbom","scorecard":{"id":629649,"data":{"date":"2025-08-11","repo":{"name":"github.com/maxlath/couchdb-view-by-keys","commit":"2ef1ae46c6a78551d7dc26ea20489b18f1b1b840"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.3,"checks":[{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":0,"reason":"license file not detected","details":["Warn: project does not have a license file"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'main'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"15 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-93q8-gq69-wqmw","Warn: Project is vulnerable to: GHSA-v6h2-p8h4-qcjw","Warn: Project is vulnerable to: GHSA-grv7-fg5c-xmjg","Warn: Project is vulnerable to: GHSA-gxpj-cx7g-858c","Warn: Project is vulnerable to: GHSA-2j2x-2gpw-g8fm","Warn: Project is vulnerable to: GHSA-ww39-953v-wcq6","Warn: Project is vulnerable to: GHSA-p6mc-m468-83gw","Warn: Project is vulnerable to: GHSA-29mw-wpgm-hmr9","Warn: Project is vulnerable to: GHSA-35jh-r3h4-6jhm","Warn: Project is vulnerable to: GHSA-f8q6-p94x-37v3","Warn: Project is vulnerable to: GHSA-xvch-5gv4-984h","Warn: Project is vulnerable to: GHSA-w7rc-rwvf-8q5r","Warn: Project is vulnerable to: GHSA-r683-j2x4-v87g","Warn: Project is vulnerable to: GHSA-c2qf-rxjj-qqgw","Warn: Project is vulnerable to: GHSA-c4w7-xm78-47vh"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T07:28:31.475Z","repository_id":57209744,"created_at":"2025-08-21T07:28:31.475Z","updated_at":"2025-08-21T07:28:31.475Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32075235,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-21T02:38:07.213Z","status":"ssl_error","status_checked_at":"2026-04-21T02:38:06.559Z","response_time":128,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["cli","couchdb","docs","json","ndjson","views"],"created_at":"2025-03-02T16:31:39.104Z","updated_at":"2026-04-21T03:32:37.797Z","avatar_url":"https://github.com/maxlath.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# couchdb-view-by-keys\n\nA command line tool to query [CouchDB](http://couchdb.apache.org/) [views](https://wiki.apache.org/couchdb/Introduction_to_CouchDB_views), focused on easing queries with [complex JSON keys](https://wiki.apache.org/couchdb/Introduction_to_CouchDB_views#Complex_Keys) (which are a pain to do with `curl`)\n\n[![NPM](https://nodei.co/npm/couchdb-view-by-keys.png?stars\u0026downloads\u0026downloadRank)](https://npmjs.com/package/couchdb-view-by-keys/)\n[![License](https://img.shields.io/badge/license-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n[![Node](https://img.shields.io/badge/node-%3E=%20v7.6.0-brightgreen.svg)](http://nodejs.org)\n\n## Summary\n\n\u003c!-- START doctoc generated TOC please keep comment here to allow auto update --\u003e\n\u003c!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --\u003e\n\n\n- [Install](#install)\n- [How-To](#how-to)\n  - [General](#general)\n  - [Get rows](#get-rows)\n  - [Get docs](#get-docs)\n  - [Get keys](#get-keys)\n  - [Get values](#get-values)\n  - [Get only view rows id and key](#get-only-view-rows-id-and-key)\n  - [Limit](#limit)\n  - [Skip](#skip)\n  - [Output format](#output-format)\n    - [newline-delimited JSON](#newline-delimited-json)\n    - [JSON](#json)\n- [Tips](#tips)\n  - [use single quotes in JSON keys](#use-single-quotes-in-json-keys)\n\n\u003c!-- END doctoc generated TOC please keep comment here to allow auto update --\u003e\n\n## Install\n\n```sh\nnpm install -g couchdb-view-by-keys\n```\n\n## How-To\n\n### General\n```sh\nurl=\"http://username:password@localhost:5984/db-name/_design/design-doc-name/_view/view-name\"\ncouchdb-view-by-keys \"$url\" keyA keyB keyC\ncouchdb-view-by-keys \"$url\" '[\"a\", \"complex\", \"key\"]' '[\"another\", \"complex\", \"key\"]'\n# Or from a file with one key per line\ncat keys | xargs couchdb-view-by-keys \"$url\"\n```\nOr to fetch many documents\n```sh\nurl=\"http://username:password@localhost:5984/_all_docs\"\ncouchdb-view-by-keys \"$url\" docIdA docIdB docIdC\n# Or from a file with one doc id per line\ncat ids | xargs couchdb-view-by-keys \"$url\"\n```\n\n### Get rows\ncouchdb-view-by-keys \"$url\"\n\n### Get docs\ncouchdb-view-by-keys --docs \"$url\"\n\n### Get keys\ncouchdb-view-by-keys --keys \"$url\"\n\n### Get values\ncouchdb-view-by-keys --values \"$url\"\n\n### Get only view rows id and key\nBy default, view rows are returned with their document, but this can be disabled by setting `include_docs=false`\n```sh\ncouchdb-view-by-keys \"${url}?include_docs=false\"\n```\n\nNB: `reduce=false` is also set by default, as `reduce=true` is incompatible with `include_docs=true`\n\n### Limit\n```sh\ncouchdb-view-by-keys \"${url}?limit=10\"\n```\n\n### Skip\n```sh\ncouchdb-view-by-keys \"${url}?skip=10\"\n```\n\n### Output format\n#### newline-delimited JSON\nNewline-delimited JSON (a.k.a NDJSON) is the the default output format\n```sh\ncouchdb-view-by-keys \"$url\" keyA keyB keyC\n```\nset the indentation to 0 to drop newlines\n```sh\ncouchdb-view-by-keys \"$url\" keyA keyB keyC --json 0\n```\n\n#### JSON\n```sh\n# Get all the rows as an array of object\ncouchdb-view-by-keys \"$url\" keyA keyB keyC --json\n# Same, but with an indentation of 2\ncouchdb-view-by-keys \"$url\" keyA keyB keyC --json 2\n# Same, but with an indentation of 4\ncouchdb-view-by-keys \"$url\" keyA keyB keyC --json 4\n```\n\n## Tips\n### use single quotes in JSON keys\nSome times you might need to use variable interpolation, which, in bash, requires to use double quotes. Unfortunately, JSON keys being expected to be valid JSON, they also require doubles quotes. You would thus normally endup with some horrible escaping of the kind:\n```sh\ncouchdb-view-by-keys \"$url\" \"[\\\"$1\\\",\\\"a\\\"]\" \"[\\\"$2\\\",\\\"b\\\"]\" \"[\\\"$3\\\",\\\"c\\\"]\"\n```\nHorrified by so much anticipated pain, you might just stop there, give up on computing and start drinking. But fear no more! You can just use single quotes instead:\n```sh\n# works with simple arrays\ncouchdb-view-by-keys \"$url\" \"['$1','a']\" \"['$2','b']\" \"['$3','c']\"\n# and simple objects\ncouchdb-view-by-keys \"$url\" \"{ 'a': '$1'}\"\n# TODO: make it work for nested objects/arrays if you have the need\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fcouchdb-view-by-keys","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxlath%2Fcouchdb-view-by-keys","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxlath%2Fcouchdb-view-by-keys/lists"}