@fstore/cli
TypeScript icon, indicating that this package has built-in type declarations

0.23.1 • Public • Published

FStore CLI tool

The FStore Command Line Interface (CLI) Tools can be used to manage and deploy your Cloud Functions projects(workspaces) from the command line.

Installation

You can install the FStore CLI using npm or yarn. To download and install the FStore CLI, run the following command:

// install using npm
# npm install -g @fstore/cli

// install using yarn
# yarn add --global @fstore/cli

Basic usage

You can see a list with all available commands by executing fstore --help. Also, you can see more detailed help for an individual command by typing fstore <command> --help.

To execute a command just type fstore <command> [options]. Below is a brief list of the available commands and their function:

Command Description
login Authenticate to your functions.store account. (Requires access to a web browser.)
logout Sign out of the function.store CLI.
create Create a new workspace
push Push a workspace to function.store
lint Check workspace for errors
function:add Create a new function in the specified workspace
emulators:install Setup firebase emulators in the specified workspace
emulators:start Start emulators in the specified workspace
generate:functions:entrypoint Generate index.js with functions entrypoint.
circleci Setup CircleCi in the specified workspace

If a command is workspace-specific, you must either be inside a workspace project directory or specify the path to it.

Command: login

Usage: fstore login [options]

The valid options for the command are:

  • -r or --reauth: Will force reauthentication even if you're already logged in.
  • -t <token> or --token <token>: Authenticate using the specified token

This command requires access to the default web browser

Command: create

Usage: fstore create <workspace name>

  • workspace name: A valid identifier for the workspace you want to create. It must be unique and contains only letters, numbers, and underscore.

Command: lint

Usage: fstore lint <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

Command: push

Usage: fstore push <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

Command: function:add

Usage: fstore function:add <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

Command: emulators:install

Usage: fstore emulators:install <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

Command: emulators:start

Usage: fstore emulators:start [options] <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

The valid options for the command are:

  • -p <projectId> or --project <projectId>: The id of the Firebase project to use with this command.
  • --only <emulators>: Run only specific emulators. This is a comma separated list of emulator names. Valid options are: auth, functions, firestore, database, pubsub, and storage.

Command: generate:functions:entrypoint

Usage: fstore generate:functions:entrypoint <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

When your have emulators running for some workspace and you modify any function by changing its trigger, you don't have to stop emulators to get the modified function up and runnig. By executing generate:functions:entrypoint command, the indexes for all the functions will be recreated and hot-reloaded by emulators.

Command: circleci

Usage: fstore circleci <workspace>

  • workspace: The path to the folder containing a valid workspace project. If not specified, it will use the current working directory.

Readme

Keywords

none

Package Sidebar

Install

npm i @fstore/cli

Weekly Downloads

0

Version

0.23.1

License

MIT

Unpacked Size

105 kB

Total Files

137

Last publish

Collaborators

  • maxxgreene
  • jltorress