Configuration file
~/.tg.json is a user-home state file. Theme Manager recovers from a missing or malformed file with defaults and preserves unknown keys when it writes known state.
| Field | Default / shape | Owner |
|---|---|---|
customThemes | string[] | Theme discovery during generation. |
lastAppliedTheme | theme ID or null | Generation/apply flow state. |
favoriteSeedColors | { color, variant }[] | Favorites flow; legacy string favorites migrate on read. |
lastUsedSeedColor | hex or null | Seed generation. |
lastUsedVariant | variant or null | Seed generation. |
lastUsedThemes | optional { dark?, light? } | Selection’s mode-specific state. |
Writes use the shared same-directory temporary-file-plus-rename helper. This gives atomic replacement for the ordinary state-file path, but does not create backups or offer a global rollback.