FastStore CLI
The FastStore Command Line Interface
The FastStore Command Line Interface (CLI) is the main pre-configured tool for initializing, building and developing FastStore projects.
Also the CLI is the responsible on keeping the stores up-to-date with the @faststore/core package and enables the cloud platform to understand the FastStore project.
Installation
From the command line in your project directory, run:
npm install -g @faststore/cli
$ npm install -g @faststore/cli
$ faststore COMMAND
running command...
$ faststore (--version)
@faststore/cli/4.0.0 darwin-arm64 node-v20.19.3
$ faststore --help [COMMAND]
USAGE
$ faststore COMMAND
...
Commands
faststore build [ACCOUNT] [PATH]
USAGE
$ faststore build [ACCOUNT] [PATH] [--no-verify]
ARGUMENTS
[ACCOUNT] The account for which the Discovery is running. Currently noop.
[PATH] The path where the FastStore being built is. Defaults to cwd.
FLAGS
--no-verify Skips verification of faststore dependencies version string to prevent usage of packages outside npm
registry.
faststore cache-graphql [STORE]
USAGE
$ faststore cache-graphql [STORE] [--queries <value>] [--config <value>]
ARGUMENTS
[STORE] The path where the FastStore being built is or the persisted-document path. Defaults to cwd.
FLAGS
--config=<value> The path where the discovery.config is located
--queries=<value> The path to locate persisted-document file.
faststore cms-sync [PATH]
USAGE
$ faststore cms-sync [PATH] [-d]
ARGUMENTS
[PATH] The path where the FastStore being synched with the CMS is. Defaults to cwd.
FLAGS
-d, --dry-run
faststore create [PATH]
Creates a discovery folder based on the starter.store template.
USAGE
$ faststore create [PATH]
ARGUMENTS
[PATH] The path where the Discovery folder will be created. Defaults to ./discovery.
DESCRIPTION
Creates a discovery folder based on the starter.store template.
EXAMPLES
$ yarn faststore create discovery
faststore dev [PATH] [ACCOUNT] [PORT]
USAGE
$ faststore dev [PATH] [ACCOUNT] [PORT] [--watch-plugins]
ARGUMENTS
[PATH] The path where the FastStore being run is. Defaults to cwd.
[ACCOUNT] The account for which the Discovery is running. Currently noop.
[PORT] The port where FastStore should run. Defaults to 3000.
FLAGS
--watch-plugins Enable watching for plugin changes
faststore generate
USAGE
$ faststore generate
faststore help [COMMAND]
Display help for faststore.
USAGE
$ faststore help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for faststore.
See code: @oclif/plugin-help
faststore prepare [PATH]
USAGE
$ faststore prepare [PATH]
ARGUMENTS
[PATH] The path where the FastStore being run is. Defaults to cwd.
faststore serve [ACCOUNT] [PATH] [PORT]
USAGE
$ faststore serve [ACCOUNT] [PATH] [PORT]
ARGUMENTS
[ACCOUNT] The account for which the Discovery is running. Currently noop.
[PATH] The path where the FastStore being run is. Defaults to cwd.
[PORT] The port where FastStore should run. Defaults to 3000.
faststore test [PATH]
USAGE
$ faststore test [PATH]
ARGUMENTS
[PATH] The path where the FastStore being tested is. Defaults to cwd.