AI commit generation
Birch Code can suggest a commit message based on your current staged diff. Bring your own API key — your repo contents never pass through a Birch-controlled server.
Choose a provider
Section titled “Choose a provider”Birch Code supports two providers out of the box:
| Provider | Default model | Where to get a key |
|---|---|---|
| Anthropic | claude-sonnet-4-6 | console.anthropic.com |
| OpenAI | gpt-4.1-mini | platform.openai.com/api-keys |
Both providers have a free tier or low minimum spend.
Configure your key
Section titled “Configure your key”- Open Settings → AI.
- Pick a provider.
- Paste your API key.
- Click Test connection — Birch Code sends a no-op request to confirm the key works.
- Save.
Keys are stored in your OS keychain (Keychain on macOS, Credential Manager on Windows), not in plaintext.
Generate a message
Section titled “Generate a message”- Stage the changes you want to describe.
- In the commit panel, click the ✨ Generate button.
- Birch Code sends the staged diff (plus a system prompt) to your provider and fills the commit message field.
- Edit the result before committing — the model is a starting point, not a substitute for thinking.
Privacy
Section titled “Privacy”- Only the staged diff is sent (not unstaged changes, not the rest of the repo).
- Birch Code does not relay diffs through any third-party server — requests go directly from your machine to the provider you configured.
- Disable AI features entirely in Settings → AI → Disable if you don’t want a network call on each commit.
A typical staged diff (~100 lines) uses 1–3k tokens. At Anthropic Sonnet pricing that’s well under a cent per commit. Birch Code shows a running estimate in the settings panel.
Switching models
Section titled “Switching models”Click Advanced in the AI settings to override the default model — useful if you want to test a smaller, cheaper model, or pin to a specific snapshot. The model name is passed through verbatim, so any model your API key has access to should work.