gitcommit-cli is a command-line tool that automatically crafts git commit messages by analyzing your staged diffs with simple heuristics or, if you supply an OpenAI key, by querying ChatGPT. It lets you preview the generated message and then optionally run git commit in one smooth command. By standardizing message style and reducing friction, gitcommit-cli keeps your workflow focused and your history clean.
No followers yet
Once you ship this you can't edit the description of the project, but you'll be able to add more devlogs and re-ship it as you add new features!
So the reason it took so much time is that I tried two separate methods. Out of these 2 methods, only the last worked.
First, I tried to load the model locally and have everyone download it, which is a bad idea. The second dumb idea I had while making this first version was the concept that making a request was bad. What was bad was requiring an API key.
So for my second version I started out trying to make a request to hugging face's API, but I was having trouble with requesting without a key. So I took a break on slack and remembered about ai.hackclub.com so I am using that.
Next devlog is with my cli.
VRO: I was going to use InferenceClient.chat_completion but i occured to me I need to run this locally so I am going to redo everything related to the transformer.
So I made the heuristic, and it did not go to plan. So basically, what I based my heuristic on was sensing keywords and then putting the amount of insertions and deletions. This was supposed to be a 15-minute thing, but it took way too long.
I used the tool on my staged changes, and it returned fix(gitcommit_cli): 129 insertions, 3 deletions. THEN. THEN. I came to my senses and realized no one will use this for 5 words. So now I am going to delete it and use Hugging Face Transformers to create the git commit message.
My vision when creating this project is for users to simply type in a command, and for my CLI to take care of the rest. This would make it so much easier for people to commit. This would also help reviewers when reviewing YSWS projects because the more commits, the easier it is to review.
Anyways I created the scafolding, branding, and a function to get the staged commits.