Skip to content

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.

Birch Code supports two providers out of the box:

ProviderDefault modelWhere to get a key
Anthropicclaude-sonnet-4-6console.anthropic.com
OpenAIgpt-4.1-miniplatform.openai.com/api-keys

Both providers have a free tier or low minimum spend.

  1. Open Settings → AI.
  2. Pick a provider.
  3. Paste your API key.
  4. Click Test connection — Birch Code sends a no-op request to confirm the key works.
  5. Save.

Keys are stored in your OS keychain (Keychain on macOS, Credential Manager on Windows), not in plaintext.

  1. Stage the changes you want to describe.
  2. In the commit panel, click the ✨ Generate button.
  3. Birch Code sends the staged diff (plus a system prompt) to your provider and fills the commit message field.
  4. Edit the result before committing — the model is a starting point, not a substitute for thinking.
  • 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.

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.