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
| Flag | Semantics |
|---|---|
--from-discovery | Initializes 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
| Argument | Semantic | Required |
|---|---|---|
account | the account that will be customized | false |
module | the module that will be customized | false |
path | the path where the module customization code will live | false |
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 by default to provide a seamless experience when customizing multiple modules.
Arguments
| Argument | Semantic | Required |
|---|---|---|
account | the account for which the development servers will be started | true |
Flags
| Argument | Semantic | Required |
|---|---|---|
--proxy-port | a custom port for the proxy server to be started on | false |
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
| Argument | Semantic | Required |
|---|---|---|
account | the account for which the modules will be built | true |
moduleList | a comma separated list of modules to build. | false |
Flags
N/A
Serve
Run the output of the build command locally.
Arguments
| Argument | Semantic | Required |
|---|---|---|
account | the account for which we are running the build outputs | true |
Flags
N/A