Theme
Python packageSupported stable generatorAvailable now

Infer a normalized generation model from OpenAPI and apply bundled or project-owned Jinja template packs.

python -m pip install codepotg
On this page

Tasks and CLI reference

Global commands

generate

Options:

OptionMeaning
-c, --config PATHExplicit Codepotg.yaml path
--allRun every task in file order
--dry-runPlan without writes or commands
-v, --verboseShow files, command output, and more diagnostics
-r, --refreshClean configured paths before generation
--skip-beforeSkip before commands
--skip-afterSkip after commands
--debugRe-raise errors with a traceback

Examples:

When neither a task name nor --all is supplied, command behavior follows the runtime's task-selection rules and reports ambiguity when the configuration cannot select one task safely.

Generation summary

The CLI reports task language, input, template root, output root, cleanup actions, managed writes, immutable creation/skips, refused writes, and diagnostics.

With --verbose, it also displays planned, written, updated, unchanged, and skipped files.

init

Creates a starter Codepotg.yaml. Without non-interactive flags, the command can prompt for project values.

paths

Validates and prints:

  • resolved paths.yaml or default path configuration;
  • import strategy;
  • template extension and stripping behavior;
  • raw-file support;
  • default lifecycle;
  • legacy folder recipes;
  • selections;
  • emissions, providers, and provided facts;
  • barrels and exports.

Use this before running an unfamiliar pack.

jsonl

The JSONL command compiles or refreshes a visible indexed source cache for an OpenAPI input. It is useful when diagnosing source indexing, cache reuse, or lazy lookup behavior.

The generated cache belongs under .codepotg/cache and is an implementation artifact, not a manually edited contract.

task

The task command group manages task definitions in Codepotg.yaml. Use codepotg task --help to inspect the exact subcommands in the installed version.

Task editing preserves the distinction between CodepotG configuration and CodepotFile.yml used by codepotx.

Exit behavior

Command errors print a user-facing message and exit with status 1. --debug additionally exposes the traceback for development diagnostics.

Do not use --refresh as the default until clean roots and generated ownership have been reviewed.