Configuration
ProjectConfig drives every generator. All settings live in config.yaml.
Overview
All generators are driven by a single ./config.yaml file loaded via load_config() from scripts/config.py. The root type is ProjectConfig — a Pydantic v2 model that validates every field at load time.
uv run readme config generate-default --path ./config.yamluv run readme config view --path ./config.yaml --output-format yamluv run readme config save --path ./config.yamlConfig files are serialized with mode="json" to produce clean, safe-loadable YAML — no Python-object YAML tags from Pydantic's HttpUrl type.
ProjectConfig
The root config model maps to these top-level keys in config.yaml:
banner_settings: # BannerSettings
qr_code_settings: # QRCodeSettings
v_card_data: # VCardDataModel
word_cloud_settings: # WordCloudSettingsModel
readme_sections_settings: # ReadmeSectionsSettingsBannerSettings
| Field | Type | Default | Notes |
|---|---|---|---|
title | str | "Your Name" | Main heading in the banner |
subtitle | str | "Software Engineer & AI Enthusiast" | Subheading |
output_path | str | .github/assets/img/banner.svg | Where the light-mode SVG is written |
width | int | 1200 | Canvas width in pixels |
height | int | 630 | Canvas height in pixels |
optimize_with_svgo | bool | True | Run SVGO optimizer after generation |
QRCodeSettings
| Field | Type | Default | Notes |
|---|---|---|---|
output_filename | str | "qr.png" | Output filename |
output_dir | str | .github/assets/img | Output directory |
default_background_path | str|null | null | Optional SVG embedded behind QR |
default_scale | int | 25 | Module size in pixels |
error_correction | str | "H" | L / M / Q / H |
WordCloudSettingsModel
| Field | Type | Default | Notes |
|---|---|---|---|
output_dir | str | .github/assets/img | Output directory |
output_filename | str | "word_cloud.png" | Default filename |
prompt | str|null | "My Tech Skills: Python, JavaScript, Cloud, AI, DevOps, SQL, React" | Default prompt for curating keywords |
stopwords | list[str]|null | [] | Additional stopwords |
Two word-cloud config models
WordCloudSettingsModel in config.py is the top-level YAML config. WordCloudSettings in word_clouds.py is the internal generator config with extra="forbid". Don't confuse them — the first accepts unknown keys, the second rejects them.
ReadmeSectionsSettings
Dynamic README configuration lives under readme_sections_settings in config.yaml. This includes the README path, social links, featured repos, blog feed settings, and nested SVG card controls under svg.
skills.yaml is loaded separately via load_skills() and is not a top-level key in ProjectConfig.
VCardDataModel
Contact card data embedded in the QR code. Fields map directly to vCard 3.0 properties:
| Field | Default |
|---|---|
displayname | "Your Name" |
email_internet | "" |
url_work | list of TypedUrl objects |
org, title, fn, tel_work_voice | Personal details |
AppSettings (env-driven)
Settings in scripts/config.py is a pydantic-settings BaseSettings — values are read from environment variables:
| Env Var | Default | Purpose |
|---|---|---|
LOG_LEVEL | "INFO" | Loguru sink level |
DEBUG_MODE | False | Extra verbose logging |
LOG_ROTATION | "10 MB" | Log file rotation policy |
LOG_RETENTION | "10 days" | Log retention period |
Use uv run readme show-settings to see all current env-driven settings and their values.