easy environments for firebase & firestore

Usage no npm install needed!

<script type="module">
  import fireStation from '';




The philosophy behind the CLI is to make it as user-friendly as possible. You won't need to run any commands or pass any arguments to this tool. You just have to run it :)

The tool aims to make it extremely painless to manage environments for your firebase projects from everything to creating cloud functions to deploying your site.

The only thing you will need is a firebase project per environment.


The tool requires that firebase-tools installed globally
npm i -g firebase-tools


npm i fire-station // locally
npm i fire-station -g //globally


The following command will bring up the CLI which is designed to be user-friendly and helpful.

// if installed globally

// if installed locally (use the npx module)

// or you could directly path to the cli

Current features in the CLI

The Cli should abstract away the firebase cli in most use cases and provide some additional goodies.

  1. Initialize

    Use this command to initialize fire-station in your project.
    Allows you to choose multiple firebase projects you own or have editor permissions on and mark them as 
    Allows you to setup deployments for the following:
    1. firebase cloud functions
    2. hosting
    3. realtime database rules
    4. firestore database rules
    5. storage rules
    6. create boilerplate cloud function (Realtime Trigger, Firestore Trigger, HTTP, Auth, Pub Sub Scheduled Function)
    Creates a function in the "cloud-functions" directory in your project root and sets up typescript/javascript.
    Creates files to store secrets and environment vars (and passes them to each created function).
  2. Deploy

    Allows you to deploy any piece of your configuration across multiple environments.
  3. Copy Auth and Realtime database from one environment to another

    Copy an environment on top of another. You can choose to copy over:
    1. Auth
    2. Realtime Database
    3. Firestore
  4. Create a backup

     Lets you create named backups of your environment. You can backup the following:
     1. Auth
     2. Realtime Database
     3. Firestore
  5. Restore a backup

     Lets you restore one of the named backups you created to an environment. You can restore the following:
     1. Auth
     2. Realtime Database
     3. Firestore
  6. Delete secrets

     This option will delete the .fire-station-secrets folder.
     Fire-station asks you for service-accounts & auth hashing config and give you clickable links of how to get them.
     The secrets are stored in the .fire-station-secrets folder in the root of your project and are automatically
     marked in your .gitignore file.
     fire-station will only ask for secrets when necessary:
     1) hash_configs when copying auth
     2) service-accounts when backing up or restoring firestore

*** Known Bugs *** If you have no functions, the deploy command will fail. If you deploy to multiple environments at once, the deploy command will fail.

These will be addressed sometime in the future.