<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>AI on Wimpy's World</title><link>https://blog.wimpys.world/tags/ai/</link><description>Recent content in AI on Wimpy's World</description><generator>Hugo -- gohugo.io</generator><language>en-gb</language><managingEditor>martin@wimpress.com (Martin Wimpress)</managingEditor><webMaster>martin@wimpress.com (Martin Wimpress)</webMaster><lastBuildDate>Thu, 05 Jun 2025 13:37:42 +0100</lastBuildDate><atom:link href="https://blog.wimpys.world/tags/ai/rss.xml" rel="self" type="application/rss+xml"/><item><title>faffing about with diffs</title><link>https://blog.wimpys.world/posts/faff-ollama-conventional-commit-generator/</link><pubDate>Thu, 05 Jun 2025 13:37:42 +0100</pubDate><author>martin@wimpress.com (Martin Wimpress)</author><guid>https://wimpysworld.com/posts/faff-ollama-conventional-commit-generator/</guid><description>&lt;p&gt;Picture this: you&amp;rsquo;ve just spent literal minutes crafting the perfect bit of code, you&amp;rsquo;re chuffed with yourself, and then you open your git client only to stare at that commit message box. 🤔&lt;/p&gt;
&lt;p&gt;That cursor blinking mockingly while you try to remember what you changed just moments ago. &lt;strong&gt;And you wonder, why do I have to write this? &lt;code&gt;git&lt;/code&gt; already knows what happened!&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Now, I&amp;rsquo;m a proper &lt;a href="https://gitkraken.dev/"&gt;GitKraken&lt;/a&gt; devotee – have been for years 🦑 Love the thing so much I&amp;rsquo;ve disabled all git integrations in VS Code to maintain a clean separation between coding and source control. It&amp;rsquo;s brilliant software and I&amp;rsquo;m happy to pay for it (&lt;a href="https://gitkraken.cello.so/AxtLstzXaif"&gt;you should too using my handy-dandy referral link&lt;/a&gt;) 🤑&lt;/p&gt;
&lt;h2 id="when-ai-promises-go-sideways"&gt;When AI promises go sideways&lt;/h2&gt;
&lt;p&gt;GitKraken recently added AI integration for generating commit messages, complete with customisable prompts. Naturally, I thought &lt;em&gt;&amp;ldquo;Right, this&amp;rsquo;ll sort my commit message faff once and for all!&amp;rdquo;&lt;/em&gt; Two problems emerged rather quickly:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;First, I blew through my AI credit bundle faster than a student with their first overdraft facility. Turns out I commit quite a lot, and those credits don&amp;rsquo;t stretch as far as you&amp;rsquo;d hope.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Second, and this really wound me up, I could not for the life of me get it to generate proper &lt;a href="https://www.conventionalcommits.org/"&gt;Conventional Commits&lt;/a&gt;. I know how to craft AI system prompts – I&amp;rsquo;ve been mucking about with LLMs long enough – but GitKraken&amp;rsquo;s AI seemed determined to ignore my carefully crafted instructions about &lt;code&gt;feat:&lt;/code&gt;, &lt;code&gt;fix:&lt;/code&gt;, and &lt;code&gt;chore:&lt;/code&gt; prefixes.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id="enter-faff-stage-left"&gt;Enter faff, stage left&lt;/h2&gt;
&lt;p&gt;So naturally, being the sort of person who builds entire projects out of mild irritation, I decided to solve this myself. Meet &lt;a href="https://github.com/wimpysworld/faff"&gt;&lt;code&gt;faff&lt;/code&gt;&lt;/a&gt; – yet another bloody AI commit generator, because apparently the Internet wasn&amp;rsquo;t drowning in enough of them already ☔&lt;/p&gt;
&lt;p&gt;&lt;code&gt;faff&lt;/code&gt; does one thing: it looks at your staged git diff, sends it to a local &lt;a href="https://ollama.com/"&gt;Ollama&lt;/a&gt; LLM, and spits out a conventional commit message. No cloud APIs, no credit bundles, no sending your &lt;code&gt;TODO: delete this abomination&lt;/code&gt; code comments to feed the vibe-coding dealers.&lt;/p&gt;
&lt;div class="highlight"&gt;&lt;pre tabindex="0" class="chroma"&gt;&lt;code class="language-bash" data-lang="bash"&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;git add .
&lt;/span&gt;&lt;/span&gt;&lt;span class="line"&gt;&lt;span class="cl"&gt;faff
&lt;/span&gt;&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;p&gt;Perfect conventional commits, every time. Well, most of the time. It&amp;rsquo;s AI, not magic 🪄&lt;/p&gt;
&lt;div align="center"&gt;&lt;img alt="faff demo" src="faff.gif" width="1024" /&gt;&lt;/div&gt;
&lt;h2 id="the-plot-twist-that-made-me-question-everything"&gt;The plot twist that made me question everything&lt;/h2&gt;
&lt;p&gt;Here&amp;rsquo;s where this story takes a turn that&amp;rsquo;ll make you laugh at my expense. After building &lt;code&gt;faff&lt;/code&gt;, documenting it, and feeling rather pleased with myself, I discovered something that made me want to bang my head against my desk repeatedly.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;You can hook GitKraken&amp;rsquo;s AI up to Ollama.&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;And naturally, &lt;a href="https://github.com/wimpysworld/faff/blob/main/faff.sh#L8"&gt;my carefully crafted system prompt from &lt;code&gt;faff&lt;/code&gt;&lt;/a&gt;, when used in GitKraken AI via Ollama with the same &lt;a href="https://ollama.com/library/qwen2.5-coder"&gt;qwen2.5-coder&lt;/a&gt; models, works exactly like &lt;code&gt;faff&lt;/code&gt; does. 🤦‍♂️&lt;/p&gt;
&lt;p&gt;So technically, I could have solved my original problem without building an new tool. But where&amp;rsquo;s the fun in that?&lt;/p&gt;
&lt;h2 id="why-faff-still-matters-and-its-not-just-stubbornness"&gt;Why faff still matters (and it&amp;rsquo;s not just stubbornness)&lt;/h2&gt;
&lt;p&gt;Despite this rather embarrassing revelation, &lt;code&gt;faff&lt;/code&gt; still has its place:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Privacy by default&lt;/strong&gt;: Everything stays local, until you push it to GitHub&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;No vendor lock-in&lt;/strong&gt;: Works with any Ollama-supported model. Want to try the latest coding model? Just change the environment variable.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Shell-first design&lt;/strong&gt;: Perfect for those of us who live in terminals, or an excuse for me creating another shonky shell script&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Learning project&lt;/strong&gt;: Born from genuine frustration and a desire to poke around the &lt;a href="https://github.com/ollama/ollama/blob/main/docs/api.md"&gt;Ollama API&lt;/a&gt;. Sometimes the best tools come from scratching your own itch.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Plus, let&amp;rsquo;s be honest – there&amp;rsquo;s something deeply satisfying about having a tool that does exactly what you want, how you want it, without any &lt;em&gt;faff!&lt;/em&gt; 🥁&lt;/p&gt;
&lt;h2 id="give-it-a-whirl"&gt;Give it a whirl&lt;/h2&gt;
&lt;p&gt;If you&amp;rsquo;re tired of crafting commit messages that either say &amp;ldquo;Updated stuff&amp;rdquo; (&lt;em&gt;again!&lt;/em&gt;) or read like Victorian novels, &lt;a href="https://github.com/wimpysworld/faff"&gt;&lt;code&gt;faff&lt;/code&gt; might be worth a look&lt;/a&gt;. It&amp;rsquo;s a shell script, it works with local AI, and it follows conventional commits standards without the existential crisis.&lt;/p&gt;
&lt;p&gt;And if you decide you&amp;rsquo;d rather stick with GitKraken&amp;rsquo;s AI (which, after my discoveries, is perfectly reasonable), at least &lt;a href="https://gitkraken.cello.so/AxtLstzXaif"&gt;grab it through my referral link&lt;/a&gt; so I can pretend this whole adventure was planned from the start. ️🗺️&lt;/p&gt;
&lt;p&gt;Because sometimes the best projects are the ones born from pure spite, accidentally becoming useful along the way. That&amp;rsquo;s half the fun of building things, isn&amp;rsquo;t it?&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Drop the faff, dodge the judgment, get back to coding. 🦙&lt;/strong&gt;&lt;/p&gt;</description><summary>Another bloody AI commit generator, born from pure spite but stays local</summary></item></channel></rss>