12

I have 100ds of functions deployed to firebase and I would like to know if I can list the remote functions on my machine using the firebase command line tools.

I want to see the list of functions deployed.

What I am trying to solve is:

  • Batch deploy functions to avoid deployment limit.
  • Deployment error when function deleted/renamed locally and then deploying whole functions.

Thanks!

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
Jijo John
  • 1,368
  • 2
  • 17
  • 31
  • 1
    Not exactly what you are looking for but FYI you can list the deployed functions from the Google Cloud console (not the Firebase one), here: https://console.cloud.google.com/functions/list?project= – Renaud Tarnec Dec 10 '18 at 14:53
  • 1
    That sounds like an answer Renaud. ;-) Especially when you add that the Firebase CLI does not have an ability to list functions. – Frank van Puffelen Dec 10 '18 at 15:07
  • Thanks Renaud, I know I can see the list of functions on web console, I am looking for something using the command line. – Jijo John Dec 10 '18 at 15:30

4 Answers4

5

I got the exact answer from Google support.

Currently, Firebase CLI doesn’t have any command to list deployed functions, whereas “gcloud functions list” CLI from Cloud SDK shows the list instead.

More details found here

Jijo John
  • 1,368
  • 2
  • 17
  • 31
4

While it doesn't seem to be documented here, you can list all deployed Cloud Functions when you have firebase-tools installed with firebase functions:list. The command is also mentioned in firebase --help.

Verified with firebase-tools version 10.5.0

b2m9
  • 591
  • 2
  • 9
3

At the time of writing this answer, there is no CLI command that allows listing all the deployed functions for your project. The available commands can be found here: https://firebase.google.com/docs/cli/#commands

However, note that you can list the deployed functions in the Google Cloud console (not the Firebase one) by opening: https://console.cloud.google.com/functions/list?project=your_project_name

Renaud Tarnec
  • 79,263
  • 10
  • 95
  • 121
0

Cli command prints the list in table format that is hard to parse. I use node script for this

import * as client from 'firebase-tools';

(async () => {
  const functions = await client.functions.list();
  const functionNames: string[] = functions.map(({ id }) => id);

  console.log('functionNames', functionNames);
})();
kozzztya
  • 23
  • 4