Problem
Configuration is currently stored in a JSON file (~/.config/commit-echo/config.json) and loaded at startup. There is no way to temporarily override config values for CI scripts, testing, or switching between projects without editing the config file.
Proposed Solution
Support environment variable overrides for all configuration options:
| Config Key |
Environment Variable |
Description |
| \provider\ |
\COMMIT_ECHO_PROVIDER\ |
LLM provider key |
| \model\ |
\COMMIT_ECHO_MODEL\ |
Model name |
| \�aseUrl\ |
\COMMIT_ECHO_BASE_URL\ |
API base URL |
| \�piKey\ |
\COMMIT_ECHO_API_KEY\ |
API key |
| \historySize\ |
\COMMIT_ECHO_HISTORY_SIZE\ |
History size for style learning |
| \maxDiffSize\ |
\COMMIT_ECHO_MAX_DIFF_SIZE\ |
Max diff size in chars |
Environment variables should take precedence over config file values.
Implementation Notes
- Modify \src/config/store.ts\ — \loadConfig()\ should check env vars after parsing the JSON file
- Env var values override the parsed config properties
- Boolean/numeric vars need appropriate parsing (e.g., \COMMIT_ECHO_HISTORY_SIZE\ needs \parseInt)
Acceptance Criteria
Problem
Configuration is currently stored in a JSON file (~/.config/commit-echo/config.json) and loaded at startup. There is no way to temporarily override config values for CI scripts, testing, or switching between projects without editing the config file.
Proposed Solution
Support environment variable overrides for all configuration options:
Environment variables should take precedence over config file values.
Implementation Notes
Acceptance Criteria