> ## Documentation Index
> Fetch the complete documentation index at: https://docs.talosjs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# storybook:create

> Generate a new storybook module.

Scaffold a storybook frontend module from the upstream skeleton. The command writes `modules/<name>/`, renames `modules/<name>/storybook.yml` to `modules/<name>/<name>.yml`, rewrites `modules/<name>/package.json`, rewrites `modules/<name>/playwright.config.ts`, rewrites imports under `modules/<name>/src/`, updates `modules/<name>/vite.config.ts`, creates `modules/<name>/src/shared/.gitkeep`, and adds a root `tsconfig.json` path alias when that file exists.

## Usage

```bash theme={null}
talos storybook:create [options]
```

## Examples

Run with no flags to be prompted for the storybook name and design module:

```bash theme={null}
talos storybook:create
```

Create a storybook non-interactively:

```bash theme={null}
talos storybook:create --name=gallery --design=ui
```

Create a storybook from a fresh skeleton download:

```bash theme={null}
talos storybook:create --name=gallery --design=ui --no-cache
```

## Options

| Option       | Description                                                                                                                   | Default             |
| ------------ | ----------------------------------------------------------------------------------------------------------------------------- | ------------------- |
| `--name`     | Storybook name. Normalized to kebab-case with any trailing `Module` stripped.                                                 | Prompted if omitted |
| `--design`   | Design module the storybook uses. Existing design modules can be selected interactively, or a new design name can be entered. | Prompted if omitted |
| `--cwd`      | Project directory the storybook is created in.                                                                                | Current directory   |
| `--silent`   | Suppress prompts, spinners, and output.                                                                                       | `false`             |
| `--no-cache` | Bypass the skeleton cache and re-download templates.                                                                          | `false`             |

## Generated module

The copied module is marked `type: "storybook"` in `modules/<name>/<name>.yml`. When a design is chosen, the yml receives `design: "<design>"`; no target field is written by this command.

## Rewrites

The package is renamed to `@module/<name>`, its Vite scripts are written with a free port starting at `3031`, the Playwright config is updated to that port, imports from `@module/storybook` are rewritten to `@module/<name>`, and the Vite config is updated with the selected design alias.
