Skip to content

MasonAndrewHarrison/GitHub-Message-Generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Message Generator

This script automatically writes a commit message locally when you do a git commit.

Features

  • Generates commit messages from your staged changes
  • Uses a local LLM (no API keys required)
  • Fast and simple CLI workflow
  • Works directly with your existing Git setup

Requirements

  • Linux or WSL (Windows users should use WSL)

    Why the Hell would you be using Windows

  • ~6 GB of VRAM for Qwen2.5-Code 7B

    8 GB of VRAM is more stable
    Qwen2.5-Code 3B and 14B both work although you would need to change the config.json file.

Setup (Linux / WSL)

1. Install Ollama

curl -fsSL https://ollama.com/install.sh | sh

2. Pull the model

ollama pull qwen2.5-coder:7b

3. Install Python dependencies

pip install requests --break-system-packages

4. Enable the command

chmod +x ~/GitHub-Message-Generator/ai-commit.sh
echo "alias ai-commit='~/GitHub-Message-Generator/ai-commit.sh'" >> ~/.bashrc
source ~/.bashrc

Usage

Step by step

git add .        # stage your changes
ai-commit        # generate and commit
git push         # push to remote

All in one step

ai-commit --all --push

Flags

Flag Description
--all Stage all changes before committing
--push Push to remote after committing
--dry-run Show commit message without committing
--verbose Show full diff being sent to the model
--help Show help message

Use with GUI (VS-Code, Open-OSS, VS-Codium)

Search for "Task Buttons" by spencerwmiles in the extensions panel.

or

Install the Task Buttons extension

# VS Code
code --install-extension spencerwmiles.vscode-task-buttons

# Code - OSS
code-oss --install-extension spencerwmiles.vscode-task-buttons

# VSCodium
codium --install-extension spencerwmiles.vscode-task-buttons

# Cursor
cursor --install-extension spencerwmiles.vscode-task-buttons

Add these to your settings.json (Ctrl+Shift+P → "Open User Settings JSON"):

"VsCodeTaskButtons.tasks": [
    {
        "label": "$(git-commit) AI Commit",
        "task": "AI Commit"
    }
]

Copy tasks.json to the appropriate location for your editor:

Editor Path
VS Code ~/.config/Code/User/tasks.json
Code - OSS ~/.config/Code - OSS/User/tasks.json
VSCodium ~/.config/VSCodium/User/tasks.json
Cursor ~/.config/Cursor/User/tasks.json

Example Output

feat: add saliency map generation for PyTorch model

- implemented gradient-based visualization
- added utility function for image preprocessing
- updated training script to support saliency output

Configuration

Edit config.json to change the model:

{
    "model": "qwen2.5-coder:7b"
}

Any model available in Ollama will work. Recommended options:

Model VRAM Quality
qwen2.5-coder:3b ~3GB Good
qwen2.5-coder:7b ~6GB Better
qwen2.5-coder:14b ~10GB Best

Credits

About

This script automatically writes a commit message locally when you do a git commit.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors