Skip to main content

CLI

The @modbros/dashboard-cli creates, runs and publishes widget packs. Install it globally using npm:

npm install --global @modbros/dashboard-cli

List all commands with dashboard-cli --help, and the options of a command with dashboard-cli [command] --help.

Commands

All commands except generate operate on the widget pack in the current directory.

CommandDescription
generate <name>Creates a new widget pack project named <name> from the skeleton.
devRegisters the widget pack with the local MoBro and rebuilds it on every change, see Run and Test Locally.
bundleBundles the widget pack into dist/<name>_<version>.zip without publishing it.
publishBundles the widget pack and publishes it as a new version, see Publish and Install.
publish --updateReplaces the content of an already published version.
publish --unpublish-onlyRemoves the widget pack from the marketplace, so users can no longer find and install it.
publish --publish-onlyPublishes a previously unpublished widget pack again, without uploading a new version.
versionsLists all versions of the widget pack in the marketplace.
delete-version --version <version>Deletes a version of the widget pack from the marketplace.
update-infoUpdates the listing information from the mobro-widget-pack-config.json.
update-logoUpdates the logo from the logo.svg or logo.png file.
update-storepageUpdates the store page from the storepage.md file.
updateUpdates the project files, scripts and dependencies to the latest skeleton.
update overwrites files

The update command replaces all project files except the src/ directory, README.md, mobro-widget-pack-config.json and package.json with the files of the latest skeleton. In the package.json, it replaces the scripts, dependencies and devDependencies. Commit your changes before running it, and review the result afterwards.

Options

OptionCommandsDescription
-wd, --working-directory <path>allRuns the command for the widget pack in the given directory instead of the current one.
-ak, --api-key <key>all marketplace commandsThe marketplace API key.
-u, --url <url>all marketplace commandsThe marketplace URL. Only needed for testing against a different marketplace.

Environment Variables

Instead of passing options, marketplace commands read the following variables from the environment or a .env file in the current directory:

VariableReplaces
MODBROS_MARKETPLACE_API_KEY--api-key
MODBROS_MARKETPLACE_URL--url