pnpm cone gen command uses AI (LLM) to generate or upgrade cone metadata for Entities. You can improve template cones created by stub entity with AI, or regenerate existing cones.
Basic Usage
Requires
ANTHROPIC_API_KEY. Set it in sonamu.secret.ts or as an environment variable.Options
| Option | Description | Example |
|---|---|---|
| (none) | Generate only empty fixtureHints (preserves existing values) | pnpm cone gen Product |
--regenerate | Overwrite existing cones and regenerate all | pnpm cone gen Product --regenerate |
--locale <ko|en|ja> | Specify generation language (default: sonamu.config.ts i18n.defaultLocale or ko) | pnpm cone gen Product --locale en |
--all | Generate cones for all Entities at once | pnpm cone gen all |
Examples
Generate cones for a single Entity
Regenerate existing cones
Generate cones in English
Batch generate for all Entities
How It Works
Default mode (onlyEmpty)
When run without options, only fields with emptyfixtureHint are generated. Existing values are preserved.
Regenerate mode (--regenerate)
With --regenerate, all existing cone metadata is overwritten and regenerated from scratch. Be careful if you have manually adjusted values.