Skip to content

Installation Guide

  • Node.js 20+
  • A React + TypeScript project
Terminal window
npm install patternbook-cli

PatternBook will automatically generate a manifest from your components and launch the viewer in one command:

Terminal window
npx patternbook serve .

Open http://localhost:3000 to view your design system.

2. Generate a manifest manually (optional)

Section titled “2. Generate a manifest manually (optional)”

If you want to generate the manifest separately without starting the server:

Terminal window
npx patternbook generate .

This analyses your components and writes the manifest to library-manifest.json.

To inspect what components PatternBook detects without generating a full manifest:

Terminal window
npx patternbook scan .

PatternBook reads:

  • Exported function and class components
  • TypeScript prop interfaces and type aliases
  • JSDoc comments on props and the component itself
  • @example JSDoc tags for live preview code snippets
  • Hook usage within components
CommandDescription
npx patternbook serve [dir]Auto-generate manifest and launch the visual dashboard
npx patternbook generate [dir]Generate a library-manifest.json from your components
npx patternbook scan [dir]Scan and list all detected components
npx patternbook analyze [dir]Build a dependency graph and run impact analysis
npx patternbook watch [dir]Watch for file changes and re-scan automatically