Skip to content
Packages Examples Agents Blog Get started

CLIConfig extends BaseConfig from oridecon.config with a config_section = "cli". It reads from the [cli] section of application.yaml or environment variables prefixed with ORI_CLI__.

from oridecon.cli import CLIConfig
# From YAML (reads [cli] section)
config = CLIConfig.from_yaml("application.yaml")
# Defaults
config = CLIConfig()
KeyTypeDefaultEnv VarDescription
default_templatestr"web-api"ORI_CLI__DEFAULT_TEMPLATEProject template used by oridecon new project
default_databasestr"postgres"ORI_CLI__DEFAULT_DATABASEDefault database driver for scaffolding
colorboolTrueORI_CLI__COLOREnable coloured terminal output
verboseboolFalseORI_CLI__VERBOSEPrint verbose/debug output
application.yaml
cli:
default_template: "full"
default_database: "sqlite"
color: true
verbose: false
Terminal window
export ORI_CLI__DEFAULT_TEMPLATE=full
export ORI_CLI__DEFAULT_DATABASE=sqlite
export ORI_CLI__COLOR=true
export ORI_CLI__VERBOSE=true

Environment variable overrides take precedence over values in application.yaml.

  • Use application.yaml for project-wide defaults checked into version control
  • Use environment variables for CI/CD and per-deployment overrides
  • Set ORI_CLI__VERBOSE=true during troubleshooting for detailed output