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]

1 Answer 1

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.

4
  • Thank you for your quick answer. It is really disappointing. I already knew about the functionality to download the function's files from the Firebase Console, but I think the firebase-tools should provide a feature like this to sync the local environment with the cloud. Jul 28, 2020 at 17:27
  • 2
    You're free to send your feedback to Firebase support. support.google.com/firebase/contact/support Jul 28, 2020 at 17:28
  • Shure, I will do it! Jul 28, 2020 at 17:30
  • do you know if this is true for cloud functions as well? Sep 28, 2020 at 9:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.