I started working on GitChronicler mostly to learn how I could integrate AI into my workflow in a way that would actually spare me doing boring stuff, like writing the git commit message.

GitChronicler is a very simple tool that feeds a patch to the OpenRouter API and asks for a git commit message. In addition to the simple use case, there are a few more features, like checking that a commit message really describes what a patch does or write up a summary for a branch so that it can be used in a pull request description.

Write a commit message

Let’s look at the main use case for GitChronicler. Instead of writing:

g i t c o m m i t - s - m " D o n e s o m e t h i n g "

You can just run:

g i t - c h r o n i c l e r w r i t e - s

If you want to commit only the staged changes, pass --cached, and if you want to edit the log message before committing it, use -i.

Check a commit message

Another useful function is the possibility to check that the commit message reflects that the code does:

g i t - c h r o n i c l e r c h e c k

It also implements a few tools that are used with models supporting them. The tool permits the AI model to access more files in the git repository if needed.

Describe a branch

It is sometimes useful to get a summary of a series of patches, so that for example it can be used as the description for a pull request:

g i t - c h r o n i c l e r d e s c r i b e o r i g i n / m a i n

Source repository

If you are interested to try it out, check its code here: https://github.com/giuseppe/git-chronicler