#conventional-commits #ollama #git-commit #git #commit

bin+lib codio

Production-ready commit message generator using local Ollama LLM

2 releases

Uses new Rust 2024

new 0.1.1 Feb 28, 2026
0.1.0 Feb 28, 2026

#2815 in Command line utilities

MIT license

54KB
1.5K SLoC

Codio (Production)

Codio is an internal CLI for automated Git workflows with local Ollama-powered Conventional Commit generation.

This README is for production/internal usage only.

Developer / Maintainer

Purpose

Codio standardizes team commits by:

  • generating validated Conventional Commit messages from real diffs
  • enforcing commit message structure before commit
  • supporting fully automated local workflows (add -> gen -> push)

Prerequisites

  • Git repository (run inside repo root or any subdirectory)
  • Local Ollama daemon (http://localhost:11434)
  • Installed local model (default: qwen2.5-coder)
  • Configured Git identity (user.name, user.email)

Install / Update

From this folder:

./install.sh

Update after changes:

./install.sh --force

Uninstall:

./uninstall.sh

Operational Commands

Stage files:

codio add .
# or
codio add src/main.rs README.md

Generate commit message from staged diff and commit:

codio gen

Generate + edit message before commit:

codio gen --edit

Push current branch:

codio push

Full automation (stage all + generate + commit + push):

codio git

Diagnostics / runtime health:

codio status

Flags

Global flags (available for all commands):

  • --model <name>: Ollama model (default: qwen2.5-coder)
  • --scope <scope|auto>: explicit or inferred scope
  • --staged-only: fail when nothing staged
  • --max-chars <n>: diff truncation budget (300..=200000, default 12000)
  • --dry-run: print final message, skip commit/push actions
  • --no-body: subject only
  • --verbose: verbose logs
  • --no-progress: disable spinner/progress UI

Safety and Validation

Codio includes production safety controls:

  • redacts sensitive diff lines before prompting Ollama
  • omits sensitive file content (.env, key/secret-like files)
  • validates commit format before commit:
    • type(scope): summary
    • allowed types: feat, fix, docs, refactor, perf, test, chore, build, ci
    • subject length <= 72 chars
    • body structure with blank line + bullet lines
  • auto-coerces non-conforming model output into valid Conventional format
  1. codio status to verify environment/model/repo state.
  2. codio git for normal feature work.
  3. Use codio gen --edit when you need manual wording control.
  4. Use --dry-run in sensitive branches before final commit.

Troubleshooting

codio status should be your first check.

Common issues:

  • Ollama unreachable:
    • Start service: ollama serve
  • Model missing:
    • Install model: ollama pull qwen2.5-coder
  • Push failed / upstream missing:
    • git push -u origin <branch>
  • No staged changes for codio gen:
    • Stage first via codio add ... or use codio git

Dependencies

~11–30MB
~404K SLoC