LogoWidgetbook

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.

ArgumentMandatoryDefault*Description
--pathâž–./The path to your project.
--api-key✅-The project specific API key for Widgetbook Cloud.
--branchâž–Current git branchThe name of the branch for which the Widgetbook is uploaded.
--commitâž–HEAD commit of current branchThe SHA hash of the commit for which the Widgetbook is uploaded.
--repositoryâž–Repository top-level nameThe name of the repository for which the Widgetbook is uploaded.
--actorâž–Git config user.nameThe 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.

Example#

widgetbook cloud build push --api-key PROJECT_API_KEY