Overview
The CLI supports uploading Widgetbook builds to Widgetbook Cloud.
Quick start
# 🎯 Activate from https://pub.dev
dart pub global activate widgetbook_cli
# 🚀 Use CLI
widgetbook cloud build push --api-key PROJECT_API_KEY
Setup
The CLI is available as the widgetbook_cli package.
Install the CLI globally by running:
dart pub global activate widgetbook_cli
Run the CLI by using
widgetbook <command> [arguments]
Push Widgetbook Builds to Widgetbook Cloud
An existing Widgetbook can be uploaded via the cloud build push
command.
Arguments
The CLI accepts the following arguments.
Argument | Mandatory | Default* | Description |
---|---|---|---|
--path | ➖ | ./ | The path to your project. |
--api-key | ✅ | - | The project specific API key for Widgetbook Cloud. |
--branch | ➖ | Current git branch | The name of the branch for which the Widgetbook is uploaded. |
--commit | ➖ | HEAD commit of current branch | The SHA hash of the commit for which the Widgetbook is uploaded. |
--repository | ➖ | Repository top-level name | The name of the repository for which the Widgetbook is uploaded. |
--actor | ➖ | Git config user.name | The username of the actor which triggered the build. |
* These defaults are used when the CLI is used locally. If the CLI is used in a CI/CD environment, the defaults have different respective values.