Reputation: 5419
I've set up Firebase command line tools. I've uploaded my files to Firebase Hosting. All is okay.
After this I changed Database rules via console in browser.
The question is: how to fetch (download) Firebase's files from server to my local directory?
I can't find such command neither on Github nor on Reference nor on this guide.
Upvotes: 6
Views: 2189
Reputation: 401
I don't know which version this became available. But you can now manage rules via REST and the firebase cli
See these docs https://firebase.google.com/docs/database/rest/app-management
From REST
curl 'https://docs-examples.firebaseio.com/.settings/rules.json?auth=FIREBASE_SECRET'
From Firebase CLI
firebase database:get /.settings/rules
Upvotes: 2
Reputation: 26313
This currently isn't possible, though I'll make note of this as a feature request.
In general, if you're using the CLI to deploy database rules we encourage you to always use the CLI to update the rules (or immediately copy and paste the newly-updated rules to your local copy). Since rules deployed by the CLI are often stored in version control systems, this is often the best way to make sure that a project with multiple contributors doesn't accidentally trample each other's rules.
Upvotes: 5