stdout-design_

Getting Started

Install stdout-design, scaffold a project, and render your first image.

Prerequisites

  • Node.js 22.22+
  • Bun 1.2+ (recommended package manager)

Install

Add the CLI as a dev dependency:

bun add -d @stdout-design/cli

Or install globally to use studio directly:

bun add -g @stdout-design/cli

If you installed locally, prefix commands with npx (or bunx):

npx @stdout-design/cli <command>

Scaffold a project

npx @stdout-design/cli init

init walks you through a few prompts project name, which starter templates to include, which locales to set up, whether to initialize git, and whether to install dependencies. Pass -y to skip prompts and use the defaults.

If studio.config.ts already exists in the target directory, init skips scaffolding entirely.

init creates:

studio.config.ts
README.md
package.json
tsconfig.json
types.d.ts
launch-hero.tsx
bento-feature.tsx
retro-poster.tsx
trend-poster.tsx
en.json
ar.json
  • studio.config.ts the template registry, presets, and locales. Templates declare their own fonts.
  • types.d.ts adds the tw= attribute type for React.
  • templates/ your TSX components.
  • locales/ translation files, keyed by template id.

You get four starters: launch-hero (a streetwear landing page), bento-feature (a product bento grid), retro-poster (a cassette print poster), and trend-poster (an editorial six-item grid). Each one lays out at both presets, instagram-square (1080×1080, the default) and x-card (1200×675), and mirrors itself when rendered in Arabic. They're yours to rewrite or delete.

Render your first image

npx @stdout-design/cli render launch-hero --headline "Hello there"

By default render outputs one PNG per locale in the config's locales (the ones you picked at init), at the config's defaultPreset. Pass --preset all for every preset. The files are named like:

out/launch-hero.en.instagram-square.0.png
out/launch-hero.ar.instagram-square.0.png

It also writes a manifest.json alongside the images summarizing what was rendered.

The Arabic file is the same template laid out right to left. To render one locale, pass --locale:

npx @stdout-design/cli render launch-hero --locale ar

Open the live studio

npx @stdout-design/cli dev

This starts the dev server on http://localhost:3030 with a live preview, an auto-generated prop panel, preset tabs, and locale switching. See Live Studio for the full walkthrough.

Project structure

studio.config.ts
  • studio.config.ts template registry, presets, locales, and optional font overrides.
  • templates/ one .tsx file per template. See Writing Templates.
  • data/ CSV or JSON files for data-driven batch rendering. See Batch Rendering.
  • locales/ per-locale translation JSON. See Internationalization.
  • out/ rendered assets (gitignored).
  • .studio-cache/ render cache (gitignored).

out/ and .studio-cache/ are gitignored by the scaffold and rebuilt as needed.

Next steps

On this page