The CLI supports:
- uploading a Widgetbook Build
- uploading a Widgetbook Review
# 🎯 Activate from https://pub.dev dart pub global activate widgetbook_cli # 🚀 Use CLI widgetbook publish --api-key <key>
widgetbook-cli is available as the widgetbook_cli package.
Install the CLI globally by running:
dart pub global activate widgetbook_cli 3.0.0-beta.22
Run the CLI by using
widgetbook <command> [arguments]
Publish a Widgetbook#
An existing Widgetbook can be uploaded via the
The CLI accepts the following arguments.
|➖||The path to your project. Defaults to |
|✅||The project specific API key for Widgetbook Cloud. See How to create an API key.|
|➖||The name of the branch for which the Widgetbook is uploaded. Defaults to the current git branch.|
|➖||The SHA hash of the commit for which the Widgetbook is uploaded. Defaults to the last commit of the current git branch.|
|➖||The name of the repository for which the Widgetbook is uploaded.|
|➖||The username of the actor which triggered the build.|
|➖||The name of the Git provider. Allowed values: |
|➖||The name of the pull-request's base branch.|
|➖||The SHA hash of pull-request's base branch. Defaults to the last commit of |
|➖||The number of the PR on which the CLI is running.|
|➖||The authentication token to post comments to the PR on which the CLI is running.|
base-commit are omitted, a Widgetbook Build is created.
base-branch is provided, a Widgetbook Build and a Widgetbook Review is created.
widgetbook publish --api-key aaabbbccc