DEV Community

Cover image for How I Built Scribe: A Fast, Local-First AI Commit Generator in Go
Alan Shabrandi
Alan Shabrandi

Posted on

How I Built Scribe: A Fast, Local-First AI Commit Generator in Go

Every day at the end of coding sessions, I got lazy with my git commits—writing things like "wip", "fix stuff", or "changes". Existing AI commit tools either felt too heavy, lacked speed, or forced sending git diffs to third-party cloud APIs.

So I built Scribe—a lightweight, fast tool written in Go that generates Conventional Commit messages using local LLMs (Ollama) or optional cloud models.


🎥 Quick Demo

1. VS Code Extension

Scribe VS Code Extension Demo

2. Terminal & CLI Tool

Scribe CLI Demo


🚀 Key Features

  • Local-First & Private: Native integration with Ollama—your diffs stay on your machine.
  • High Performance: Built with Go for near-instant execution.
  • Smart SHA-256 Caching: Hashes staged diffs to avoid wasteful LLM calls.
  • Dual Interface: Use it directly as a CLI tool or through the native VS Code extension.

🛠️ How It Works (Under the Hood)

  1. Staged Diff Extraction: Reads your staged changes via Git.
  2. SHA-256 Hashing: Checks if the diff was already processed to save time and system resources.
  3. Prompt Engineering: Passes the diff context to Ollama (or API) with a tuned prompt for Conventional Commits format (feat:, fix:, refactor:).
  4. Native Integration: Drops the generated text right into the VS Code Source Control input box or outputs it to the terminal.

📦 Try It Out & Contribute

Scribe is 100% open-source, and I’d love to get feedback, feature requests, or contributions from the community!

🔗 Repository & Extension Links

If you find it useful, feel free to drop a ⭐ on GitHub or leave a review on the marketplace. What does your current commit workflow look like? Let me know in the comments below!

Top comments (0)