Join live session: Test your components in browser with Storybook Test
Docs
Storybook Docs

CLI options

Storybook comes with two CLI utilities: start-storybook and build-storybook.

Storybook collects completely anonymous data to help us improve user experience. Participation is optional, and you may opt-out if you'd not like to share any information.

Pass these commands the following options to alter Storybook's behavior.

start-storybook

Usage: start-storybook [options]
OptionsDescription
--helpOutput usage information
start-storybook --help
-V, --versionOutput the version number
start-storybook -V
-p, --port [number]Port to run Storybook
start-storybook -p 9009
-h, --host [string]Host to run Storybook
start-storybook -h my-host.com
-s, --static-dirDeprecated see note. Directory where to load static files from, comma-separated list
start-storybook -s public
-c, --config-dir [dir-name]Directory where to load Storybook configurations from
start-storybook -c .storybook
--httpsServe Storybook over HTTPS. Note: You must provide your own certificate information
start-storybook --https
--ssl-caProvide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)
start-storybook --ssl-ca my-certificate
--ssl-certProvide an SSL certificate. (Required with --https)
start-storybook --ssl-cert my-ssl-certificate
--ssl-keyProvide an SSL key. (Required with --https)
start-storybook --ssl-key my-ssl-key
--smoke-testExit after successful start
start-storybook --smoke-test
--ciCI mode (skip interactive prompts, don't open browser)
start-storybook --ci
--no-openDo not open Storybook automatically in the browser
start-storybook --no-open
--quietSuppress verbose build output
start-storybook --quiet
--no-dllDo not use dll reference (no-op)
start-storybook --no-dll
--debug-webpackDisplay final webpack configurations for debugging purposes
start-storybook --debug-webpack
--webpack-stats-jsonWrite Webpack Stats JSON to disk
start-storybook --webpack-stats-json /tmp/webpack-stats
--docsStarts Storybook in documentation mode. Learn more about it in here
start-storybook --docs
--no-manager-cacheDisables Storybook's manager caching mechanism. See note below
start-storybook --no-manager-cache
--disable-telemetryDisables Storybook's telemetry. Learn more about it here
start-storybook --disable-telemetry

The flag --no-manager-cache disables the internal caching of Storybook and can severely impact your Storybook loading time, so only use it when you need to refresh Storybook's UI, such as when editing themes.

Starting in 6.4 the -s flag is deprecated. Instead, use a configuration object in your .storybook/main.js file. See the images and assets documentation for more information.

build-storybook

Usage: build-storybook [options]
OptionsDescription
-h, --helpOutput usage information
build-storybook --help
-V, --versionOutput the version number
build-storybook -V
-s, --static-dirDeprecated see note.
Directory where to load static files from, comma-separated list
build-storybook -s public
-o, --output-dir [dir-name]Directory where to store built files
build-storybook -o /my-deployed-storybook
-c, --config-dir [dir-name]Directory where to load Storybook configurations from
build-storybook -c .storybook
--loglevel [level]Controls level of logging during build.
Available options: silly, verbose, info (default), warn, error, silent
build-storybook --loglevel warn
--quietSuppress verbose build output
build-storybook --quiet
--no-dllDo not use dll reference (no-op)
build-storybook --no-dll
--debug-webpackDisplay final webpack configurations for debugging purposes
build-storybook --debug-webpack
--webpack-stats-jsonWrite Webpack Stats JSON to disk
build-storybook --webpack-stats-json /my-storybook/webpack-stats
--docsBuilds Storybook in documentation mode. Learn more about it in here
build-storybook --docs
--disable-telemetryDisables Storybook's telemetry. Learn more about it here.
build-storybook --disable-telemetry

If you're using npm instead of yarn to publish Storybook, the commands work slightly different. For example, npm run build-storybook -- -o ./path/to/build.