generate output is controlled by two independent flags. --to is which document you want. --format is how colors inside it are encoded. They don't overlap, so you set them separately.
Target
--to chooses the output document. The default is shadcn.
| Target | Output |
|---|---|
colors | The raw role set, both modes. Agents read this while mapping roles to another tool's slots. |
shadcn | A paste-ready shadcn :root/.dark block, both modes. The default. |
yaml | A single-mode DESIGN.md colors: block. |
json | A Material Theme JSON export. |
colors, shadcn, and json co-emit both light and dark. yaml alone reads --mode to pick which projection to emit. The default mode is light.
npx @tonex-dev/cli generate --seed "#6A9CFF" --to colors
npx @tonex-dev/cli generate --seed "#6A9CFF" --to shadcn --format hex
npx @tonex-dev/cli generate --seed "#6A9CFF" --to yaml --mode dark
npx @tonex-dev/cli generate --seed "#6A9CFF" --to jsonFormat
--format chooses the color encoding for colors, shadcn, and json output: oklch by default, or hex. yaml is always hex and ignores this flag.
Adding a format in the engine surfaces it here automatically — the CLI reads the format list from @tonex/core rather than re-listing it.
Recipe embedding
Delivered projections carry the command that made them:
| Target | Recipe location |
|---|---|
shadcn | A leading /* tonex generate ... */ comment. |
yaml | A leading # tonex generate ... comment. |
json | The command in the description field. |
colors | Structured recipe metadata for transient agent reads. |
The role-set targets
--to colors emits the raw Tonex role set. Use it when a tool has no native exporter: read the roles, map each role by intent, then verify the pairings with tonex check.
--to yaml emits a DESIGN.md colors: block. It is the portable semantic contract for tools that can consume DESIGN.md. Tonex exports shadcn and json natively; for other tools, the roles (primary, on-surface, and so on) mean the same thing wherever they land. See How Tonex thinks and the skill that applies a consistent mapping.