Skip to main content

Use Claude instead of Gemini

Goal: run the generator against Anthropic's Claude rather than the default Gemini provider.

Gemini is the default because it's free. Claude is worth switching to when you want a particular tone, are already standardized on Anthropic, or are comparing output quality across providers.

1. Add your Anthropic key

Get a key from console.anthropic.com and add it to your .env:

ANTHROPIC_API_KEY=sk-ant-api03-your-key-here

You can keep GEMINI_API_KEY in the same file — the tool only reads the key for the provider you select.

2. Install the Anthropic package

The Anthropic SDK is an optional dependency, so it isn't installed by default:

pip install anthropic

3. Run with --provider claude

python changelog.py --repo ./some-repo --last 15 --provider claude

That's the entire change — every other flag behaves identically.

Troubleshooting

SymptomLikely causeFix
ModuleNotFoundError: anthropicSDK not installedpip install anthropic
Authentication errorANTHROPIC_API_KEY missing or wrongRe-check the value in .env
Output looks unchanged--provider flag omittedConfirm --provider claude is present