{"id":15485726,"url":"https://github.com/codediodeio/firestore-migrator","last_synced_at":"2025-04-06T09:10:54.805Z","repository":{"id":31053151,"uuid":"126734232","full_name":"codediodeio/firestore-migrator","owner":"codediodeio","description":":bullettrain_side: A CLI utility for moving data to and from Cloud Firestore","archived":false,"fork":false,"pushed_at":"2023-01-09T11:22:58.000Z","size":265,"stargazers_count":319,"open_issues_count":36,"forks_count":93,"subscribers_count":9,"default_branch":"master","last_synced_at":"2025-03-30T08:11:12.494Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://angularfirebase.com/lessons/import-csv-json-or-excel-to-firestore/","language":"TypeScript","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/codediodeio.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":"2018-03-25T19:51:39.000Z","updated_at":"2025-03-23T08:54:30.000Z","dependencies_parsed_at":"2023-01-14T18:14:45.134Z","dependency_job_id":null,"html_url":"https://github.com/codediodeio/firestore-migrator","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/codediodeio%2Ffirestore-migrator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codediodeio%2Ffirestore-migrator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codediodeio%2Ffirestore-migrator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/codediodeio%2Ffirestore-migrator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/codediodeio","download_url":"https://codeload.github.com/codediodeio/firestore-migrator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247457803,"owners_count":20941906,"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-10-02T06:02:45.424Z","updated_at":"2025-04-06T09:10:54.759Z","avatar_url":"https://github.com/codediodeio.png","language":"TypeScript","readme":"# Fire Migrate\n\n👀 Firestore now has an [official import/export process](https://firebase.google.com/docs/firestore/manage-data/export-import). Consider that your first option if it suits your needs. If it does not, continue reading...\n\nCLI tool for moving data in-n-out of [Cloud Firestore](https://firebase.google.com/docs/firestore/).\n\n- Import/Export CSV, Excel, or JSON files to/from Firestore.\n- Encode/Decode Firestore data types such as GeoPoint, Reference, Timestamp, etc.\n\nWatch the [screencast](https://angularfirebase.com/lessons/import-csv-json-or-excel-to-firestore/)\n\n## Install\n\n- Clone and run `npm install`\n- Download the service account from your Firebase project settings, then save it as `credentials.json` in the project root. \n- `npm run build` and you're off and running.\n\n## Import Data to Firestore\n\n- Push your local data to the Firestore database.\n- Selectively import [collections...] from source file to Firestore.\n- Omitting [collections...], or specifying root \"/\" will import all collections.\n\n```\nimport|i [options] \u003cfile\u003e [collections...]\n```\n\nOptions:\n```\n-i, --id [field]            Field to use for Document IDs. (default: doc_id)\n-a, --auto-id [str]         Document ID token specifying auto generated Document ID. (default: Auto-ID)\n-m, --merge                 Merge Firestore documents. Default is Replace.\n-k, --chunk [size]          Split upload into batches. Max 500 by Firestore constraints. (default: 500)\n-p, --coll-prefix [prefix]  (Sub-)Collection prefix. (default: collection)\n                            \n-s, --sheet [#]             Single mode XLSX Sheet # to import.\n                            \n-T, --truncate              Delete all documents from target collections before import.\n                            \n-d, --dry-run               Perform a dry run, without committing data. Implies --verbose.\n-v, --verbose               Output document insert paths\n-h, --help                  output usage information\n```\n\nExamples:\n```\nfire-migrate import --dry-run test.json myCollection\nfire-migrate import --merge test.INDEX.csv myCollection\nfire-migrate i -m --id docid test.xlsx myCollection\n```\n\n## Export Data from Firestore\n\n- Pull data from Firestore to a JSON, CSV or XLSX file.\n- Selectively export [collections...], or entire database with root \"/\".\n- Exports Sub-Collections by default, optionally disabled.\n- Splits CSV/XLSX collections into separate files/sheets with an INDEX.\n\n```\nexport|e [options] \u003cfile\u003e [collections...]\n```\n\nOptions:\n```\n\n-n, --no-subcolls           Do not export sub-collections.\n-p, --coll-prefix [prefix]  Collection prefix (default: collection)\n-i, --id-field [id]         Field name to use for document IDs (default: doc_id)\n\n-v, --verbose               Output traversed document paths\n-h, --help                  output usage information\n```\n\nExamples:\n```\nfire-migrate export --verbose --no-subcolls myCollectionRootLevel.json myCollection\nfire-migrate export users-posts.json users posts\nfire-migrate e -v firestore-dump.xlsx\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodediodeio%2Ffirestore-migrator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcodediodeio%2Ffirestore-migrator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcodediodeio%2Ffirestore-migrator/lists"}