{"id":26326291,"url":"https://github.com/harehare/blazeman","last_synced_at":"2025-03-15T19:36:21.650Z","repository":{"id":57685130,"uuid":"476757004","full_name":"harehare/blazeman","owner":"harehare","description":"blazeman is a command line interface for Cloud Firestore written in Rescript. blazeman that makes query and update easy.","archived":false,"fork":false,"pushed_at":"2022-04-26T14:26:14.000Z","size":241,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-05T09:46:11.343Z","etag":null,"topics":["cli","firebase","firestore"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/blazeman","language":"ReScript","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/harehare.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":"2022-04-01T14:39:31.000Z","updated_at":"2023-02-13T22:22:40.000Z","dependencies_parsed_at":"2022-09-18T08:52:04.245Z","dependency_job_id":null,"html_url":"https://github.com/harehare/blazeman","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/harehare%2Fblazeman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fblazeman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fblazeman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/harehare%2Fblazeman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/harehare","download_url":"https://codeload.github.com/harehare/blazeman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243783594,"owners_count":20347404,"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":["cli","firebase","firestore"],"created_at":"2025-03-15T19:36:19.048Z","updated_at":"2025-03-15T19:36:21.645Z","avatar_url":"https://github.com/harehare.png","language":"ReScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"blazeman - Cloud Firestore CLI\n\u003cimg src=\".github/icon.svg\" alt=\"logo\" title=\"logo\" width=\"32\"\u003e\n========================================\n\nblazeman is a command line interface for Cloud Firestore written in Rescript. blazeman that makes query and update easy.\n\n# Installation\n\nTo install run\n\n```\n$ npm install -g blazeman\n```\n\n## How to Use\n\n## Prerequisites\n\nSet the environment variable GOOGLE_APPLICATION_CREDENTIALS to the file path of the json file containing the service account key.\n\n## Commands overview\n\n`bm`, show current project name.\n\n```sh\n$ bm\nActive Project: XXXXXXXX\n```\n\n`bm list`, which lists collections.\n\n```sh\n$ bm list\n[\n  \"collection1\",\n  \"collection2\",\n]\n```\n\n`bm docs`, retrieve docs in the collection.\n\n```sh\n$ bm docs \"/collection1/[enabled == true]/{id, name, description, enabled}\"\n[\n  {\n      id: \"test\",\n      name: \"name\",\n      description: \"description\",\n      enabled: true\n  }\n]\n```\n\n`bm set`, to add or set an document.\n\n```sh\n$ bm set \"/collection1/docId1\" --json='{\"field1\": 1, \"field2\": \"2\"}' --dry-run=false\n{\n  \"field1\": 1\n  \"field2\": \"2\"\n}\n$ echo '{\"field1\": 1, \"field2\": \"2\"}' | bm set \"/collection1/docId1\" --dry-run=false\n{\n  \"field1\": 1\n  \"field2\": \"2\"\n}\n```\n\n`bm update`, to update an document.\n\n```sh\n$ bm update \"/collection1/docId1\" --json='{\"field1\": 10}' --dry-run=false\n{\n  \"field1\": 10\n  \"field2\": \"2\"\n}\n$ echo '{\"field1\": 10}' | bm update \"/collection1/docId1\" --dry-run=false\n{\n  \"field1\": 10\n  \"field2\": \"2\"\n}\n```\n\nTo find more features, `bm help` or `bm [Subcommands] help` will show you complete list of available commands.\n\n```sh\n$ bm help\nbm is a command line tool to Firebase firestore.\nUsage:\n    bm  Show current project id\n    bm \u003cSubcommands\u003e [Options]\n\nSubcommands:\n    get    Retrieve an doc by specifying collection path.\n    docs   Retrieve docs in a collection.\n    set    Create a new doc, or replace an existing doc.\n    update Update an existing doc.\n    delete Delete an existing collection or doc.\n    help   Prints this message\n$ bm docs help\nGet documents from Firestore collection.\n\nUsage:\n    bm docs \"[Collectiotn path]\" [Options]\n    bm docs \"[Collectiotn path]/[Queries]\" [Options]\n    bm docs \"[Collectiotn path]/[Queries]/[Fields|Order by]\" [Options]\n    bm docs code \"[Collectiotn path]/[Queries]/[Fields|Order by]\" [Options]\n\nCollectiotn path:\n    /collection\n    /collection/docid/subcollection\nQueries:\n    /[field == 'string value']\n    /[field == int value]/\n    /[field == true]/\n    /[field == false]/\n    /[field != value]/\n    /[field \u003e= value]/\n    /[field \u003e value]/\n    /[field \u003c value]/\n    /[field \u003c= value]/\n    /[map.value == value]/\n    /[array contains value]/\nFields:\n    /{field1, field2}\nOrder by:\n    /{^field1, _field2}\nOptions:\n    -l, --limit=\u003climit\u003e defaults to 30\n    -s, --offset=\u003coffset\u003e defaults to 0\n    -a, --start-at=\u003cstartAt\u003e\n    -f, --format=\u003cjson|table|csv\u003e\n```\n\n## License\n\n[MIT](http://opensource.org/licenses/MIT)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Fblazeman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fharehare%2Fblazeman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fharehare%2Fblazeman/lists"}