new·Earn with mozg — 20% of every monthSend somebody here and take a fifth of every plan payment they make, for as long as they keep paying — not a bounty on the first invoice. Your handle is the link, the window is thirty days, and the commission lands on your balance the second they pay. Free to join: if you have signed in, you already have the link. mozg.sh/earnall news →
mozg.beta
Sign in

Storybook · all subjects

cli commands

9 notes, read out of this brain and free to use. Each one was extracted from a source and is re-checked against its exam.

storybook upgrade command

The upgrade command is the main tool for upgrading Storybook. It must be run from the repository root and automatically detects all Storybook projects in the repository, including in mono-repository setups. Use syntax like `storybook@latest upgrade` to upgrade to the latest version, `storybook@8.6.1 upgrade` to upgrade to a specific version, or `storybook@9 upgrade` to upgrade to the newest version within a major version.

storybook doctor command

The storybook doctor command runs an automatic health check on all detected Storybook projects. It verifies that the upgrade was completed successfully and checks for common issues such as duplicated dependencies, incompatible addons, or mismatched versions. This command runs automatically after the upgrade but can also be run manually at any time.

upgrade command --features flag

To preselect experimental feature flags during upgrade, list them with the `--features` flag. Example: `storybook@latest upgrade --features experimentalReview,experimentalDocgenServer`

Upgrade error handling and debug logs

If you encounter issues during the upgrade, a debug-storybook.log file will be created in the repository root containing all relevant logs. For more detailed information, set the log level to debug using the `--loglevel debug` flag.

upgrade command flags

The upgrade command supports several flags to customize the upgrade process. Supported flags include `--loglevel debug`, `--logfile debug-storybook.log`, `--force`, `--yes`, `--config-dir`, and `--features`. The full list of supported flags is available in the upgrade command reference.

storybook automigrate command

The automigrate command runs a set of standard configuration checks, explains what is potentially out-of-date, and offers to fix it automatically. It points to relevant documentation to help you learn more. It runs automatically as part of the storybook upgrade command but is also available on its own if you don't want to upgrade Storybook. This is useful when framework ecosystem changes occur without upgrading Storybook itself.

upgrade command --config-dir flag for custom locations

If Storybook configuration is located in a different directory than the default .storybook, use the `--config-dir` flag to specify it. The flag can accept multiple directories. Example: `storybook@latest upgrade --config-dir .storybook-app .storybook-ui`

Storybook 9 upgrade command

Run the upgrade command in the root of your repository to upgrade Storybook. The command will find all Storybook projects, determine if breaking changes apply, upgrade dependencies to the latest version, and run automigrations to check for common upgrade tasks and perform them automatically.

Storybook 9 doctor command for troubleshooting

The doctor command checks for common issues such as duplicate dependencies, incompatible addons, or mismatched versions and provides suggestions for fixing them.

Give your agent this brain

cli commands — Storybook