Skip to content

feat: support API keys in config file#63

Open
entropyy0 wants to merge 1 commit intosteipete:mainfrom
entropyy0:feat/config-api-keys
Open

feat: support API keys in config file#63
entropyy0 wants to merge 1 commit intosteipete:mainfrom
entropyy0:feat/config-api-keys

Conversation

@entropyy0
Copy link
Contributor

Closes #59

Summary

Add an apiKeys section to ~/.summarize/config.json so API keys can be stored without environment variables:
json
{
"apiKeys": {
"openai": "sk-...",
"anthropic": "sk-ant-...",
"google": "...",
"openrouter": "sk-or-..."
}
}

Precedence

Environment variables > config file apiKeys (full backward compat).

Supported providers

openai, anthropic, google, xai, openrouter, zai, apify, firecrawl, fal

Changes

  • Added ApiKeysConfig type and apiKeys field to SummarizeConfig
  • Config parser validates provider names and non-empty string values
  • resolveEnvState falls back to config keys when env vars are missing

All 1119 tests pass. Build clean. AI-assisted (Claude via Clawdbot), fully tested.

Add an 'apiKeys' section to the config file so API keys can be stored
persistently without polluting the shell environment:

  {
    "apiKeys": {
      "openai": "sk-...",
      "anthropic": "sk-ant-...",
      "google": "...",
      "openrouter": "sk-or-...",
      "xai": "...",
      "zai": "...",
      "apify": "...",
      "firecrawl": "...",
      "fal": "..."
    }
  }

Precedence: environment variables > config file apiKeys.
This maintains full backward compatibility.

Supported providers: openai, anthropic, google, xai, openrouter, zai,
apify, firecrawl, fal.

Closes steipete#59
@entropyy0 entropyy0 force-pushed the feat/config-api-keys branch from 9656f5a to 39f84a8 Compare February 3, 2026 01:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature Request: Store API Keys in Config File

1 participant