{"id":17815625,"url":"https://github.com/siarheidudko/firebase-admin-cli","last_synced_at":"2026-02-27T03:05:18.228Z","repository":{"id":65547411,"uuid":"565943903","full_name":"siarheidudko/firebase-admin-cli","owner":"siarheidudko","description":"Cli for firebase","archived":false,"fork":false,"pushed_at":"2026-02-05T01:38:11.000Z","size":585,"stargazers_count":6,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-21T16:44:55.642Z","etag":null,"topics":["authentication","cli","data-manipulation","data-migratation","data-science","firebase","firebase-admin","firebase-auth","firebase-authentication","firebase-database","firebase-firestore","firebase-firestore-database","firebase-realtime-database","firebase-storage","firebase-tools","firebase-ui","firestore","google-cloud-storage","rtdb","storage"],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/firebase-admin-cli","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/siarheidudko.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":"FUNDING.yml","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},"funding":{"patreon":"dudko_dev","custom":["https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"]}},"created_at":"2022-11-14T16:45:21.000Z","updated_at":"2026-02-05T01:38:14.000Z","dependencies_parsed_at":"2023-11-10T11:34:58.588Z","dependency_job_id":"53d695c7-bdce-451e-8210-c3ee5aa40a1c","html_url":"https://github.com/siarheidudko/firebase-admin-cli","commit_stats":{"total_commits":92,"total_committers":1,"mean_commits":92.0,"dds":0.0,"last_synced_commit":"5fdd021057a6374d4b92c190e26e03e3751942e0"},"previous_names":[],"tags_count":86,"template":false,"template_full_name":null,"purl":"pkg:github/siarheidudko/firebase-admin-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Ffirebase-admin-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Ffirebase-admin-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Ffirebase-admin-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Ffirebase-admin-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/siarheidudko","download_url":"https://codeload.github.com/siarheidudko/firebase-admin-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/siarheidudko%2Ffirebase-admin-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29883111,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-26T23:51:21.483Z","status":"online","status_checked_at":"2026-02-27T02:00:06.759Z","response_time":57,"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":["authentication","cli","data-manipulation","data-migratation","data-science","firebase","firebase-admin","firebase-auth","firebase-authentication","firebase-database","firebase-firestore","firebase-firestore-database","firebase-realtime-database","firebase-storage","firebase-tools","firebase-ui","firestore","google-cloud-storage","rtdb","storage"],"created_at":"2024-10-27T16:17:16.984Z","updated_at":"2026-02-27T03:05:18.197Z","avatar_url":"https://github.com/siarheidudko.png","language":"JavaScript","readme":"# firebase-admin-cli\n\nEmpower Your Firebase Project with Ultimate Control: Unleash the Full Potential of Firebase's Auth, Realtime Database, Firestore, Storage, and More, All Through a Powerful Command Line Interface with Admin Privileges!\n\n[![npm](https://img.shields.io/npm/v/firebase-admin-cli.svg)](https://www.npmjs.com/package/firebase-admin-cli)\n[![npm](https://img.shields.io/npm/dy/firebase-admin-cli.svg)](https://www.npmjs.com/package/firebase-admin-cli)\n[![NpmLicense](https://img.shields.io/npm/l/firebase-admin-cli.svg)](https://www.npmjs.com/package/firebase-admin-cli)\n![GitHub last commit](https://img.shields.io/github/last-commit/siarheidudko/firebase-admin-cli.svg)\n![GitHub release](https://img.shields.io/github/release/siarheidudko/firebase-admin-cli.svg)\n\n## Install\n\n```bash\nnpm i firebase-admin-cli -g\n```\n\n## Run\n\n```bash\n\u003e export GOOGLE_APPLICATION_CREDENTIALS=/FULL_PATH_TO_YOUR_SERVICE_ACCOUNT.json\n\u003e firebase-cli\n```\n\n## How to use\n\nJust use JavaScript to manage the database.\n\n- You can use one-line commands\n\n```js\nconsole.log(\n  await db\n    .collection(\"users\")\n    .get()\n    .then(({ docs }) =\u003e docs.map((e) =\u003e e.data()))\n);\n```\n\n```js\nconst users = await db.collection(\"users\").get();\nconsole.log(users.docs.map((e) =\u003e e.data()));\n```\n\n- You can insert multi-line scripts\n\n```js\n// command 1 (use Ctrl + V to input multiline code)\nconst users = await db.collection(\"users\").get();\nconst arr = users.docs.map((e) =\u003e e.data());\nconsole.log(arr);\n```\n\n- You can assign the result of a command to variables and use them in another command\n\n```js\n// command 1\nconst users = await db.collection(\"users\").get();\n```\n\n```js\n// command 2\nconst arr = users.docs.map((e) =\u003e e.data());\n```\n\n```js\n// command 3\nconsole.log(arr);\n```\n\n- You can output the result of the command to the console (you can study the structures and utility properties and methods of objects)\n\n```js\nconsole.log(await db.collection(\"users\").get());\n```\n\n- You can even execute your script from a file using require();\n\n```js\nrequire(\"../examples/my_migration_script_test.js\").run();\n```\n\nmy_migration_script_test.js\n\n```js\nconst admin = require(\"firebase-admin\");\n\nmodule.exports.run = async () =\u003e {\n  const users = await admin.firestore().collection(\"users\").get();\n  const arr = users.docs.map((e) =\u003e e.data());\n  console.log(arr);\n};\n```\n\n## Example\n\n```bash\nsiarhei@MacBook-Pro firebase-admin-cli % export GOOGLE_APPLICATION_CREDENTIALS=/Users/siarhei/Projects/firebase-admin-cli/serviceAccount.json\nsiarhei@MacBook-Pro firebase-admin-cli % firebase cli --with=../examples/my_extension.js\n\n\u003e firebase-admin-cli@1.0.0 start\n\u003e node ./bin/firebase-cli.js\n\nThe following settings are loaded:\nService Account from file: /Users/siarhei/Projects/ireceipt-pro/firebase/functions/accounts/production.json\nProject id: ireceipt-pro\nExtension is loaded: ../examples/my_extension.js\nThe following methods are now available to you: ext.printFile\n┌─────────┬───────────┬───────────────────────────────────────────┬─────────────────────────────┐\n│ (index) │ command   │ title                                     │ alias                       │\n├─────────┼───────────┼───────────────────────────────────────────┼─────────────────────────────┤\n│ 0       │ 'help()'  │ 'Сall current help'                       │ 'help()'                    │\n│ 1       │ 'auth'    │ 'Сall firebase authorization interface'   │ 'admin.auth()'              │\n│ 2       │ 'rtdb'    │ 'Сall firebase database interface'        │ 'admin.database()'          │\n│ 3       │ 'db'      │ 'Сall firebase firestore interface'       │ 'admin.firestore()'         │\n│ 4       │ 'storage' │ 'Сall firebase storage interface'         │ 'admin.storage()'           │\n│ 5       │ 'bucket'  │ 'Сall firebase storage/bucket interface'  │ 'admin.storage().bucket()'  │\n│ 6       │ 'types'   │ 'Сall firebase firestore types interface' │ 'admin.firestore'           │\n│ 7       │ 'exit()'  │ 'Exit console'                            │ 'terminalInterface.close()' │\n└─────────┴───────────┴───────────────────────────────────────────┴─────────────────────────────┘\nFirebase Admin CLI (ireceipt-pro)\u003e\n```\n\n## Extensions\n\nYou can create your own extensions for the application and run them inside the console.\n\nIf you want to use extensions, just list them using the prefix `--with=`, for example:\n\n```bash\nsiarhei@MacBook-Pro firebase-admin-cli % firebase cli --with=../examples/my_extension.js --with=../examples/my_extension_2.js --with=../examples/my_extension_3.js\n```\n\nAfter that, you can use the extension commands. For example:\n\n```js\next.printFile(\"users/test_file.json\")\n```\n\nHere is example of the JavaScript extension (also you can use TypeScript):\n\n```js\nconst { tools } = require(\"firebase-admin-cli\");\n\n/**\n * Print a GCS file data\n *\n * Example `ext.printFile(\"users/test_file.json\");`\n * @param {String} path - file path\n */\nconst printFile = async (path) =\u003e {\n  console.log(\n    await tools.bucket\n      .file(path)\n      .download()\n      .then(([buf]) =\u003e buf.toString())\n  );\n};\n\nmodule.exports = { printFile };\n```\n","funding_links":["https://patreon.com/dudko_dev","https://paypal.me/dudkodev","https://www.buymeacoffee.com/dudko.dev"],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Ffirebase-admin-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsiarheidudko%2Ffirebase-admin-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsiarheidudko%2Ffirebase-admin-cli/lists"}