DEV Community

kanwar singh
kanwar singh

Posted on

🦥 RepoPilot AI — Let Local AI Handle the Boring Git Work

Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady Submission 🦥

This is a submission for the Hacktoberfest Open-Source AI Challenge Week 3: Slow and Steady.

What I Built

As developers, we enjoy building features, solving problems, and writing code.

But after finishing a feature, there are always a few repetitive tasks waiting for us:

  • Writing meaningful Git commit messages.
  • Preparing changelogs from commit history.
  • Updating README documentation whenever functionality changes.

These tasks are important, but they can interrupt our development flow.

So, for the Slow and Steady challenge, I built RepoPilot AI, an offline-first, AI-powered command-line tool that automates these repetitive Git workflows using locally running open-weight AI.

My goal was simple: Spend more time coding and less time documenting what I just coded.

🚀 Three Core Features

1. AI Commit Message Generator

RepoPilot analyzes staged Git changes and suggests meaningful Conventional Commit messages.

repopilot suggest-commit

Instead of manually examining a large diff and deciding how to describe it, developers receive an AI-generated suggestion based on their actual changes.

2. AI Changelog Generator

RepoPilot analyzes Git commit history and prepares categorized release notes.

repopilot generate-changelog --max-commits 10

It organizes relevant changes into categories such as Added, Changed, Fixed, and Removed.

3. AI README Assistant

RepoPilot examines staged changes alongside the existing README and identifies documentation that may need updating.

repopilot suggest-readme

What makes this feature interesting is its evidence validation. Every suggestion must be supported by actual repository content.

RepoPilot never automatically edits the README, commits code, or pushes anything. The developer always stays in control.

📦 Install RepoPilot AI

I also published RepoPilot AI on npm, making it easy for developers to try it in their own Git repositories.

Install the package:

npm install -g repopilot-ai

Install the local model:

ollama pull qwen2.5-coder:7b

With Ollama running, navigate to an existing Git repository and start using RepoPilot.

Available commands:

  • repopilot suggest-commit
  • repopilot generate-changelog
  • repopilot suggest-readme

No paid AI API key is required for the default local setup.

Demo

🎥 Watch RepoPilot AI in action:

