CLI
The Cloudpack CLI is used to locally serve and bundle applications during development. After installing @ms-cloudpack/cli you can run it as follows:
cloudpack <command> [options]The most commonly-used commands are init and start.
Commands
| Command | Description |
|---|---|
init | Validate compatibility and generate config overrides |
start | Start a development server for an app |
bundle | Bundle a package |
link | Link packages from another repo to a running session |
unlink | Unlink packages from a running session |
sync | Sync packages from/to the remote cache |
setup | Configure HTTPS certs and/or hosts file |
cache | Manage the Cloudpack cache |
config | Manage Cloudpack user preferences |
report | Report telemetry data |
To see all available commands:
cloudpack --helpOptions
To view a command's help, including the latest list of options:
cloudpack <command> --helpThe options below work with most sub-commands.
Common options
| Option | Value type | Description |
|---|---|---|
--cache-path | string | Custom cache folder. To change the default, run cloudpack config set cachePath <path>. |
-c, --config | string | Custom config file name to use instead of cloudpack.config.json. |
--define | key=value... | Define a global variable. Can be specified multiple times. |
--features | string... | Enable experimental features. Can be specified multiple times. |
Logging options
| Option | Value type | Description |
|---|---|---|
-v, --verbose | n/a | Show additional details in logging. |
-d, --debug | n/a | Show debug information (superset of --verbose). |
-q, --quiet | n/a | Disable non-essential logging. |
-n, --no-color | n/a | Disable colors in the output. |
--log-file | n/a | Write a log file with all console output. |
Universal options
These work with either the top-level cloudpack command or any sub-command:
| Option | Value type | Description |
|---|---|---|
-h, --help | n/a | Display help for command. |
-V, --version | n/a | Output the version number. |
Other commands
For the more common commands, see the individual pages linked above. This section just covers basic commands that don't need a dedicated page.
setup
Configures HTTPS certificates and/or host file entries for local development only (requires admin permissions). It's only needed if your Cloudpack server config includes certain settings:
https: true: Usesopensslto create a self-signed certificate for the configured domain (orlocalhost) and adds it to your system's trust store.domain: Adds an entry to/etc/hosts(or equivalent) pointing127.0.0.1to your domain.
cache
Handles operations related to the Cloudpack cache (requires a sub-command).
To customize the cache directory, use cloudpack config set.
cache clean
Clears the Cloudpack cache. (Alias: cache clear)
config
Manage Cloudpack user preferences (requires a sub-command).
Preferences are stored under <home>/.cloudpack.preferences.json.
Available sub-commands
set <key> <value> Set a user preference.
get <key> Get a user preference.
list List the current user preferences.
delete|unset <key> Delete a user preference.Available preferences
| Name | Description |
|---|---|
cachePath | Absolute path to the cache folder, instead of the default <home>/.cloudpack |
report
Report telemetry data (requires a sub-command).
report legacy-start
Report the start of a legacy app. This is useful to track cloudpack vs legacy start usage.