Skip to content

CLI Reference

Terminal window
codegen [OPTIONS] --config <path> --input <dir> [--output <dir>]
FlagDescription
--config <path>Path to the rule’s config.yaml file
--input <dir>Directory to search for C++ headers
FlagDefaultDescription
--output <dir>./generatedRoot directory for generated files
--diffoffOpen TUI diff viewer before writing (Professional+)
--dry-runoffPrint output to stdout; do not write files
--verboseoffLog each entity processed
--jobs <n>CPU countParallel parse workers
--cache-dir <path>.codegen/cachePersistent cache directory (Professional+)
--no-cacheoffDisable persistent cache
--version,Print version and exit
CodeMeaning
0Success, all entities processed, all files written
1Partial failure, one or more entity transforms errored
2Fatal error, config invalid, input directory not found, etc.
3License error, feature requires a higher tier
Terminal window
# Dry run, inspect output without writing
codegen --config .codegen/rules/ToString/ToString.config.yaml \
--input ./include \
--dry-run
# TUI diff before applying (Professional tier)
codegen --config .codegen/rules/MarkdownDocs/MarkdownDocs.config.yaml \
--input ./include \
--output ./generated \
--diff
# Verbose, explicit output directory
codegen --config .codegen/rules/TypeScriptTypes/TypeScriptTypes.config.yaml \
--input ./src/api \
--output ./web/src/generated \
--verbose