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
| Option | Description |
|---|---|
--debug, -D | Enable debug logging sku start --debug |
--config, -c | Specify a custom path to your sku config sku build --config path/to/custom/config |
--environment, -e | Specify the environment to use (only valid for start and serve commands) sku start --environment production |
--help, -h | Show help output for the current command sku --help |
--version, -v | Show 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).
sku startThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | Override the default webpack stats preset sku build --stats=errors-only | summary |
--port | The port for the development server. | |
--strict-port | Make sku throw an error if the given port is already in use. | false |
--list-urls, -l | List 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.
sku start-ssrThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | Override the default webpack stats preset sku build --stats=errors-only | summary |
--list-urls, -l | List 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.
sku buildThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | Override 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.
sku build-ssrThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--stats, -s | Override 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.
sku serveThis command supports the following options:
| Option | Description | Defaults to |
|---|---|---|
--port | The port to serve the application on sku serve --port=8080 | |
--site | The site to serve the application on sku serve --site=seekAnz | |
--list-urls, -l | List 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.
sku testlint
Run lint tools on your code. See the linting/formatting documentation for more information.
sku lintformat
Apply all available lint and formatting fixes. See the linting/formatting documentation for more information.
sku formatsetup-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.
sudo sku setup-hostsOn 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.
sku configureTranslations
Translation-specific commands. These commands are useful only if your application is a multi-language application.
translations compile
Compile translations defined in .vocab directories.
sku translations compileThis command supports the following options:
| Option | Description |
|---|---|
--watch, -w | Compile 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.
sku translations pushThis command supports the following options:
| Option | Description |
|---|---|
--auto-translate | Tell Phrase to translate any missing keys with machine translation. sku translations push --auto-translate |
--delete-unused-keys | Delete 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.
sku translations pulltranslations validate
Validate translations defined in .vocab directories.
sku translations validate