Skip to content

Instantly share code, notes, and snippets.

@cutiko
Last active November 8, 2023 22:09
Show Gist options
  • Save cutiko/0686b198390c7fadc7f6f0d63fb00b76 to your computer and use it in GitHub Desktop.
Save cutiko/0686b198390c7fadc7f6f0d63fb00b76 to your computer and use it in GitHub Desktop.
Firebase CLI Cheat Sheet

functions and admin are for the functions project, same folder containing package.json

npm install firebase-functions@latest firebase-admin@latest --save

firebase-tools is the cli and should be global with sudo

npm install -g firebase-tools

Functions

Deploy current

firebase deploy --only functions:FUNCTION_NAME

Delete

firebase functions:delete FUNCTION_NAME

Deploy group

firebase deploy --only functions:ONE_FUNCTION,functions:TWO_FUNCTION

Change enviroment

firebase use ENV_NAME

Define the ENV_NAME on `.firebaseserc``

{
  "projects": {
    "default": "PROJECT_NAME",
    "prod": "PROJECT_NAME_COOLER"
  }
}

Current enviroment?

firebase use
Copy link

ghost commented Nov 8, 2023

awesome

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment