New
You're viewing older docs for version 6.0. View latest docs

CLI options

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

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

start-storybook

Loading...
OptionsDescriptionExample
--helpOutput usage informationstart-storybook --help
-V, --versionOutput the version numberstart-storybook -V
-p, --port [number]Port to run Storybookstart-storybook -p 9009
-h, --host [string]Host to run Storybookstart-storybook -h http://my-host.com
-s, --static-dir <dir-names>Directory where to load static files from, comma-separated liststart-storybook -s public
-c, --config-dir [dir-name]Directory where to load Storybook configurations fromstart-storybook -c .storybook
--httpsServe Storybook over HTTPS. Note: You must provide your own certificate information.start-storybook --https
--ssl-ca <ca>Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)start-storybook --ssl-ca my-certificate
--ssl-cert <cert>Provide an SSL certificate. (Required with --https)start-storybook --ssl-cert my-ssl-certificate
--ssl-key <key>Provide an SSL key. (Required with --https)start-storybook --ssl-key my-ssl-key
--smoke-testExit after successful startstart-storybook --smoke-test
--ciCI mode (skip interactive prompts, don't open browser)start-storybook --ci
--quietSuppress verbose build outputstart-storybook --quiet
--no-dllDo not use UI dll referencestart-storybook --no-dll
--docs-dllUse the Docs dll reference (legacy)start-storybook --docs-dll
--debug-webpackDisplay final webpack configurations for debugging purposesstart-storybook --debug-webpack
--docsStarts Storybook in documentation mode. Learn more about it in herestart-storybook --docs

build-storybook

Loading...
Loading...
OptionsDescriptionExample
-h, --helpOutput usage informationbuild-storybook --help
-V, --versionOutput the version numberbuild-storybook -V
-s, --static-dir <dir-names>Directory where to load static files from, comma-separated listbuild-storybook -s public
-o, --output-dir [dir-name]Directory where to store built filesbuild-storybook -o /my-deployed-storybook
-c, --config-dir [dir-name]Directory where to load Storybook configurations frombuild-storybook -c .storybook
-w, --watchEnables watch modebuild-storybook -w
--loglevel [level]Controls level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent]build-storybook --loglevel warn
--quietSuppress verbose build outputbuild-storybook --quiet
--no-dllDo not use UI dll referencebuild-storybook --no-dll
--docs-dllUse Docs dll reference (legacy)build-storybook --docs-dll
--debug-webpackDisplay final webpack configurations for debugging purposesbuild-storybook --debug-webpack
--docsBuilds Storybook in documentation mode. Learn more about it in here)build-storybook --docs

Was this page helpful?

Markdown accepted ([link text](url), _italic_, **bold**, etc). Your anonymous feedback will be posted publicly on GitHub.

✍️ Edit on GitHub – PRs welcome!
Storybook
Join the community
6,565 developers and counting
WhyWhy StorybookComponent-driven UI
DocsGuidesTutorialsChangelogTelemetryStatus
CommunityAddonsGet involvedBlog
ShowcaseExploreProjectsComponent glossary
Open source software
Storybook

Maintained by
Chromatic
Special thanks to Netlify and CircleCI