Skip to content

CLI ​

The sku command line interface (CLI) is the primary way to interact with your project. Use it to 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 Static or SSR app (sku start).

sh
sku start

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sOverride the default webpack stats preset
sku build --stats=errors-only
summary
--portThe port for the development server.
--strict-portMake sku throw an error if the given port is already in use.false
--list-urls, -lList all dev server URLs that can open the app.
If false, show only the first found host.false

start-ssr ​

Webpack SSR Only

Start the development server for a Webpack SSR app (renderCallback path). SSR apps (buildType: 'ssr') use start instead.

sh
sku start-ssr

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sOverride the default webpack stats preset
sku build --stats=errors-only
summary
--list-urls, -lList all dev server URLs that can open the app.
If false, show only the first found host.false

build ​

Create a production build of a Static or SSR app (sku build). Webpack static apps also use this command.

sh
sku build

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sOverride the default webpack stats preset
sku build --stats=errors-only
errors-only

build-ssr ​

Webpack SSR Only

Create a production build of a Webpack SSR app. SSR apps (buildType: 'ssr') use build instead.

sh
sku build-ssr

This command supports the following options:

OptionDescriptionDefaults to
--stats, -sOverride the default webpack stats preset
sku build --stats=errors-only
errors-only

serve ​

Serve a production build of a Static app from your local machine. Run sku build 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, -lList all dev server URLs that can open the app.
If false, show only the first found host.false

test ​

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

sh
sku test

lint ​

Run lint tools on 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 so configured hosts point to your local machine.

We recommend *.localhost hostnames for local development. They usually resolve automatically. They also act as a secure context for browsers.

Run setup-hosts for other custom hosts. You can also run it if you still want explicit .localhost entries.

sh
sudo sku setup-hosts

On Windows, run sku setup-hosts without sudo from a terminal opened with "Run as administrator".

configure ​

Emit and update configuration files for your project. Sku runs this command before most other sku CLI commands. You should not need to run it by hand.

sh
sku configure

Translations ​

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

translations compile ​

Compile translations defined in .vocab directories.

sh
sku translations compile

This command supports the following options:

OptionDescription
--watch, -wCompile translations again when files change
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-translateTell Phrase to translate any missing keys with machine translation. sku translations push --auto-translate
--delete-unused-keysDelete keys that the upload did not reference
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