Introduction
Dartblaze CLI is a powerful command-line interface tool for managing Firebase and Google Cloud projects and functions.
Installation
INFO
Installation instructions coming soon
Basic Usage
To see all available commands, run:
dartblaze
Commands
doctor
Check your system for potential issues and verify your setup.
Usage
dartblaze doctor
Description
The doctor command runs a series of diagnostics to ensure your development environment is properly configured.
login
Usage
dartblaze login
Description
Authenticate with Firebase and Google Cloud services. This command must be run before using any commands that require authentication.
logout
Usage
dartblaze logout
Description
Sign out from Firebase and Google Cloud services and remove local authentication credentials.
init
Usage
dartblaze init --email <user-email> --project-id <project-id>
Options
Option | Alias | Required | Description |
---|---|---|---|
--email | -e | Yes | User email for granting deployment permissions |
--project-id | -p | Yes | Google Cloud project ID |
Description
Initialize a new project with EventArc service account and set up deployment permissions. The email address must be valid and follow standard format.
Example
dartblaze init --email [email protected] --project-id my-cloud-project
use
Usage
dartblaze use <project-id>
Description
Set the active project for Firebase and Google Cloud operations. All subsequent commands will be executed in the context of this project.
WARNING
Use command can only be used after the project has been initialized with init
command.
Example
dartblaze use my-project-id
projects:list
Usage
dartblaze projects:list
Description
Display a list of all Firebase projects associated with your account. Requires authentication.
deploy
Usage
dartblaze deploy <function-name> --region=<database_region>
Options
Option | Required | Description |
---|---|---|
--region | Yes | Region of the database |
--max-instances | No | Maximum number of instances for this function, defaults to 1 |
Description
Deploy a Cloud Function to your active project. If no function name is specified, all functions will be deployed.
WARNING
Multi-region Firestore deployments are not available at this time.
DANGER
Make sure to clear your GCP storage after successful deployment(s). Deployment uses Cloud Build service which stores a copy of your code in Cloud Storage.
Not clearning storage regularly will result in increased bill.
Example
dartblaze deploy authFunction --region=europe-west3
delete
Usage
dartblaze delete <function-name>
Description
WARNING
This command deletes the specified function from all regions
Delete a Cloud Function and its associated triggers. Use with caution as this action cannot be undone.
Example
dartblaze delete oldFunction