CLI Reference
Every command and flag in the studio CLI.
Run commands with npx @stdout-design/cli <command> (local install) or studio <command> (global install).
Commands
| Command | Description |
|---|---|
studio init [dir] | Scaffold a new studio project |
studio update [dir] | Update an existing project to the latest CLI |
studio dev [dir] | Start the live preview studio |
studio render <template> | Render a single template or batch |
studio cache stats | Show cache statistics |
studio cache clean | Clear the render cache |
studio lint | Check templates for compatibility (not yet implemented) |
studio skill install | Install the agent skill for AI coding tools |
studio init
Scaffold a new studio project.
studio init [projectDir] [options]Prop
Type
Skips scaffolding if a studio.config.ts already exists. See Getting Started.
init skips every prompt and uses defaults (project name studio-project, the bento-feature template, en+ar locales, dependencies installed) when -y/--yes is passed, or automatically when it detects a CI environment: CI=true/CI=1, CIRCLECI=true, GITHUB_ACTIONS, or GITLAB_CI is set. Useful for scaffolding a project from a script or agent without wiring --yes explicitly.
studio update
Update an existing studio project to the latest CLI version adds the CLI dependency if missing and merges default config values into studio.config.ts.
studio update [projectDir] [options]Prop
Type
update compares your installed CLI version (from your own package.json) against the latest published version before doing anything. If a newer CLI is available, it refuses to proceed:
CLI v0.3.0 is installed, but v0.4.0 is available.
Run `npm install @stdout-design/cli@latest` first, then re-run `studio update`.Upgrade the CLI first, then run studio update again.
update diffs your studio.config.ts against the scaffold defaults for your installed version and:
- Adds any new default presets/templates you don't already have (existing entries with the same ID are left untouched).
- Flags presets whose IDs are deprecated (none currently).
- Bumps
scaffoldVersion. - Overwrites the static scaffold assets (
tsconfig.json,.gitignore,types.d.ts). - Bumps the
@stdout-design/clidependency inpackage.jsonto match.
If nothing would change, it prints "Project is already up to date." and exits without touching any files. Otherwise it prints a diff-style summary and asks for confirmation (skipped with --yes).
studio render
Render a template single, or batch with --data.
studio render <template> [props...] [options]<template> is the template ID from studio.config.ts. Props are passed as key=value pairs:
studio render bento-feature title="Hello" stat="10k users"Prop
Type
Examples:
# Single render, all configured presets × locales
studio render stat-card title="50K users"
# Single file, one preset, one locale
studio render stat-card --preset instagram-square --locale en --out-dir out
# Batch from CSV, across two presets and two locales
studio render stat-card --data data/stats.csv --preset instagram-square,x-card --locale en,ar --out-dir outEach render produces one PNG per (preset × locale × data row), named:
<templateId>.<locale>.<presetId>.<rowKey>.pngFor a single render (no --data) the row key is 0, e.g.:
out/stat-card.en.instagram-square.0.png
out/stat-card.en.x-card.0.png
out/stat-card.ar.instagram-square.0.pngA manifest.json is written to the output directory alongside the images, summarizing status, counts, and per-file results (see Batch Rendering).
Exit code is 1 if any render failed. Use --json to get the manifest as machine-readable output.
--presetand--localeare singular and accept comma-separated values. Omit them to render every configured preset and locale.--concurrencyis accepted but rendering is currently sequential; it has no effect on output.- Unknown template IDs trigger a "Did you mean …?" suggestion based on closest match.
studio dev
Start the live preview studio (see Live Studio).
studio dev [rootDir] [options]Prop
Type
--open is accepted but currently a no-op open http://localhost:3030 manually.
-p/--port always wins over any environment variable if you're starting the dev server yourself (not through studio dev) rather than importing startStandaloneServer, it also reads a PORT environment variable when no port argument is given.
studio cache stats
Show cache statistics location, compiled/pixel entry counts, disk usage, and the size limit.
studio cache stats [rootDir] [options]Prop
Type
studio cache clean
Clear the render cache entirely.
studio cache clean [rootDir] [options]Prop
Type
See Caching for how the cache works.
studio lint
Check templates for compatibility. Not implemented yet it always exits with code 1 and a message pointing to a future release.
studio skill install
Install the stdout-design agent skill for AI coding agents.
studio skill install [options]Prop
Type
See AI Agents.
Exit codes
0success (including a cancelledinit).1any error, or any failed render in a batch.