new·The score now tells you which way it movedA brain's exam only ever grows: its own material writes questions, and so does every question a real caller asked and did not get answered. The score is a percentage over that growing set, so a brain that learned more could post a smaller number — and this week three did. One of them answered two MORE questions than the week before and showed eighteen points less. Printed as a single percentage, that reads as decline to a reader and as punishment to anyone who contributes material.all news →
mozg.beta
Sign in

Storybook · API · all subjects

cli commands

19 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 dev command

Compiles and serves a development build of your Storybook that reflects source code changes in the browser in real-time. Usage: `storybook dev [options]`. Should be run from the root of your project.

storybook build command

Compiles your Storybook instance so it can be deployed. Usage: `storybook build [options]`. Should be run from the root of your project.

storybook init command

Installs and initializes the specified version (e.g., `@latest`, `@8`, `@next`) of Storybook into your project. If no version is specified, the latest version is installed. Usage: `storybook[@version] init [options]`. Example: `storybook@8.4 init` will install Storybook 8.4 into your project.

storybook automigrate command

Perform standard configuration checks to determine if your Storybook project can be automatically migrated to the specified version. Usage: `storybook[@version] automigrate [fixId] [options]`. Example: `storybook@latest automigrate --dry-run` scans your project for potential migrations that can be applied automatically without making any changes.

storybook add command

Installs a Storybook addon and configures your project for it. Usage: `storybook add [addon] [options]`.

storybook remove command

Deletes a Storybook addon from your project. Usage: `storybook remove [addon] [options]`.

storybook upgrade command

Upgrades your Storybook instance to the specified version (e.g., `@latest`, `@8`, `@next`). Usage: `storybook[@version] upgrade [options]`. Example: `storybook@latest upgrade --dry-run` will perform a dry run (no actual changes) of upgrading your project to the latest version of Storybook.

storybook migrate command

Runs the provided codemod to ensure your Storybook project is compatible with the specified version. Usage: `storybook[@version] migrate [codemod] [options]`. The command requires the codemod name (e.g., `csf-2-to-3`) as an argument to apply the necessary changes to your project. You can find the list of available codemods by running `storybook migrate --list`. Example: `storybook@latest migrate csf-2-to-3 --dry-run` checks your project to verify if the codemod can be applied without making any changes, providing you with a report of which files would be affected.

storybook doctor command

Performs a health check on your Storybook project for common issues (e.g., duplicate dependencies, incompatible addons or mismatched versions) and provides suggestions on how to fix them. Applicable when upgrading Storybook versions. Usage: `storybook doctor [options]`.

storybook ai command

Helpers for AI agents. The `ai` command exposes subcommands that generate AI-friendly instructions for automating Storybook tasks. Usage: `storybook ai [options] [command]`.

storybook info command

Reports useful debugging information about your environment. Helpful in providing information when opening an issue or a discussion. Usage: `storybook info`. The output includes System information (OS, CPU, Shell), Binaries (Node, npm), Browsers (Chrome version), npmPackages (installed Storybook packages and versions), and npmGlobalPackages (globally installed packages).

storybook index command

Build an `index.json` that lists all stories and docs entries in your Storybook. Usage: `storybook index [options]`.

storybook sandbox command

Generates a local sandbox project using the specified version (e.g., `@latest`, `@8`, `@next`) for testing Storybook features based on the list of supported frameworks. Useful for reproducing bugs when opening an issue or a discussion. Usage: `storybook[@version] sandbox [framework-filter] [options]`. Example: `storybook@next sandbox` will generate sandboxes using the newest pre-release version of Storybook. The `framework-filter` argument is optional and can filter the list of available frameworks, for example `storybook@next sandbox react` will only offer to generate React-based sandboxes.

create storybook command

A separate CLI called `create-storybook` streamlines the process of creating a new Storybook project. Package managers such as npm, pnpm, and Yarn will execute this command when running `create storybook`. You can specify a version (e.g., `@latest`, `@8`, `@next`) or it will default to the latest version. Usage: `create storybook[@version] [options]`. Example: `create storybook@8.6` will install Storybook 8.6 into your project.

create storybook options table

create storybook options: | Option | Description | |--------|-------------| | `-h`, `--help` | Output usage information. | | `-b`, `--builder` | Defines the builder to use for your Storybook instance. | | `-f`, `--force` | Forcefully installs Storybook into your project, prompting you to overwrite existing files. | | `-s`, `--skip-install` | Skips the dependency installation step. Used only when you need to configure Storybook manually. | | `-t`, `--type` | Defines the framework to use for your Storybook instance. | | `-y`, `--yes` | Skips interactive prompts and automatically installs Storybook per specified version, including all features. | | `--features [...values]` | Use these features when installing, skipping the prompt. Supported values are `docs`, `test`, and `a11y`, space separated. | | `--package-manager` | Sets the package manager to use when installing Storybook. Available package managers include `npm`, `yarn`, and `pnpm`. | | `--use-pnp` | Enables Plug'n'Play support for Yarn. This option is only available when using Yarn as your package manager. | | `-p`, `--parser` | Sets the jscodeshift parser. Available parsers include `babel`, `babylon`, `flow`, `ts`, and `tsx`. | | `--debug` | Outputs more logs in the CLI to assist debugging. | | `--disable-telemetry` | Disables Storybook's telemetry. | | `--enable-crash-reports` | Enables sending crash reports to Storybook's telemetry. | | `--loglevel <level>` | Controls level of logging during initialization. Available options: `trace`, `debug`, `info` (default), `warn`, `error`, `silent`. | | `--logfile [path]` | Write all debug logs to the specified file at the end of the run. Defaults to debug-storybook.log when [path] is not provided. | | `--no-dev` | Complete the initialization of Storybook without running the Storybook dev server. |

npm options require -- prefix

When using npm instead of Yarn, you must prefix all options with `--`. For example, `npm run storybook build -- -o ./path/to/build --quiet`.

static-dir CLI flag removed in Storybook 8

With the release of Storybook 8, the `-s` CLI flag was removed. It is recommended to use the static directory configuration instead if you need to serve static files.

CLI tool purpose

Storybook is a CLI tool. You can start Storybook in development mode or build a static version of your Storybook.

Storybook server runs on storybook dev and storybook build commands

The Storybook server is the node process that runs when you execute 'storybook dev' or 'storybook build' commands.

Give your agent this brain