[https://youtu.be/Q-jN-w4k9QM]

In the demonstration, I show how to install RepoPilot from npm, configure the local AI model, and run its commands inside a Git repository.

The demo covers generating commit suggestions, identifying missing README documentation, and turning Git history into readable changelogs.

Code

RepoPilot AI is open source and available under the MIT License.

GitHub repository:

[https://github.com/kanwar05/RepoPilot-AI]

Published npm package:

https://www.npmjs.com/package/repopilot-ai

Developers can inspect the implementation, run the tests, suggest improvements, and adapt the tool to their own workflows.

How I Built It

I wanted RepoPilot to be lightweight, easy to install, and genuinely useful without depending on cloud-based AI services.

🛠️ Tech Stack

Technology Purpose
TypeScript + Node.js Core CLI application
Commander.js Command-line interface
Git CLI Reading diffs and commit history
Ollama Local LLM inference
Qwen2.5-Coder 7B AI-powered code understanding
Node.js Test Runner Automated testing
npm Package distribution

Architecture

The workflow is straightforward:

Developer Command → Git Data Extraction → Input Validation → Local Ollama Model → Output Validation → Suggested Result

For commit generation, RepoPilot reads staged changes using Git and passes bounded diff content to the local model.

For changelog generation, it processes Git commit history and asks the model to create categorized release notes.

For README suggestions, it combines staged Git changes with the current README to identify missing documentation.

All generated output is validated before being displayed.

The Most Interesting Challenge: Making AI Trustworthy

One of the hardest parts of building RepoPilot wasn't connecting Ollama to Node.js.

It was making sure that AI-generated suggestions were actually supported by repository evidence.

During development, I encountered several problems:

Problem 1: The model invented evidence.

The README Assistant sometimes generated plausible documentation suggestions but cited example text that wasn't present in the actual Git diff.

Instead of accepting unsupported suggestions, I made the validator reject them.

Problem 2: Valid evidence was being rejected.

Git diffs mark added lines with a + prefix. Sometimes the model quoted a real added line without that prefix.

The original validator treated those quotes as invalid.

I improved the evidence verification logic to support harmless formatting differences while still checking that quoted content came from actual added lines.

Problem 3: The model returned empty suggestions.

Sometimes the model returned no documentation suggestions even when a newly added feature clearly needed documentation.

I refined the prompt to better distinguish user-facing changes from irrelevant modifications.

Testing and Validation

I didn't want RepoPilot to be a tool that only worked in a perfect demonstration.

The project passed 26 automated tests, covering areas such as:

  • Valid and malformed AI output.
  • Empty staged Git changes.
  • Large input handling.
  • Git history processing.
  • Evidence-backed README suggestions.
  • Hallucinated evidence rejection.
  • CLI command handling.

I also tested README suggestion generation using a real local Ollama model and a staged CSV export feature.

That test successfully produced an evidence-backed recommendation to update the README Usage section.

Before release, I verified the npm package contents and ensured the production CLI remained read-only.

Why Does Open Innovation Matter?

Open innovation is at the center of RepoPilot AI, not an optional feature.

🔒 1. Local-first privacy

Developers regularly work with private repositories and proprietary source code.

RepoPilot uses Ollama with a local endpoint by default, allowing source analysis to happen on the developer's own machine.

Repository content doesn't need to be sent to a third-party cloud AI provider in the default configuration.

Users can configure another model endpoint if they choose, so privacy also depends on how they configure the tool.

💰 2. No per-request AI API charges

RepoPilot doesn't require subscriptions or paid cloud AI API keys for its default inference workflow.

After downloading the model, developers can generate suggestions using their own computing resources.

🧩 3. Flexibility and customization

Because the inference layer uses Ollama, developers can experiment with compatible local models rather than depending on a single proprietary service.

They can also inspect and modify the open-source CLI itself.

🌍 4. Offline capability

Once the dependencies and model have been installed, the core Git analysis and local AI workflow can operate without an active internet connection.

This makes RepoPilot useful for developers who prefer local tools or work in environments with limited connectivity.

For me, the biggest advantage of open innovation is control over the entire AI workflow.

My Agent Session

I used AI-assisted development while building RepoPilot, particularly for implementation scaffolding, debugging, and testing.

One important part of the development process was improving the README Assistant after its first attempts produced unsupported evidence and overly conservative empty responses.

The Lazy Payoff 🦥

The entire purpose of RepoPilot is to automate repetitive developer chores.

Before RepoPilot

After writing code, a developer typically needs to:

  • Inspect staged changes to write a commit message.
  • Review multiple commits to prepare release notes.
  • Compare new functionality with existing documentation.
  • Manually decide which README sections need updates.

With RepoPilot

Developers can run:

repopilot suggest-commit

repopilot generate-changelog

repopilot suggest-readme

And receive AI-generated drafts based on repository evidence.

RepoPilot doesn't replace developer judgment. It reduces the repetitive work of preparing the first draft while keeping every final decision in the developer's hands.

I haven't established a reliable time-savings benchmark yet, but the working demonstrations show how the tool reduces manual drafting and review preparation.

What I Learned

This project taught me that integrating an AI model is only the beginning.

Building a useful AI-powered developer tool also requires proper input handling, trustworthy output validation, clear errors, privacy-conscious defaults, automated testing, and a smooth installation experience.

My biggest takeaway:

AI automation becomes much more useful when the output can be verified rather than blindly trusted.

RepoPilot AI is my contribution to the Slow and Steady theme: a small open-source tool that helps developers spend less time on repetitive Git chores and more time building something meaningful.

Write code. Let RepoPilot handle the boring Git work. 🚀🦥

Thanks for reading!

OpenSource #AI #Hacktoberfest

Top comments (0)