Skip to content

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:

txt
cloudpack <command> [options]

The most commonly-used commands are init and start.

Commands

CommandDescription
initValidate compatibility and generate config overrides
startStart a development server for an app
bundleBundle a package
linkLink packages from another repo to a running session
unlinkUnlink packages from a running session
syncSync packages from/to the remote cache
setupConfigure HTTPS certs and/or hosts file
cacheManage the Cloudpack cache
configManage Cloudpack user preferences
reportReport telemetry data

To see all available commands:

txt
cloudpack --help

Options

To view a command's help, including the latest list of options:

txt
cloudpack <command> --help

The options below work with most sub-commands.

Common options

OptionValue typeDescription
--cache-pathstringCustom cache folder. To change the default, run cloudpack config set cachePath <path>.
-c, --configstringCustom config file name to use instead of cloudpack.config.json.
--definekey=value...Define a global variable. Can be specified multiple times.
--featuresstring...Enable experimental features. Can be specified multiple times.

Logging options

OptionValue typeDescription
-v, --verbosen/aShow additional details in logging.
-d, --debugn/aShow debug information (superset of --verbose).
-q, --quietn/aDisable non-essential logging.
-n, --no-colorn/aDisable colors in the output.
--log-filen/aWrite a log file with all console output.

Universal options

These work with either the top-level cloudpack command or any sub-command:

OptionValue typeDescription
-h, --helpn/aDisplay help for command.
-V, --versionn/aOutput 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: Uses openssl to create a self-signed certificate for the configured domain (or localhost) and adds it to your system's trust store.
  • domain: Adds an entry to /etc/hosts (or equivalent) pointing 127.0.0.1 to 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

NameDescription
cachePathAbsolute 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.