FirebaseCLI導入
自動インストールスクリプトが用意されているので、curlコマンドを叩くだけで完了
https://firebase.google.com/docs/cli?authuser=0&hl=ja#mac-linux-auto-script
% curl -sL https://firebase.tools | bash
Password:
-- Checking for existing firebase-tools on PATH...
-- Checking your machine type...
-- Downloading binary from https://firebase.tools/bin/macos/latest
######################################################################## 100.0%#=#=#
-- Setting permissions on binary...
-- Checking your PATH variable...
-- firebase-tools@12.5.3 is now installed
-- All Done!
% firebase --version
12.5.3
FirebaseCLI動作テスト
macのコンソールから「firebase login」を実行する
% firebase login
i Firebase optionally collects CLI and Emulator Suite usage and error reporting information to help improve our products. Data is collected in accordance with Google's privacy policy (https://policies.google.com/privacy) and is not used to identify you.
? Allow Firebase to collect CLI and Emulator Suite usage and error reporting information? Yes
i To change your data collection preference at any time, run `firebase logout` and log in again.
Visit this URL on this device to log in:
https://accounts.google.com/o/oauth2/auth?client_id=131312469-fgrhgmd47bqnekij5i8b5pr03ho849e6.apps.googleusercontent.com&scope=email%20openid%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloudplatformprojects.readonly%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Ffirebase%20https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fcloud-platform&response_type=code&state=556775622&redirect_uri=http%3A%2F%2Flocalhost%3A9005
Waiting for authentication...
^@
✔ Success! Logged in as xxxxxxx@gmail.com
利用するgoogleアカウントを選択する画面が、ブラウザで表示される
プロジェクト一覧を表示してみる
まだプロジェクトを追加していない場合は、何も出ないはず
% firebase projects:list
✔ Preparing the list of your Firebase projects
┌──────────────────────┬──────────────┬────────────────┬──────────────────────┐
│ Project Display Name │ Project ID │ Project Number │ Resource Location ID │
├──────────────────────┼──────────────┼────────────────┼──────────────────────┤
│ skeet │ skeet-xxxxxx │ 4024xxxxxxxx │ [Not specified] │
└──────────────────────┴──────────────┴────────────────┴──────────────────────┘
1 project(s) total.