Skip to content

Latest commit

 

History

16 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

coco 🥥

Generate commit messages from staged changes using local AI — powered by Ollama.

coco preview


Features

  • Local-first — runs entirely on your machine via Ollama, no data leaves your system
  • Conventional Commits — supports feat:, fix:, chore:, refactor:, and more
  • Interactive — review, edit, or regenerate before committing
  • Configurable — set your preferred provider, model, and format via config.toml
  • Extensible — provider and formatter system designed for easy contribution

Installation

Prerequisites

Linux & macOS

curl -fsSL https://raw.githubusercontent.com/FabianTrafada/coco/main/install.sh | sh

Windows

irm https://raw.githubusercontent.com/FabianTrafada/coco/main/install.ps1 | iex

From source

git clone https://github.com/FabianTrafada/coco
cd coco
cargo install --path .

Uninstall

# Linux & macOS
sudo rm /usr/local/bin/coco

# Windows
Remove-Item "$env:USERPROFILE\.coco\bin\coco.exe"

Usage

# Stage your changes first
git add .

# Run coco
coco

Flags

Flag Short Description
--always-trust -y Skip confirmation and commit immediately
--provider -p Override provider (e.g. ollama, openai)
--model -m Override model (e.g. qwen3.5, llama3.2)
--help -h Print help
--version -V Print version

Examples

coco                          # use default config
coco -y                       # auto-commit, no confirmation
coco -m qwen3.5               # use specific model
coco -p openai -m gpt-4o      # use different provider
coco -p ollama -m qwen3.5 -y  # combine flags

Large diffs & performance

If your staged diff is very large, sending the full patch to Ollama can take a long time (most of the wait is prompt evaluation on your machine). By default, coco sends a file-level summary to the model when the staged diff exceeds ~50k characters; the full diff is still shown in the terminal summary above.

To force sending the entire unified diff to the model:

COCO_LLM_FULL_DIFF=1 coco

Configuration

Config file is located at ~/.config/coco/config.toml. Created automatically on first run with defaults.

[core]
format = "conventional"   # or "freeform"
language = "english"

[provider]
name = "ollama"
model = "qwen3.5"

[provider.ollama]
base_url = "http://localhost:11434"

[provider.openai]
api_key = "sk-..."
base_url = "https://api.openai.com/v1"

Priority chain

CLI flags  →  config.toml  →  defaults

Supported Providers

Provider Status
Ollama (local) ✅ Available
OpenAI 🔜 Soon
Anthropic 🔜 Soon
Groq 🔜 Soon

Supported Models (via Ollama)

Any model available in Ollama works with coco. Recommended:

ollama pull qwen3.5        # recommended, best quality
ollama pull qwen3.5:0.8b   # lightweight, faster
ollama pull llama3.2       # alternative

Contributing

Contributions are welcome! See CONTRIBUTING.md for how to add new providers, formatters, and more.


License

MIT

About

No description, website, or topics provided.

Resources

Contributing

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages