{"id":15068460,"url":"https://github.com/rumkin/moongo","last_synced_at":"2026-01-02T15:52:57.187Z","repository":{"id":57302726,"uuid":"54717315","full_name":"rumkin/moongo","owner":"rumkin","description":"Mongo query atomation cli app","archived":false,"fork":false,"pushed_at":"2016-03-29T09:22:30.000Z","size":12,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-25T05:34:49.362Z","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/rumkin.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}},"created_at":"2016-03-25T12:29:03.000Z","updated_at":"2016-04-07T13:38:40.000Z","dependencies_parsed_at":"2022-09-20T17:51:47.908Z","dependency_job_id":null,"html_url":"https://github.com/rumkin/moongo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fmoongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fmoongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fmoongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rumkin%2Fmoongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rumkin","download_url":"https://codeload.github.com/rumkin/moongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243849495,"owners_count":20357787,"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-09-25T01:36:11.618Z","updated_at":"2026-01-02T15:52:57.153Z","avatar_url":"https://github.com/rumkin.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moongo\n\nMoongo is a mongo queries automation tool. All you should to do is create\nsome scripts and create config file.\n\n## Installation\n\n```shell\nnpm i moongo -g\n```\n\n## Example\n\nCreate script `moongo/update-counters.js`:\n\n```javascript\n// moongo/update-counters.js\nmodule.exports = function($api, type, inc, dec) {\n    var col = $api.collection('counters');\n\n    if (inc !== 'undefined') {\n        return col.update({\n            type\n        }, {\n            $inc: inc\n        });\n    }\n    else if (dec !== 'undefined') {\n        return col.update({\n            type\n        }, {\n            $inc: dec\n        });\n    }\n    else {\n        throw new Error('No inc or dec param specified');\n    }\n};\n```\n\nRun script:\n\n```bash\n$ cd moongo\n$ moongo run local update-counters.js type=active inc=1 # -\u003e ok\n$ moongo run local update-counters.js type=inactive dec=1 # -\u003e ok\n$ moongo run local update-counters.js type=inactive # -\u003e No inc or dec param specified\n```\n\n## Config\n\nConfiguration file should contain connections:\n\n```javascript\n{\n    \"connections\": {\n        \"local\": {\n            \"host\": \"localhost\",\n            \"port\": 27017,\n            \"base\": \"my-base\",\n            \"confirm\": false\n        }\n    }\n}\n```\n\n### Connection options\n\n| Option  | Type     | Desc                                           |\n|:--------|:---------|:-----------------------------------------------|\n| host    | `string` | MongoDB host                                   |\n| port    | `number` | MongoDB port                                   |\n| base    | `string` | Database name                                  |\n| confirm | `bool`   | Force confirmation prompt to prevent accidents |\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Fmoongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frumkin%2Fmoongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frumkin%2Fmoongo/lists"}