CLI Overview
The Scry CLI (@scry/storybook-deployer) is a command-line tool for deploying Storybook builds to the cloud.
Installation
bash
npx @scry/storybook-deployer [command] [options]bash
npm install @scry/storybook-deployer --save-dev
npx storybook-deployer [command] [options]bash
pnpm add @scry/storybook-deployer -D
pnpm dlx storybook-deployer [command] [options]Quick Reference
| Command | Description |
|---|---|
init | Initialize project with workflows and config |
deploy | Deploy Storybook (default command) |
analyze | Analyze stories and capture screenshots |
Binary Aliases
The package provides multiple binary names:
storybook-deployer- Full namestorybook-deploy- Short namescry- Shortest alias
All are equivalent:
bash
npx storybook-deployer --help
npx storybook-deploy --help
npx scry --helpBasic Usage
Initialize a Project
bash
npx @scry/storybook-deployer init \
--projectId my-project \
--apiKey scry_proj_xxxDeploy Storybook
bash
npx @scry/storybook-deployer \
--dir ./storybook-static \
--project my-project \
--version latestAnalyze Stories
bash
npx @scry/storybook-deployer analyze \
--storybook-url http://localhost:6006Configuration Sources
The CLI reads configuration from multiple sources in order of priority:
- Command-line arguments (highest priority)
- Environment variables (
STORYBOOK_DEPLOYER_*orSCRY_*) - Configuration file (
.storybook-deployer.json) - Default values (lowest priority)
Environment Variables
All options can be set via environment variables:
| Option | Environment Variable |
|---|---|
--dir | STORYBOOK_DEPLOYER_DIR |
--project | STORYBOOK_DEPLOYER_PROJECT |
--version | STORYBOOK_DEPLOYER_VERSION |
--api-key | STORYBOOK_DEPLOYER_API_KEY |
--api-url | STORYBOOK_DEPLOYER_API_URL |
The SCRY_ prefix also works and takes precedence:
bash
export SCRY_PROJECT_ID=my-project
export SCRY_API_KEY=scry_proj_xxxExit Codes
| Code | Description |
|---|---|
| 0 | Success |
| 1 | General error |
| 2 | Configuration error |
| 3 | Authentication error |
| 4 | Upload error |
Getting Help
bash
npx @scry/storybook-deployer --help
npx @scry/storybook-deployer init --help
npx @scry/storybook-deployer analyze --helpNext Steps
- Commands - Full command reference
- Configuration - Configuration options
- Examples - Real-world usage examples