A standalone CLI tool to assign Firebase custom roles to users using a service account key.
- Assign roles like
adminor custom roles to Firebase Authentication users. - Works via service account credentials.
- Lightweight and secure; no server or cloud function required.
- Supports multiple roles per user (optional).
Build the CLI from source (Go required):
git clone https://github.com/ranajahanzaib/firebase-roles.git
cd firebase-roles
go build -o firebase-roles main.go./firebase-roles --service-account=serviceAccountKey.json --uid=USER_UID --role=admin
--service-account: Path to your Firebase service account JSON key.
--uid: UID of the Firebase user to assign the role.
--role: Role to assign (e.g., admin). Can be used multiple times if supported.
Example:
./firebase-roles --service-account=serviceAccountKey.json --uid=abc123 --role=admin --role=moderator
We’d love to accept your patches and contributions to this project. There are just a few guidelines you need to follow.
This project follows the Contributor Covenant as its Code of Conduct, and we expect all project participants to adhere to it. Kindly read the full guide to understand what actions will not be tolerated.
Read our contributing guide to learn about our development process, how to propose bug fixes and improvements, and how to build and test your changes to the project.
Feel free to submit issues and enhancement requests. Use the template provided when creating an issue to ensure your request is clear and actionable.
See the open issues for a complete list of proposed features (and known issues).
This project is licensed under the MIT License, meaning that you’re free to modify, distribute, and/or use it for any commercial or private project.