Codegen Add CLI Entity
Table of Contents
When to use this skill
When you need to add CLI commands for a new entity in ores.cli.
Prerequisites: the domain type must exist (domain-type-creator),
the repository and table I/O must be implemented. See Entity lifecycle
for the full layer ordering.
How to use this skill
- Gather requirements: entity name, command name (plural, hyphenated), operations needed (list, export, import, add, delete), key field, required and optional add parameters.
- Phase 1 — list + export (PR:
[cli] Add {entity} list and export commands): add entity enum, create parser class with list/export, register inmain_parser.cpp. - Phase 2 — add + delete (PR:
[cli] Add {entity} add and delete commands): createadd_{entity}_options.hpp, extend parser with add/delete. - Phase 3 — recipe docs (PR:
[doc] Add {entity} CLI command recipes): addhow_do_i_*.orgrecipes underdoc/recipes/cli/.
Use feature-branch-manager between phases and pr-manager to open each PR.
Build after every step: cmake --build --preset linux-clang-debug-ninja --target ores.cli.
Recipes
- How do I create CLI commands for a new entity? — phase-by-phase walkthrough.
Reference
- CLI entity patterns — options struct layout, parser class shape, file locations.
- Entity lifecycle — layer ordering overview.
- domain-type-creator — prerequisite first layer.
Codegen gap
❌ No codegen profile exists for ores.cli. Do not hand-code this
layer. When entity-creator reaches this layer:
- Raise a sprint story: "Implement codegen profile for CLI commands."
- Reference Entity lifecycle§"Codegen gaps" for what the profile must cover.
- Link the story to the entity task before marking this layer done.
- Once the profile is merged, regenerate and discard any hand-written code.
Until the gap is resolved, this layer is incomplete.