CLI Options

React Storybook comes with two CLI utilities. They are start-storybook and build-storybook.

They have some options you can pass to alter the storybook behaviors. We have seen some of them in previous docs.

Here are all those options:

For start-storybook

  1. Usage: start-storybook [options]
  2. Options:
  3. --help output usage information
  4. -V, --version output the version number
  5. -p, --port [number] Port to run Storybook
  6. -h, --host [string] Host to run Storybook
  7. -s, --static-dir <dir-names> Directory where to load static files from, comma-separated list
  8. -c, --config-dir [dir-name] Directory where to load Storybook configurations from
  9. --https Serve Storybook over HTTPS. Note: You must provide your own certificate information.
  10. --ssl-ca <ca> Provide an SSL certificate authority. (Optional with --https, required if using a self-signed certificate)
  11. --ssl-cert <cert> Provide an SSL certificate. (Required with --https)
  12. --ssl-key <key> Provide an SSL key. (Required with --https)
  13. --smoke-test Exit after successful start
  14. --ci CI mode (skip interactive prompts, don't open browser)
  15. --quiet Suppress verbose build output
  16. --no-dll Do not use dll reference
  17. --debug-webpack Display final webpack configurations for debugging purposes

For build-storybook

  1. Usage: build-storybook [options]
  2. Options:
  3. -h, --help output usage information
  4. -V, --version output the version number
  5. -s, --static-dir <dir-names> Directory where to load static files from, comma-separated list
  6. -o, --output-dir [dir-name] Directory where to store built files
  7. -c, --config-dir [dir-name] Directory where to load Storybook configurations from
  8. -w, --watch Enable watch mode
  9. --loglevel [level] Control level of logging during build. Can be one of: [silly, verbose, info (default), warn, error, silent]
  10. --quiet Suppress verbose build output
  11. --no-dll Do not use dll reference
  12. --debug-webpack Display final webpack configurations for debugging purposes