{"id":17809369,"url":"https://github.com/kishieel/couchsync","last_synced_at":"2026-05-18T04:09:59.186Z","repository":{"id":252908980,"uuid":"829960594","full_name":"kishieel/couchsync","owner":"kishieel","description":"CouchSync is a command-line tool that allows you to manage CouchDB design documents in a directory structure.","archived":false,"fork":false,"pushed_at":"2024-08-13T11:54:47.000Z","size":9428,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-02T06:30:51.652Z","etag":null,"topics":["cli","couchdb","json","no-sql"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kishieel.png","metadata":{"files":{"readme":"readme.md","changelog":null,"contributing":"contributing.md","funding":null,"license":"license.md","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":"2024-07-17T10:33:46.000Z","updated_at":"2024-08-13T11:57:20.000Z","dependencies_parsed_at":"2024-08-13T12:43:47.961Z","dependency_job_id":null,"html_url":"https://github.com/kishieel/couchsync","commit_stats":null,"previous_names":["kishieel/couchsync"],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/kishieel/couchsync","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishieel%2Fcouchsync","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishieel%2Fcouchsync/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishieel%2Fcouchsync/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishieel%2Fcouchsync/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kishieel","download_url":"https://codeload.github.com/kishieel/couchsync/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kishieel%2Fcouchsync/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016580,"owners_count":26085850,"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","status":"online","status_checked_at":"2025-10-13T02:00:06.723Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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","json","no-sql"],"created_at":"2024-10-27T15:17:42.116Z","updated_at":"2025-10-13T18:22:27.722Z","avatar_url":"https://github.com/kishieel.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# CouchSync\n\nManaging CouchDB design documents can be a tedious task. JavaScript functions mixed with JSON can be hard to maintain and debug. For this reason, CouchSync was created. CouchSync is a command-line tool that allows you to manage CouchDB design documents in a directory structure. You can keep your functions in separate files and CouchSync will automagically parse and upload them to CouchDB as a JSON document.\n\n### Installation\n\nTo install CouchSync you can use the following command.\n\n```shell\nwget -q https://github.com/kishieel/couchsync/raw/master/install.sh -O - | sudo bash\n```\n\n### Usage\n\nTo use CouchSync you need to prepare a directory structure that represents documents that are supposed to be uploaded to\nCouchDB. The example below shows a directory structure that represents a single design document with various functions\nfor specified database.\n\n```text\ndocs/\n└─ database-name/\n   └─ _design/\n      └─ document-name/\n         ├─ filters/\n         │  ├─ filter-1.js\n         │  └─ filter-2.js\n         ├─ updates/\n         │  ├─ update-1.js   \n         │  └─ update-2.js\n         ├─ views/\n         │  ├─ view_1/\n         │  │  ├─ map.js\n         │  │  └─ reduce.js\n         │  └─ view_2/\n         │     ├─ map.js\n         │     └─ reduce.js\n         └─ validate_doc_update.js\n        \n```\n\nWith this directory structure you can use the following command to upload the documents to CouchDB.\n\n```shell\ncouchsync \\\n  --address http://localhost:5984 \\\n  --username username \\\n  --password password \\\n  --source docs\n```\n\nConsequently, the document with name `_design/document-name` will be created in database with name `database-name` with\nfollowing content.\n\n```json\n{\n  \"_id\": \"_design/document-name\",\n  \"filters\": {\n    \"filter-1\": \"function(doc, req) { ... }\",\n    \"filter-2\": \"function(doc, req) { ... }\"\n  },\n  \"updates\": {\n    \"update-1\": \"function(doc, req) { ... }\",\n    \"update-2\": \"function(doc, req) { ... }\"\n  },\n  \"views\": {\n    \"view_1\": {\n      \"map\": \"function(doc) { ... }\",\n      \"reduce\": \"function(keys, values, rereduce) { ... }\"\n    },\n    \"view_2\": {\n      \"map\": \"function(doc) { ... }\",\n      \"reduce\": \"function(keys, values, rereduce) { ... }\"\n    }\n  },\n  \"validate_doc_update\": \"function(newDoc, oldDoc, userCtx, secObj) { ... }\"\n}\n```\n\n## Contributing\n\nPlease see the [contributing.md](contributing.md) file for details on how to contribute to this project.\n\n## License\n\nThis project is licensed under the MIT License - see the [license.md](license.md) file for details.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishieel%2Fcouchsync","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkishieel%2Fcouchsync","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkishieel%2Fcouchsync/lists"}