Commands
Env-spec management CLI.
======================================================================================================================== Name: pymodeller/env/cli.py Description: CLI entry-point for env-spec operations: example, check, diff, codegen, drift. Uses Typer for CLI parsing and a Service-based approach for logic.
Copyright ©2026 PyModeller. All rights reserved.
Functions:
| Name | Description |
|---|---|
banner_full |
Create a banner. |
check |
Validate current .env file against the specification. |
codegen |
Generate typed Pydantic models for the environment. |
example |
Generate a template .env.example from the YAML spec. |
generate_env |
Generate .env and env. |
print_diff |
Show the results. |
setup |
Generate models from yaml and .env.example. |
show_version |
Show version. |
yaml_file |
Generate environments.yaml from the YAML spec. |
check
Validate current .env file against the specification.
codegen
codegen(
spec: Path = models_yaml,
model_type: DestinationType | None = None,
) -> Exit
Generate typed Pydantic models for the environment.
example
Generate a template .env.example from the YAML spec.
generate_env
Generate .env and env.
setup
setup() -> Exit
Generate models from yaml and .env.example.