skip to Main Content

I want to ask if it’s possible to create a Firebase project from the command line and automatically upgrade it to the Blaze plan? The official docs only refer to creating a Firebase project using the online console, however, it does not provide guidance on how to create / initialize the project using the CLI.

Is there a way to do that using the CLI?

2

Answers


  1. Yes, you can do it this way: firebase init hosting

    Select Create a new project and then follow the instructions

    enter image description here

    Login or Signup to reply.
  2. The CLI reference documentation says there is a command projects:create that:

    Creates a new Google Cloud project, then adds Firebase resources to the new project.

    Running the command with help:

    $ firebase projects:create --help
    Usage: firebase projects:create [options] [projectId]
    
    creates a new Google Cloud Platform project, then adds Firebase resources to the project
    
    Options:
      -n, --display-name <displayName>     (optional) display name for the project
      -o, --organization <organizationId>  (optional) ID of the parent Google Cloud Platform organization under
                                           which to create this project
      -f, --folder <folderId>              (optional) ID of the parent Google Cloud Platform folder in which to
                                           create this project
      -h, --help                           output usage information
    

    You should arrange for the CLI to have an auth token available for the account that should own the project, as suggested by the documentation.

    There are no documented billing operations provided by the Firebase CLI. You will likely need to manually associate your credit card with the project after you create it.

    Also see: Is it possible to upgrade my project from spark to blaze using firebase or gcp CLI?

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search