A CLI tool for exporting a MongoDB database from a source URI to a target URI while anonymizing sensitive fields using faker. Current stable version 0.3.1. Release cadence: sporadic, last update 2023. Key differentiators: No installation required (npx), automatically detects field names for faker functions, supports custom mappings and static values. Targets Node >=8.0.0.
npm install mongodb-anonymizerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Runs the CLI tool via npx, connecting to a source MongoDB and copying to target with anonymization of specified fields.
Ensure target database is a copy or has backups.
Pin faker version to v6 or update code for faker v7+.
Always specify --list with your field names.
Update Node.js to v8 or higher.
Ensure you have internet connectivity; npx will auto-install. If behind proxy, manually install with 'npm install -g mongodb-anonymizer'.
Start MongoDB service or check your --uri and --targetUri connection strings.
Specify a valid source database URI.
Ensure target database is empty or use a different target name.