widgetbook_cli 3.0.0-rc.5
widgetbook_cli: ^3.0.0-rc.5 copied to clipboard
A CLI to interact with Widgetbook Cloud.
Widgetbook CLI #
The CLI supports uploading Widgetbook Builds & Widgetbook Reviews.
Quick Start #
# π― Activate from https://pub.flutter-io.cn
dart pub global activate widgetbook_cli
# π Use CLI
widgetbook publish --api-key <key>
Setup #
The widgetbook-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]
Publish a Widgetbook #
An existing Widgetbook can be uploaded via the publish command.
Arguments #
The CLI accepts the following arguments.
| Argument | Mandatory | Description |
|---|---|---|
--path |
β | The path to your project. Defaults to ./. |
--api-key |
β | The project specific API key for Widgetbook Cloud. See How to create an API key. |
--branch |
β | The name of the branch for which the Widgetbook is uploaded. Defaults to the current git branch. |
--commit |
β | The SHA hash of the commit for which the Widgetbook is uploaded. Defaults to the last commit of the current git branch. |
--repository |
β | The name of the repository for which the Widgetbook is uploaded. |
--actor |
β | The username of the actor which triggered the build. |
--base-branch |
β | The name of the pull-request's base branch. |
If base-branch is omitted, a Widgetbook Build is created.
If base-branch is provided, a Widgetbook Build and a Widgetbook Review is created.
Documentation #
See docs.widgetbook.io for docs & samples.