-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
6946e61
commit c99f094
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -21,4 +21,31 @@ Command Line Interface with admin rights for Firebase.Auth, Firebase.Firestore, | |
> firebase-cli | ||
``` | ||
|
||
![Firebase Admin CLI Screen](https://github.com/siarheidudko/firebase-admin-cli/raw/main/example.png "Firebase Admin CLI Screen") | ||
```bash | ||
siarhei@MacBook-Pro firebase-admin-cli % export GOOGLE_APPLICATION_CREDENTIALS=/Users/siarhei/Projects/firebase-admin-cli/serviceAccount.json | ||
siarhei@MacBook-Pro firebase-admin-cli % firebase cli | ||
|
||
> [email protected] start | ||
> node ./bin/firebase-cli.js | ||
|
||
The following settings are loaded: | ||
Service Account from file: /Users/siarhei/Projects/firebase-admin-cli/serviceAccount.json | ||
Project id: fir-engine-f1dcd | ||
┌─────────┬──────────┬───────────────────────────────────────────┬──────────────────────────────────────────────────────────┐ | ||
│ (index) │ command │ title │ alias │ | ||
├─────────┼──────────┼───────────────────────────────────────────┼──────────────────────────────────────────────────────────┤ | ||
│ 0 │ 'help()' │ 'Сall current help' │ 'help()' │ | ||
│ 1 │ 'auth' │ 'Сall firebase authorization interface' │ 'admin.auth()' │ | ||
│ 2 │ 'db' │ 'Сall firebase firestore interface' │ 'admin.firestore()' │ | ||
│ 3 │ 'bucket' │ 'Сall firebase storage/bucket interface' │ 'admin.storage().bucket("fir-engine-f1dcd.appspot.com")' │ | ||
│ 4 │ 'types' │ 'Сall firebase firestore types interface' │ 'admin.firestore' │ | ||
│ 5 │ 'exit()' │ 'Exit console' │ 'terminalInterface.close()' │ | ||
└─────────┴──────────┴───────────────────────────────────────────┴──────────────────────────────────────────────────────────┘ | ||
Firebase Admin CLI (fir-engine-f1dcd)>const users = await db | ||
.collection('users') | ||
.get(); | ||
console.log('users', users.docs); | ||
Firebase Admin CLI (fir-engine-f1dcd)> | ||
users [] | ||
Firebase Admin CLI (fir-engine-f1dcd)> | ||
``` |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
{ | ||
"name": "firebase-admin-cli", | ||
"description": "Cli for firebase project", | ||
"version": "1.1.0", | ||
"version": "1.1.1", | ||
"author": "Siarhei Dudko <[email protected]>", | ||
"license": "GPL-3.0", | ||
"main": "./bin/firebase-cli.js", | ||
|