Skip to content

CLI

The sku command line interface (CLI) is the primary way to interact with your project. It provides a number of commands to help you develop, test and build your application.

CLI Options

OptionDescription
--debug, -DEnable debug logging
sku start --debug
--config, -cSpecify a custom path to your sku config
sku build --config path/to/custom/config
--environment, -eSpecify the environment to use (only valid for start and serve commands)
sku start --environment production
--help, -hShow help output for the current command
sku --help
--version, -vShow the version of sku that is currently installed
sku --version

CLI Commands

start

Start the sku development server for a statically-rendered application.

sh
sku start

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sThe webpack stats preset used to override the default
sku build --stats=errors-only
summary
--portThe port to serve the dev server on.
--strict-portWill make sku throw an error if the given port is already in use.false
--list-urls, -lLists all dev server urls the app can be accessed on. If false, only displays the first found host.false

start-ssr

Start the sku development server for a server-rendered application.

sh
sku start-ssr

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sThe webpack stats preset used to override the default
sku build --stats=errors-only
summary
--list-urls, -lLists all dev server urls the app can be accessed on. If false, only displays the first found host.false

build

Create a production build of a statically-rendered application.

sh
sku build

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sThe webpack stats preset used to override the default
sku build --stats=errors-only
errors-only

build-ssr

Create a production build of a server-rendered application.

sh
sku build-ssr

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sThe webpack stats preset used to override the default
sku build --stats=errors-only
errors-only

serve

Serve a production build of a statically-rendered application from your local machine. Requires sku build to be run first.

sh
sku serve

This command supports the following options:

OptionDescriptionDefaults to
--portThe port to serve the application on
sku serve --port=8080
--siteThe site to serve the application on
sku serve --site=seekAnz
--list-urls, -lLists all dev server urls the app can be accessed on. If false, only displays the first found host.false

test

Run unit tests. See the testing documentation for more information.

sh
sku test

lint

Run lint tooling over your code. See the linting/formatting documentation for more information.

sh
sku lint

format

Apply all available lint and formatting fixes. See the linting/formatting documentation for more information.

sh
sku format

setup-hosts

Update your hosts file to point any configured hosts to your local machine.

sh
sudo sku setup-hosts

configure

Emit and update configuration files for your project. This command is run before most other sku CLI commands, so you shouldn't need to run it manually.

sh
sku configure

Translations

Translation-specific commands. These commands are only useful if your application is configured to be a multi-language application.

translations compile

Compile translations defined in .vocab directories.

sh
sku translations compile

This command supports the following options:

OptionDescription
--watch, -wRe-compile translations whenever changes are detected
sku translations compile --watch

translations push

Push translations to Phrase. See the documentation on phrase-specific features for more information.

sh
sku translations push

This command supports the following options:

OptionDescription
--auto-translateInstructs Phrase to automatically translate any missing keys using machine translation. sku translations push --auto-translate
--delete-unused-keysDeletes keys that were not referenced in the upload
sku translations push --delete-unused-keys

translations pull

Pull translations from Phrase. See the documentation on phrase-specific features for more information.

sh
sku translations pull

translations validate

Validate translations defined in .vocab directories.

sh
sku translations validate