firebase-project-manager
Create and manage your Firebase projects from the command line or with code!
Example Usage
As a Command-Line Tool
$ firebase-project-manager login$ firebase-project-manager create my-new-project
As a Node.JS Dependency
const authenticate createFirebaseProject = ; await ;const createdProjectId = await ;console;
Installation
As a package dependency:
$ yarn add firebase-project-manager # OR $ npm i firebase-project-manager
As a global binary tool:
$ yarn global add firebase-project-manager# OR $ npm i -g firebase-project-manager
CLI Usage
This utility can either be used in an interactive mode, or single-command/single-action mode.
To access the interactive tool, use the following command:
$ firebase-project-manager
To utilize a single function of the executable, run the following to view all options (API is subject to change):
$ firebase-project-manager --help
Note: You may need to use $ yarn firebase-project-manager
if you do not have the package installed globally.
Node.JS API Usage
Embedded below are all of the functions available for import through this package currently. Since the APIs are subject to heavy change right now, official documentation will not be produced until the package is ready for an initial major release. Using exact symver numbers in your package.json
recommended until then as any changes up until v1.0.0
can be considered breaking changes.
// src/index.ts ;;;;; ; /** Static OAuth client managed by `authenticate` and `deauthenticate` */; /** * Authenticates client with Firebase Project Manager and retains a refresh token in the * system's configuration store for later usage. * @param verbose If true, authentication status will be logged with `console.log`. * @return Void promise resolved upon completion */; /** * Deauthenticates the currently logged in user, revokes and deletes the currently cached * refresh_token stored in the system's configuration store. * @param verbose If true, authentication status will be logged with `console.log`. * @return Void promise resolved upon completion */; /** * Creates a new Firebase Project via a two step process of first creating a CGP Project * and then secondly adding Firebase resources to it. * @param name Desired display name for the underlying GCP project. If available, this name * will also be used as a `projectId` by replacing all non-whitespace characters with '-' * and making all alphabetic characters lower-case. * @param cb function called with progress of project creation. * @return Promise to the newly created project's `projectId`. */ /** * Creates a new GCP project using Google `cloudresourcemanager`. * @param name Desired display name for the underlying GCP project. If available, this name * will also be used as a `projectId` by replacing all non-whitespace characters with `-` * and making all alphabetic characters lower-case. * @param cb function called with progress of project creation. * @return Promise to the newly created project's `projectId`. */ /** * Adds Firebase resources to a GCP Project * @param projectId projectId of the GCP Project to add Firebase features to. * @param cb function called with progress of project creation. * @return Void promise resolved upon completion */ /** * Lists all GCP Projects with Firebase resources. * @param pageSize The maximum number of Projects to return * @param pageToken Token returned from a previous call indicating where in the * set of Projects to resume listing. * @return Promise to an array of Firebase Projects *//** * Lists all GCP Projects lacking Firebase resources, but that are available to become Firebase * projects. * @param pageSize The maximum number of Projects to return * @param pageToken Token returned from a previous call indicating where in the * set of Projects to resume listing. * @return Promise to an array of GCP Projects */ /** * Retrieves information for a given Firebase project. * @param projectId projectId of the Firebase project to retrieve * @return Promise to a Firebase Project */ /** * Lists all applications associated with a Firebase Project. * @param projectId projectId of the Firebase project to retrieve apps of * @param pageSize The maximum number of Apps to return * @param pageToken Token returned from a previous call indicating where in the * set of Apps to resume listing. */ /** * Creates a new web application under a given Firebase Project. * @param projectId projectId of the parent Firebase project to create an application for * @param displayName User-assigned display name of the App. * @param appUrls Fully qualified URLs where the App is hosted. */ /** * Retrieves information for a given Firebase Project's app. * @param name Fully qualified identifier for the webapp (Eg: `/projects/.../webApp/...`) */;/** * Retrieves information for a given Firebase Project's app. * @param projectId projectId of the parent Firebase project * @param appId The webapp's ID. */; /** * Retrieves configuration information for a given Firebase Project's app. * @param name Fully qualified identifier for the webapp (Eg: `/projects/.../webApp/...`) */;/** * Retrieves configuration information for a given Firebase Project's app. * @param projectId projectId of the parent Firebase project * @param appId The webapp's ID. */;