Acceptance Criteria
--site <name> selects the target site; inferred when exactly one site exists; when multiple exist and --site is absent, list the site names and exit cleanly (no dead end)readThemeFromConfig / writeThemeIntoConfig accept an explicit site key and can create a new site entry, not only update an existing one- Adding a second site to a singular
site: config rewrites it to plural sites: { default, <new> } - Helpers are shared so the theme / template / preset apply-modes reuse them
- Tests cover single-site infer, multi-site select, missing-flag listing, and singular→plural rewrite
Approach
Extend the helpers in packages/cli/src/commands/theme.ts / config-file.ts to take a site key and to distinguish "update existing" from "create new" (the latter is what full-site template install needs). Normalise singular↔plural config shapes in one place.
References
- SPEC-110 §3
packages/cli/src/commands/theme.ts, packages/cli/src/config-file.ts, packages/types/src/theme.ts