Command-line interface

Brand new

Preview.js CLI came out mid-April 2022.

Feel free to report bugs on GitHub.

Installing

Install Preview.js CLI:

# pnpm
$ pnpm add -D @previewjs/cli

# npm
$ npm install --dev @previewjs/cli

# Yarn
$ yarn add -D @previewjs/cli

You can then run previewjs in your project directory and pick any component to preview!