An AI-powered Git helper that generates branch names and commit messages using a local Ollama model.
Install git-raccoon globally via deno install:
deno install \
--global \
--name=git-raccoon \
--allow-env=OLLAMA_HOST,OLLAMA_PORT,OLLAMA_MODEL,OLLAMA_TIMEOUT \
--allow-net \
--allow-run \
jsr:@git-raccoon/cliTo update, run the same command with the -f argument (forces replacement).
To uninstall:
deno uninstall --global git-raccoonCreates a new branch. If there are unstaged changes, the branch name is
generated by the LLM based on the diff. If there are no changes, a random name
is used (e.g. hopeful-turing).
git-raccoon checkoutGenerates a Conventional Commits message from your staged changes and branch name, then prompts you to accept, edit, or discard it.
git-raccoon commitStage everything and commit in one step with -a:
git-raccoon commit -aThe Ollama connection and model can be set via flags or environment variables. Flags take precedence.
| Flag | Environment variable | Default |
|---|---|---|
--host |
OLLAMA_HOST |
localhost |
--port |
OLLAMA_PORT |
11434 |
--model |
OLLAMA_MODEL |
qwen2.5-coder:7b |
--timeout |
OLLAMA_TIMEOUT |
180 (seconds) |
If the configured model is not available locally, it will be pulled automatically.
| Hardware | Recommended model |
|---|---|
| 🖥️ With a dedicated GPU | qwen2.5-coder:7b (default) |
| 💻 Without a dedicated GPU | qwen2.5-coder:3b |
Find all available qwen2.5-coder sizes here: https://ollama.com/library/qwen2.5-coder
Add the following to your ~/.gitconfig to use git-raccoon as native git
subcommands:
[alias]
aicommit = "!f(){ git-raccoon commit \"$@\"; }; f"
aicheckout = "!f(){ git-raccoon checkout \"$@\"; }; f"Then use:
git aicommit # generate and commit
git aicommit -a # stage all, then generate and commit
git aicheckout # create a new AI-named branchMany thanks to Martin Wimpress for his work on faff on which this project was heavily inspired.
| Project | Branch generation |
Commit generation |
PR generation |
Provider |
|---|---|---|---|---|
| gitsloth | ❌ | ✅ | ❌ | ☁️ Online LLM |
| agentsdance/aigit | ❌ | ✅ | ❌ | ☁️ Online LLM |
| hardiksondagar/aigit | ✅ | ✅ | ✅ | ☁️ Online LLM |
| cai | ❌ | ✅ | ❌ | ☁️ Online + 🏠 Local |
| gitai-cli | ❌ | ✅ | ✅ | ☁️ Online + 🏠 Local |
| faff | ❌ | ✅ | ❌ | 🏠 Local (Ollama) |
| gitllama | ❌ | ✅ | ❌ | 🏠 Local (Ollama) |
| git-raccoon | ✅ | ✅ | ❌ | 🏠 Local (Ollama) |
