Documentation
Feedback
Guides
Storefront Development

Storefront Development
FastStoreGetting Started
3. FastStore CLI
The FastStore Command Line Interface (CLI) provides pre-configured scripts for starting, building, and developing FastStore projects. It also helps keep FastStore projects up to date with the @faststore/core package.

Running FastStore CLI on the project

The CLI is automatically added as a dependency in your project's package.json file, so once you run yarn install during the project setup, you can start using it in the project.

Installing FastStore CLI globally using npm

To use FastStore CLI commands globally on your machine, install the @faststore/cli using npm, and run the following command in the terminal:

_10
npm install -g @faststore/cli

Default commands

Below is a brief description of the default commands available in the FastStore CLI. For detailed information about each command, click the respective command name.
Running the commands through yarn is already enough to develop part of your store. However, to set up your project with Headless CMS and create new sections, you need to install the FastStore CLI and use its commands.
Command nameDescription
buildGenerates a production-ready storefront. It compiles the project and optimizes it for production usage.
cms-syncSyncs the cms folder of your FastStore project with Headless CMS.
devStarts the project in the development environment and useshttp://localhost:3000 as server by default. It allows you to make changes to the project and see the results locally on your machine in real time without affecting the production environment.
helpDisplays help for FastStore CLI commands.
generateGenerates the GraphQL types and optimizations from the FastStore project.
startExecutes the FastStore project in the root directory and useshttp://localhost:3000 as server by default.

dev

Starts the project in the development environment and uses http://localhost:3000 as server by default. It allows you to make changes to the project and see the results locally on your machine in real time without affecting the production environment.

Usage


_10
yarn dev


_10
faststore dev

build

Generates a production-ready storefront. It compiles the project and optimizes it for production usage.

Usage


_10
yarn build


_10
faststore build

start

Executes the FastStore project in the root directory and uses http://localhost:3000 as server by default.

Usage


_10
yarn start


_10
faststore start

cms-sync

Syncs the cms folder of your FastStore project with Headless CMS.

Usage


_10
yarn faststore cms-sync


_10
faststore cms-sync

help

Displays help for FastStore CLI commands.

Usage


_10
yarn faststore help


_10
faststore help [COMMAND] [-n]

Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
Was this helpful?
Yes
No
Suggest edits (Github)
Contributors
2
Photo of the contributor
Photo of the contributor
+ 2 contributors
On this page