Quick Start

1. Get an API key

cgen defaults to Groq, which has a free tier. Any other built-in provider works the same way — and local providers (Ollama, LM Studio) need no key at all.

2. Configure

Either run the interactive editor and set API Key (and optionally Provider/Model) under the Basic group:

cgen config

or export the key in your shell:

export ACR_API_KEY=your-key-here

cgen config saves to the global config file, so this is a one-time step. See Config File & Locations for per-repository overrides.

3. Stage and generate

git add .
cgen

cgen lists the staged files (marking any that are excluded from the LLM payload), sends the filtered diff to your provider, and shows the proposed message with a review menu:

  • Accept — create the commit with this message
  • Regenerate — ask the LLM for a new message
  • Edit — open the message in your editor before committing
  • Cancel — abort; nothing is committed

After the commit, cgen asks whether to push (change this with ACR_POST_COMMIT_PUSH=never|ask|always). On first run it also asks once whether to enable automatic updates.

Not ready to commit? cgen --dry-run prints the generated message without creating a commit.

Next steps

  • Usage — all commands and flags
  • Configuration — every setting, message language, gitmoji, templates
  • Presets — save and switch between provider setups