Skip to content

CLI Reference

The @vtex/fsp-cli is the glue that ties all modules together, both in local development and when building the modules.

Commands

Init

The init command sets up the store monorepo for development.

Arguments

N/A

Flags

FlagSemantics
--from-discoveryInitializes the store monorepo from an existing Discovery repo

Create

This command creates a new module customization. If no argument is passed to the command, a wizard will guide the user through all the options.

Arguments

ArgumentSemanticRequired
accountthe account that will be customizedfalse
modulethe module that will be customizedfalse
paththe path where the module customization code will livefalse

Flags

N/A

Dev

This command starts the development environment for a given account The account must be a key on the stores object inside the faststore.json file.

All modules listed inside the stores.{account} key will be started on their assigned ports and a proxy server will be started on port 3000 to provide a seamless experience when customizing multiple modules.

Arguments

ArgumentSemanticRequired
accountthe account for which the development servers will be startedtrue

Flags

N/A

Build

The build command is used to build the production-ready version of each module of an account. If no modules are specified as an argument, all modules will be built. The account and modules specified must match what’s available on faststore.json.

Arguments

ArgumentSemanticRequired
accountthe account for which the modules will be builttrue
moduleLista comma separated list of modules to build.false

Flags

N/A

Serve

Run the output of the build command locally.

Arguments

ArgumentSemanticRequired
accountthe account for which we are running the build outputstrue

Flags

N/A