8

I am working on a Firebase project that currently uses several Cloud Functions. The thing is that I want to download or sync the Cloud Functions to the local environment on my laptop.

I mean some command using firebase-tools or another like:

git clone [project name]
git fetch [something]

Usually, we create some cloud functions using the Firebase Console, and I would like to have these functions locally to edit these when needed and deploy them again.

I know that firebase-tools have these two commands, but it is only for configurations:

functions:config:clone [options]
functions:config:get [options]
Yulio Aleman Jimenez
  • 1,642
  • 3
  • 17
  • 33

1 Answers1

4

There's no provided solution for automatically copying or synchronizing functions that have already been deployed. You can certain get the source code for deployed functions, but the Firebase CLI will not automate that process for you.

Ideally, you will want to manage all of your functions from the same source control and CLI in order to deal with them all consistent. Editing functions from the console is primarily a convenience, not a proper deployment mechanism.

Doug Stevenson
  • 297,357
  • 32
  • 422
  • 441