{"id":13627839,"url":"https://github.com/nitzano/dbzar","last_synced_at":"2025-04-11T01:13:30.065Z","repository":{"id":37016634,"uuid":"445290515","full_name":"nitzano/dbzar","owner":"nitzano","description":"🔁👻 Agnostic DB Anonymizer ","archived":false,"fork":false,"pushed_at":"2024-05-01T23:34:21.000Z","size":4214,"stargazers_count":18,"open_issues_count":43,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-11T01:13:08.865Z","etag":null,"topics":["anonymization","anonymizer","database","database-anonymizer","db","devops","devops-tools","fake","gdpr","mariadb","mock","mongodb","mysql","postgressql"],"latest_commit_sha":null,"homepage":"https://nitzano.github.io/dbzar","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/nitzano.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,"governance":null,"roadmap":"docs/ROADMAP.md","authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-06T19:41:46.000Z","updated_at":"2024-10-21T14:08:26.000Z","dependencies_parsed_at":"2024-04-16T11:51:16.801Z","dependency_job_id":"0d994821-bd50-4382-9164-5aeb15d316e5","html_url":"https://github.com/nitzano/dbzar","commit_stats":{"total_commits":378,"total_committers":3,"mean_commits":126.0,"dds":0.3465608465608465,"last_synced_commit":"969826044cdf0b5e0878669b69146037b48e09f4"},"previous_names":[],"tags_count":73,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fdbzar","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fdbzar/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fdbzar/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nitzano%2Fdbzar/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nitzano","download_url":"https://codeload.github.com/nitzano/dbzar/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248322571,"owners_count":21084337,"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","anonymizer","database","database-anonymizer","db","devops","devops-tools","fake","gdpr","mariadb","mock","mongodb","mysql","postgressql"],"created_at":"2024-08-01T22:00:39.140Z","updated_at":"2025-04-11T01:13:30.049Z","avatar_url":"https://github.com/nitzano.png","language":"TypeScript","readme":"\u003ch1 align=\"center\"\u003eDBZar\u003c/h1\u003e\n\u003cdiv align=\"center\"\u003e\n\u003cimg src=\"https://raw.githubusercontent.com/nitzano/dbzar/master/website/static/img/logo.svg\" height=\"120\"\u003e\n\u003c/div\u003e\n\u003ch2 align=\"center\"\u003eAgnostic DB Anonymizer \u003c/h2\u003e\n\n\u003cdiv align=\"center\"\u003e\n\n[![npm](https://img.shields.io/npm/v/dbzar)](https://www.npmjs.com/package/dbzar)\n[![npm-beta](https://img.shields.io/npm/v/dbzar/beta)](https://www.npmjs.com/package/dbzar)\n[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)\n[![XO code style](https://img.shields.io/badge/code_style-XO-5ed9c7.svg)](https://github.com/xojs/xo)\n[![semantic-release](https://img.shields.io/badge/%20%20%F0%9F%93%A6%F0%9F%9A%80-semantic--release-e10079.svg)](https://github.com/semantic-release/semantic-release)\n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT)\n[![GitHub Repo stars](https://img.shields.io/github/stars/nitzano/dbzar?style=flat)](https://github.com/nitzano/dbzar/stargazers)\n![npm](https://img.shields.io/npm/dw/dbzar)\n\n\u003c/div\u003e\n\n- [⭐ Highlights](#-highlights)\n- [📃 Full Documentation](#-full-documentation)\n- [💻 Install](#-install)\n- [👻 Usage](#-usage)\n  - [CLI](#cli)\n    - [`anon-col`](#anon-col)\n    - [`anon-db`](#anon-db)\n  - [API](#api)\n  - [Docker](#docker)\n- [✅ Supported Databases](#-supported-databases)\n\n\u003cbr/\u003e\n\n**DBZar** (Database + \"stranger\" in Hebrew) let you mask/scramble/fake fields in any given database, just add a connection string and anonymize away!\n\nGreat for:\n\n1. Anonymizing production servers for local development.\n2. General utility to manipulate existing databases easily.\n\n## ⭐ Highlights\n\n- Anonymize single columns (`anon-col`)\n- Anonymize entire databases (`anon-db`)\n- Manipulate data by masking, scrambling, faking and more\n- Built-in support to famous databases\n- Use via [CLI](https://nitzano.github.io/dbzar/docs/usage) or [API](https://nitzano.github.io/dbzar/docs/usage/api) and [Docker](https://nitzano.github.io/dbzar/docs/usage/docker)\n- [Configuration](https://nitzano.github.io/dbzar/docs/config) options\n\n## 📃 Full Documentation\n\nAvailable here: [Documentation](https://nitzano.github.io/dbzar/).\n\n## 💻 Install\n\n```\nnpm i --save-dev dbzar\n\n// OR\nyarn add -D dbzar\n\n// OR\nnpx dbzar\n```\n\n## 👻 Usage\n\n### CLI\n\n#### `anon-col`\n\nAnonymize a single column\n\n(⚠ Changes whichever db provided so use with caution)\n\n```bash\nUsage: dbzar anon-col [options] [command]\n\nAnonymize a single column in a table\n\nOptions:\n  -skip --skip-confirm  skip confirmation\n  -u --uri              Connection string\n  -db --database        Database name\n  -t --table            Table name\n  -c --column           Column name\n  -h, --help            display help for command\n\nCommands:\n  scramble [options]    scramble a single column\n  fake [options]        fake a single column\n  mask [options]        mask a single column\n  help [command]        display help for command\n```\n\nExamples:\n\n1. Mask \"firstName\" in PostgresSQL\n\n```\ndbzar anon-col mask -u postgresql:/localhost -db test -t users -c firstName\n\n// { \"firstName\": \"John\" } =\u003e { \"firstName\": \"****\" }\n```\n\n2. Scramble \"lastName\" in MongoDB\n\n```\ndbzar anon-col scramble -u mongodb://localhost -db test -t users -c lastName\n\n// { \"lastName\": \"Smith\" } =\u003e { \"lastName\": \"hSmti\" }\n```\n\n#### `anon-db`\n\nAnonymize entire database\n\n```\nUsage: dbzar anon-db [options] [uri]\n\nAnonymize an entire database\n\nArguments:\n  uri         connection string\n\nOptions:\n  -h, --help  display help for command\n```\n\n1. Create Configuration file (see [Configuration](https://nitzano.github.io/dbzar/docs/config))\n\nExample:\n\n```yaml\n// .dbzarrc\ndbName: db1\ntables:\n  - name: users\n    columns:\n      - name: firstName\n        provider: mask\n      - name: lastName\n        provider:\n          type: mask\n          options:\n            character: \"#\"\n  - name: products\n    columns:\n      - name: name\n        provider:\n          type: fake\n          options:\n            fakeValue: animal\n```\n\n2. Run the anonymizer\n\n```\ndbzar anon-db mongodb://example:example@localhost\n```\n\nWill:\n\n1. `mask` the `firstName` column in `users` table (replacing letters with default `*`).\n2. `mask` the `lastName` column in `users` table (replacing letters with `#`).\n3. `fake` the `name` column in `products` table (replacing it with a random animal name, for example: \"Fish\").\n\nFrom:\n\n```\n// users table\n{ \"firstName\": \"John\", \"lastName\": \"Doe\" }\n\n// products table\n{ \"name\": \"Product1\", \"price\": 100 }\n```\n\nTo:\n\n```\n// users table\n{ \"firstName\": \"****\", \"lastName\": \"###\" }\n\n// products table\n{ \"name\": \"Fish\", \"price\": 100 }\n```\n\n### API\n\nSee [usage/API](https://nitzano.github.io/dbzar/docs/usage/api)\n\n### Docker\n\nDocker Image: [nitzano/dbzar](https://hub.docker.com/r/nitzano/dbzar)\n\nUsage:\n\n```\n// pull the image\ndocker pull nitzano/dbzar\n\n// run command\ndocker run nitzano/dbzar anon-col ...\n```\n\n## ✅ Supported Databases\n\n1. MongoDB\n1. PostgresSQL\n1. MariaDB\n1. MySQL\n\nFuture support:\n\n- Neo4J\n- SQLite\n- CSV\n- DynamoDB\n- Parquet\n- JSON\n- XML\n- XLSX\n","funding_links":[],"categories":["Projects by main language"],"sub_categories":["typescript"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzano%2Fdbzar","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnitzano%2Fdbzar","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnitzano%2Fdbzar/lists"}