Reputation: 1591
How do I authenticate as admin from the command line to dump out / query the data in my firestore? Example, I have a users
collection where each document looks like:
{
edit_count: 15
}
I simply want to print all these documents as json in my terminal.
I've used firebase-tools, but it looks like it's only supporting querying of the RTDB?
Upvotes: 32
Views: 13623
Reputation: 826
While waiting for firebase-tools to support more firestore commands, I wrote a basic firestore client that you might find useful:
https://github.com/sgarciac/fuego
Upvotes: 16
Reputation: 18958
At the moment (July 2018) Firebase CLI supports database commands (get, set, push etc etc) only for the Realtime Database probably due to Firestore beeing in beta.
Hopefully it will support it later.
Upvotes: 12
Reputation: 1591
Read the documentation here: https://firebase.google.com/docs/admin/setup
This will teach you how to set up local auth to your firestore data.
Upvotes: -14