Skip to content

Latest commit

 

History

26 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Commit

Commit is a TUI tool that allows you to generate a commit message using a locally run LLM on Ollama, or models available on the Gemini API with a stunning UI. It pushes your diffs to the model, gives you a preview of the commit message and then gives you the option either to request changes, make changes, or to commit your code.

Important

This tui assumes that ollama is already installed in case you plan on using local models. I highly recommend the gemma4 line for relatively quick, high quality responses. Nothing beats deployed models tho :/

Installation

As long as you have go installed you can simply install commit by running the following:

go install github.com/yashranjan1/commit@latest

Then use the following command to run commit wherever you'd like to:

commit

Make sure to have added the files you would like to put in your commit before you run commit!

Config

Commit makes a config file at config directory for your OS supplied by os.UserConfigDir() (doc page). If you want to change commit's configurations you can open the file at $CACHE_DIR/commit/config.json to edit your config. The config opts are the following

{
    // this could be Ollama or Gemini (case-sensitive)
    "provider": "Ollama",

    // this needs to be the model's baseModelId for gemini or the model name for Ollama (case-sensitive)
    "model": "gemini-3.5-flash",

    // your api key in case you use gemini
    "api_key": "",

    // i recommend keeping this as high as you possibly can, its only used for Ollama models
    // your model will straight up ignore parts of diffs and some instructions if your diffs
    // are large enough to overflow this context window.
    "context_window": 4096, 
}

Potential extensions

Currently this TUI only supports models run on Ollama and models on the Gemini API, but I'm considering adding support for claude and chatgpt.

Issues

Found something that doesn't work right? File a bug report please :). Make sure to include the steps for reproduction as well.

About

A TUI to use Ollama to write commit messages for git

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages