features ✨

  • custom contexts can be used to make Firestore more easily.
  • Top-Level Await support. powered by node-repl-wait.
  • syntax highlighting support. powered by pretty-repl.

usage 🚀

To use firepl, you need to get a key file for your firebase service account.

To generate a private key file for your service account:

  1. In the Firebase console, open Settings > Service Accounts.
  2. Click Generate New Private Key, then confirm by clicking Generate Key.
  3. Securely store the JSON file containing the key.

After downloading the service account key file, execute the following command.

# If you use npx command
npx firepl -c YOUR_SERVICE_ACCOUNT_FILE_PATH

# If you use global install
npm i -g firepl
firepl -c YOUR_SERVICE_ACCOUNT_FILE_PATH

custom context 🎮

Firepl allows you to use a custom context called firepl inside REPL.

name description
firepl.db This is the entry point of the Firestore operation for the firebase project specified in credentials. Result of admin.firestore().
firepl.getData(arg) Methods to get data from collectionsReference or documentReference.