Documentation
Feedback
Guides
Storefront Development

Storefront Development
Storefront development

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.

Before you begin

To ensure the FastStore CLI commands related to the Headless CMS run correctly, make sure to install the Headless CMS, its dependencies and plugins as described in the FastStore requirements.

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

To use FastStore CLI commands globally on your machine, install the @faststore/cli package:
yarn
npm

_10
yarn global add @faststore/cli

Default commands

Below is a brief description of the default commands available in the FastStore CLI. To view detailed information about each command, click the respective command name.
Running commands via yarn is sufficient for developing your store. However, to set up your project with the Headless CMS and create new sections, you must install the FastStore CLI globally 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 the Headless CMS.
devStarts the project in the development environment and uses http://localhost:3000 as the default server. It allows you to make changes to the project and see the results locally in real time without affecting the production environment.
generateOptimizes the schema and regenerates TypeScript types so that recent changes take effect without restarting the development server.
helpDisplays help for FastStore CLI commands.
startExecutes the FastStore project in the root directory and uses http://localhost:3000 as the default server.

dev

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

Usage


_10
yarn dev


_10
faststore dev

🔼 Back

build

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

Usage


_10
yarn build


_10
faststore build

🔼 Back

start

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

Usage


_10
yarn start


_10
faststore start

🔼 Back

cms-sync

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

Usage


_10
yarn cms-sync


_10
faststore cms-sync

🔼 Back

help

Displays help for FastStore CLI commands.

Usage


_10
yarn faststore help


_10
faststore help [COMMAND] [-n]

🔼 Back
Contributors
1
Photo of the contributor
Was this helpful?
Yes
No
Suggest Edits (GitHub)
Contributors
1
Photo of the contributor
Was this helpful?
Suggest edits (GitHub)
On this page