How do I switch apps from the firebase cli?

wvm2008 picture wvm2008 · Apr 5, 2016 · Viewed 42.7k times · Source

This seems like something which should be pretty easy to do, but for whatever reason, I'm being defeated.

I'm trying to use the firebase-tools CLI to interact with my database. I'm able to login without any trouble, and when I type firebase list, I get a list of all my current apps. It also tells me which app I'm currently connected to.

My problem is, I want to connect to one of the other apps. I'm running queries on my staging app, and I need to run them on my production app. I can see the production app in the list, but I'm not finding any way to switch to that app.

Thoughts?

Answer

J100 picture J100 · Aug 30, 2017

Found some useful information here Firebase CLI Reference.

The following code works for me.

firebase use <project_id>