{"id":16817171,"url":"https://github.com/rap2hpoutre/mongodb-anonymizer","last_synced_at":"2025-04-11T02:23:52.530Z","repository":{"id":48881975,"uuid":"383713101","full_name":"rap2hpoutre/mongodb-anonymizer","owner":"rap2hpoutre","description":"Anonymize MongoDB database with a NodeJS CLI","archived":false,"fork":false,"pushed_at":"2021-07-09T14:54:34.000Z","size":69,"stargazers_count":12,"open_issues_count":1,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-18T01:06:37.465Z","etag":null,"topics":["anonymization","database","hacktoberfest","javascript","mongo","mongodb","nodejs"],"latest_commit_sha":null,"homepage":"https://raph.site","language":"TypeScript","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/rap2hpoutre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-07-07T07:33:26.000Z","updated_at":"2024-05-28T08:14:30.000Z","dependencies_parsed_at":"2022-09-16T04:01:01.565Z","dependency_job_id":null,"html_url":"https://github.com/rap2hpoutre/mongodb-anonymizer","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/rap2hpoutre%2Fmongodb-anonymizer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rap2hpoutre%2Fmongodb-anonymizer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rap2hpoutre%2Fmongodb-anonymizer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/rap2hpoutre%2Fmongodb-anonymizer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/rap2hpoutre","download_url":"https://codeload.github.com/rap2hpoutre/mongodb-anonymizer/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248328518,"owners_count":21085330,"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":["anonymization","database","hacktoberfest","javascript","mongo","mongodb","nodejs"],"created_at":"2024-10-13T10:46:24.820Z","updated_at":"2025-04-11T02:23:52.504Z","avatar_url":"https://github.com/rap2hpoutre.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"mongodb-anonymizer\n==================\n\nMongoDB anonymzer tool.\nExport your MongoDB database anonymized from source to target. Replace all sensitive data thanks to `faker`.\n\n[![oclif](https://img.shields.io/badge/cli-oclif-brightgreen.svg)](https://oclif.io)\n[![Version](https://img.shields.io/npm/v/mongodb-anonymizer.svg)](https://npmjs.org/package/mongodb-anonymizer)\n[![License](https://img.shields.io/npm/l/mongodb-anonymizer.svg)](https://github.com/rap2hpoutre/mongodb-anonymizer/blob/main/package.json)\n\n## Usage\n\nRun this command by giving a source URI and target URI (no need to install first thanks to `npx`):\n\n```bash\nnpx mongodb-anonymizer \\\n  --uri=mongodb://localhost:27017/source \\\n  --targetUri=mongodb://localhost:27017/anonymized\n```\n\n☝️ Be careful, since target collections will be removed.\n\n### Specify list of fields to anonymize\n\nUse `--list` option with a comma separated list of column name:\n\n```bash\nnpx mongodb-anonymizer  \\\n  --uri=mongodb://localhost:27017/source \\\n  --targetUri=mongodb://localhost:27017/anonymized\n  --list=email,firstName,lastName,phone\n```\n\nSpecifying another list via `--list` replace the default automatically anonymized values:\n\n```csv\nemail,name,description,address,city,country,phone,comment,birthdate\n```\n\nYou can also specify replacements for a specific collection:\n\n```csv\nusers.email,products.price\n```\n\n#### Customize replacements \n\nYou can also choose which faker function you want to use to replace data (default is `faker.random.word`):\n\n```bash\nnpx mongodb-anonymizer  \\\n  --uri=mongodb://localhost:27017/source \\\n  --targetUri=mongodb://localhost:27017/anonymized\n  --list=firstName:faker.name.firstName,lastName:faker.name.lastName\n```\n\n:point_right: You don't need to specify faker function since the command will try to find correct function via column name.\n\nYou can use plain text too for static replacements:\n```bash\nnpx mongodb-anonymizer  \\\n  --uri=mongodb://localhost:27017/source \\\n  --targetUri=mongodb://localhost:27017/anonymized\n  --list=textcol:hello,jsoncol:{},intcol:12\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frap2hpoutre%2Fmongodb-anonymizer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frap2hpoutre%2Fmongodb-anonymizer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frap2hpoutre%2Fmongodb-anonymizer/lists"}