{"id":49732914,"url":"https://github.com/shayyz-code/json-firestore-seed","last_synced_at":"2026-05-09T07:01:06.409Z","repository":{"id":356584150,"uuid":"1093953599","full_name":"shayyz-code/json-firestore-seed","owner":"shayyz-code","description":"A simple CLI tool to bulk-insert documents into Google Firestore from a JSON file.","archived":false,"fork":false,"pushed_at":"2026-05-08T17:43:25.000Z","size":76,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2026-05-08T19:36:38.849Z","etag":null,"topics":["data-entry","firestore","json","seed"],"latest_commit_sha":null,"homepage":"","language":"Rust","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/shayyz-code.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":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-11T04:04:31.000Z","updated_at":"2026-05-08T17:43:29.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/shayyz-code/json-firestore-seed","commit_stats":null,"previous_names":["shayyz-code/json-firestore-seed"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/shayyz-code/json-firestore-seed","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fjson-firestore-seed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fjson-firestore-seed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fjson-firestore-seed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fjson-firestore-seed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shayyz-code","download_url":"https://codeload.github.com/shayyz-code/json-firestore-seed/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shayyz-code%2Fjson-firestore-seed/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32809222,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-08T08:22:46.396Z","status":"online","status_checked_at":"2026-05-09T02:00:06.633Z","response_time":123,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["data-entry","firestore","json","seed"],"created_at":"2026-05-09T07:00:25.448Z","updated_at":"2026-05-09T07:01:06.376Z","avatar_url":"https://github.com/shayyz-code.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003ch1 align=\"center\"\u003eJSON Firestore Seed\u003c/h1\u003e\n\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://www.rust-lang.org\"\u003e\u003cimg src=\"https://img.shields.io/badge/rust-000000?logo=rust\u0026logoColor=white\u0026style=for-the-badge\" alt=\"Rust\" /\u003e\u003c/a\u003e\n  \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/MIT-green?style=for-the-badge\" alt=\"MIT\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/shayyz-code/json-firestore-seed/releases/latest\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/shayyz-code/json-firestore-seed?style=for-the-badge\" alt=\"Release\" /\u003e\u003c/a\u003e\n\u003c/p\u003e\n\n\u003cp align=\"center\"\u003e\n  A high-performance CLI tool to bulk-insert documents into \u003cb\u003eGoogle Firestore\u003c/b\u003e from a \u003cb\u003eJSON file\u003c/b\u003e.\n  Useful for migrations, seeding test data, backups restore, data imports, and development workflows.\n\u003c/p\u003e\n\n## Features\n\n- **Fast**: Parallel insertions with configurable concurrency.\n- **Efficient**: Support for Firestore **Batch Writes** to reduce write pressure.\n- **Flexible**: Specify document IDs via a field or let Firestore auto-generate them.\n- **Safe**: Preview transformations with `--dry-run` mode.\n- **Robust**: Automatic retries with exponential backoff for transient failures.\n- **Timestamps**: Native support for Firestore Timestamps using special markers.\n\n## Installation\n\n### Via Cargo (Recommended)\n\nIf you have Rust installed, you can install with cargo:\n\n```bash\ncargo install json-firestore-seed\n```\n\n### Via Shell Script (Linux/macOS)\n\nFor a quick one-liner installation:\n\n```bash\ncurl -sSL https://raw.githubusercontent.com/shayyz-code/json-firestore-seed/master/scripts/install.sh | sh\n```\n\n### Via Homebrew\n\n```bash\nbrew tap shayyz-code/tap\nbrew install json-firestore-seed\n```\n\n### Via NPM\n\n```bash\nnpm install -g json-firestore-seed\n```\n\n### Via GitHub Releases\n\nDownload the latest binary for your platform from the [Releases](https://github.com/shayyz-code/json-firestore-seed/releases/latest) page.\n\n## Authentication\n\nBy default, the tool looks for a service account key file named `application_default_credentials.json` in the current directory.\n\n1.  Firebase Console → Project Settings → **Service Accounts**\n2.  Click **Generate new private key**\n3.  Save it and provide the path using the `-k` or `--credentials` flag.\n\n## Usage\n\n```bash\njson-firestore-seed -j data.json -c users -p my-firestore-project\n```\n\n### Parameters\n\n| Flag | Long Form       | Default                                  | Description                             |\n| ---- | --------------- | ---------------------------------------- | --------------------------------------- |\n| `-j` | `--json`        | (required)                               | Path to JSON file (must be an array)    |\n| `-c` | `--collection`  | (required)                               | Target Firestore collection name        |\n| `-p` | `--project`     | (required)                               | Google Cloud Project ID                 |\n| `-k` | `--credentials` | `./application_default_credentials.json` | Path to service account JSON key file   |\n| `-i` | `--id-field`    | (auto-generate)                          | Field in JSON to use as document ID     |\n| `-d` | `--dry-run`     | `false`                                  | Preview transformations without writing |\n| `-m` | `--concurrency` | `4`                                      | Number of parallel write tasks          |\n| `-r` | `--retries`     | `3`                                      | Number of retries for failed writes     |\n| `-b` | `--batch-size`  | `1`                                      | Items per Firestore batch (max 500)     |\n\n## JSON Format \u0026 Timestamps\n\nThe input JSON must be an array of objects.\n\n### Firestore Timestamp Markers\n\n- `__fire_ts_now__`: Sets the field to the current server time.\n- `{ \"__fire_ts_from_date__\": \"YYYY-MM-DD HH:MM:SS\" }`: Parses a specific date string. Supports RFC3339 and common naive formats.\n\n**Example:**\n\n```json\n[\n    {\n        \"id\": \"user_1\",\n        \"name\": \"Alice\",\n        \"created_at\": { \"__fire_ts_from_date__\": \"2024-11-11T11:21:56Z\" },\n        \"updated_at\": \"__fire_ts_now__\"\n    }\n]\n```\n\n## Troubleshooting\n\n### \"Authentication failed\"\n\n- Ensure your service account key is valid and has the `Cloud Datastore User` or `Firebase Firestore Admin` role.\n- Verify the path to your credentials file using `--credentials`.\n\n### \"Permission Denied\"\n\n- Check if the Project ID matches your Firestore instance.\n- Ensure the service account has write access to the specific collection.\n\n### \"JSON must be an array\"\n\n- The root element of your JSON file must be a `[` (array). Individual objects are not supported as top-level elements.\n\n## Contributing\n\n1.  Fork the repository.\n2.  Read the [CONTRIBUTING.md](CONTRIBUTING.md) guide.\n3.  Create your feature branch (`git checkout -b feature/amazing-feature`).\n4.  Commit your changes (`git commit -m 'feat: add amazing feature'`).\n5.  Push to the branch (`git push origin feature/amazing-feature`).\n6.  Open a Pull Request.\n\n## License\n\nThis project is licensed under the [MIT License](LICENSE) — free for personal \u0026 commercial use.\n\nCopyright (c) 2025 shayyz-code.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayyz-code%2Fjson-firestore-seed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshayyz-code%2Fjson-firestore-seed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshayyz-code%2Fjson-firestore-seed/lists"}