Configuration
Configuration uses a YAML file with PascalCase parameter names.
You can reference other parameters with #[ParamName] syntax
and environment variables with ${VAR} syntax.
See the examples for complete configuration examples.
- pydantic model cli_wizard.config.schema.Config
CLI Wizard configuration schema.
- Config:
extra: str = forbid
- Fields:
- Validators:
- field AuthorEmail: str = 'your.email@example.com'
Author email
- Validated by:
- field AuthorName: str = 'Your Name'
Author name
- Validated by:
- field CaFile: str | None = None
CA certificate file for SSL verification (relative to config or absolute)
- Validated by:
- field CommandMapping: dict[str, str] [Optional]
Customize command names (operationId -> command name)
- Validated by:
- field CommandName: str | None = None
CLI command name (kebab-case, derived from ProjectName if not set)
- Validated by:
- field CopyrightYear: int | None = None
Copyright year for LICENSE and other files
- Validated by:
- field DefaultBaseUrl: str = 'http://localhost:3000'
Default API base URL
- Validated by:
- field Description: str = 'A CLI application'
Project description
- Validated by:
- field ExcludeOperations: list[str] [Optional]
Operation IDs to exclude from generation
- Validated by:
- field ExcludeTags: list[str] [Optional]
Tags to exclude from generation
- Validated by:
- field GithubUser: str = 'username'
GitHub username
- Validated by:
- field IncludeGithubWorkflows: bool = False
Include .github folder with workflows, issue templates, etc.
- Validated by:
- field IncludeOperations: list[str] [Optional]
Operation IDs to include (if empty, all non-excluded operations are included)
- Validated by:
- field IncludeTags: list[str] [Optional]
Tags to include (if empty, all non-excluded tags are included)
- Validated by:
- field JsonIndent: int = 2
JSON indentation
- Constraints:
ge = 0
- Validated by:
- field LogColorDebug: str = '#808080'
Color for DEBUG log level (hex code)
- Validated by:
- field LogColorError: str = '#FF0000'
Color for ERROR log level (hex code)
- Validated by:
- field LogColorInfo: str = '#00FF00'
Color for INFO log level (hex code)
- Validated by:
- field LogColorStyle: Literal['full', 'level'] = 'level'
Log color style: ‘full’ colors entire line, ‘level’ colors only the level prefix
- Validated by:
- field LogColorWarning: str = '#FFFF00'
Color for WARNING log level (hex code)
- Validated by:
- field LogFile: str | None = None
Path to log file (None means no file logging)
- Validated by:
- field LogFormat: str = '%(asctime)s [%(levelname)s] %(message)s'
Log message format (Python logging format)
- Validated by:
- field LogLevel: Literal['DEBUG', 'INFO', 'WARNING', 'ERROR'] = 'INFO'
Default log level
- Validated by:
- field LogRotationBackupCount: int = 5
Number of backup log files to keep
- Constraints:
ge = 0
- Validated by:
- field LogRotationDays: int = 30
Log rotation interval in days (when LogRotationType is ‘days’)
- Constraints:
ge = 1
- Validated by:
- field LogRotationSize: int = 10
Log rotation size in MB (when LogRotationType is ‘size’)
- Constraints:
ge = 1
- Validated by:
- field LogRotationType: Literal['size', 'days'] = 'days'
Log rotation type: ‘size’ for file size, ‘days’ for time-based
- Validated by:
- field LogTimestampFormat: str = '%Y-%m-%dT%H:%M:%S'
Timestamp format for log messages (strftime format)
- Validated by:
- field LogTimezone: Literal['UTC', 'Local'] = 'UTC'
Timezone for log timestamps
- Validated by:
- field MainDir: str = '${HOME}/.#[CommandName]'
Main directory for CLI data (config, cache, logging, etc.)
- Validated by:
- field OpenapiSpec: str | None = None
Path to OpenAPI spec (relative to config file or absolute)
- Validated by:
- field OutputColors: bool = True
Enable colored output
- Validated by:
- field OutputFormat: Literal['json', 'table', 'yaml'] = 'json'
Default output format
- Validated by:
- field PackageName: str | None = None
Python package name (snake_case, derived from ProjectName if not set)
- Validated by:
- field ProfileFile: str = '#[MainDir]/profiles.yaml'
Path to profiles YAML file
- Validated by:
- field ProjectName: str = 'My Project'
Human-readable project name (title case)
- Validated by:
- field PythonVersion: str = '3.12'
Minimum Python version
- Validated by:
- field RepositoryUrl: str | None = None
Repository URL for the project
- Validated by:
- field RetryBackoffFactor: float = 0.5
Retry backoff factor
- Constraints:
ge = 0
- Validated by:
- field RetryMaxAttempts: int = 3
Retry max attempts
- Constraints:
ge = 0
- Validated by:
- field SplashColor: str = '#FFFFFF'
Color for splash text (hex code)
- Validated by:
- field SplashFile: str | None = None
Path to splash text file (relative to config or absolute)
- Validated by:
- field TableStyle: Literal['ascii', 'rounded', 'minimal', 'markdown'] = 'rounded'
Table style
- Validated by:
- field TagMapping: dict[str, str] [Optional]
Map OpenAPI tags to CLI command group names
- Validated by:
- field Timeout: int = 30
Request timeout in seconds
- Constraints:
ge = 1
- Validated by:
- field Version: str = '1.0.0'
Project version
- Validated by:
- validator derive_names_from_project » all fields
Derive CommandName and PackageName from ProjectName when not set.
- validator validate_hex_color » LogColorDebug, SplashColor, LogColorError, LogColorWarning, LogColorInfo
Validate that color is a valid hex color code.