<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: syedharis14</title>
    <description>The latest articles on DEV Community by syedharis14 (@syedharis14).</description>
    <link>https://dev.to/syedharis14</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2927074%2Fcf5ddc18-666f-40cf-a008-c86d7a0677ac.png</url>
      <title>DEV Community: syedharis14</title>
      <link>https://dev.to/syedharis14</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/syedharis14"/>
    <language>en</language>
    <item>
      <title>Automate Your Git Commits with AI - Introducing `git-ai-commit</title>
      <dc:creator>syedharis14</dc:creator>
      <pubDate>Thu, 27 Mar 2025 06:10:07 +0000</pubDate>
      <link>https://dev.to/syedharis14/automate-your-git-commits-with-ai-introducing-git-ai-commit-1804</link>
      <guid>https://dev.to/syedharis14/automate-your-git-commits-with-ai-introducing-git-ai-commit-1804</guid>
      <description>&lt;p&gt;Writing commit messages can be tedious, and maintaining consistency in commit logs is often overlooked. That’s why I built &lt;a href="https://www.npmjs.com/package/@syedharis14/git-ai-commit" rel="noopener noreferrer"&gt;&lt;code&gt;git-ai-commit&lt;/code&gt;&lt;/a&gt; – an &lt;strong&gt;AI-powered CLI tool&lt;/strong&gt; that generates meaningful, structured commit messages based on staged changes. 📝✨&lt;/p&gt;

&lt;h2&gt;
  
  
  🎯 Why &lt;code&gt;git-ai-commit&lt;/code&gt;?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Saves Time&lt;/strong&gt; – No need to think about commit messages manually!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Consistent Messages&lt;/strong&gt; – Follows &lt;a href="https://www.conventionalcommits.org/en/v1.0.0/" rel="noopener noreferrer"&gt;Conventional Commits&lt;/a&gt; format.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Multi-Language Support&lt;/strong&gt; – Generate commit messages in &lt;strong&gt;English, French, Spanish, Urdu, Arabic&lt;/strong&gt;, and more!&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Auto-Commit&lt;/strong&gt; – Directly commit without manual approval.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Usage Tracking&lt;/strong&gt; – View CLI usage statistics.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Smart AI Processing&lt;/strong&gt; – Analyzes &lt;code&gt;git diff&lt;/code&gt; and suggests precise messages.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  🛠️ Installation
&lt;/h2&gt;

&lt;p&gt;Install &lt;code&gt;git-ai-commit&lt;/code&gt; globally using NPM:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;npm &lt;span class="nb"&gt;install&lt;/span&gt; &lt;span class="nt"&gt;-g&lt;/span&gt; @syedharis14/git-ai-commit
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🚀 How to Use It
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;1️⃣ Generate an AI-powered commit message&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git-ai-commit generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;2️⃣ Auto-commit using AI-generated message&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git-ai-commit generate &lt;span class="nt"&gt;--auto-commit&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;3️⃣ Copy commit message to clipboard&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git-ai-commit generate &lt;span class="nt"&gt;--copy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;4️⃣ Generate message in a specific language&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git-ai-commit generate &lt;span class="nt"&gt;--lang&lt;/span&gt; fr
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  &lt;strong&gt;5️⃣ View usage statistics&lt;/strong&gt;
&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git-ai-commit stats
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🔍 How It Works
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;git-ai-commit&lt;/code&gt; fetches the &lt;strong&gt;staged&lt;/strong&gt; &lt;code&gt;git diff&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;It sends the &lt;strong&gt;diff&lt;/strong&gt; to OpenAI’s API for analysis.&lt;/li&gt;
&lt;li&gt;AI generates a &lt;strong&gt;Conventional Commit-style message&lt;/strong&gt;.&lt;/li&gt;
&lt;li&gt;The message is displayed, copied, or committed automatically.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  📦 Example Commit Message
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Before:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git-ai-commit generate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;AI Response:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;feat(auth): add OAuth2 login endpoint
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  📌 Configuration
&lt;/h2&gt;

&lt;p&gt;Create a &lt;code&gt;.git-ai-commitrc&lt;/code&gt; in your project to customize behavior:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight json"&gt;&lt;code&gt;&lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"model"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"gpt-4o"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"maxLines"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"autoCommit"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"copy"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;false&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"lang"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="s2"&gt;"en"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;&lt;span class="w"&gt;
  &lt;/span&gt;&lt;span class="nl"&gt;"analytics"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;&lt;span class="w"&gt; &lt;/span&gt;&lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="w"&gt;
&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  🚀 Open Source &amp;amp; Contribution
&lt;/h2&gt;

&lt;p&gt;This project is &lt;strong&gt;open-source&lt;/strong&gt; and I’d love your contributions! Feel free to &lt;strong&gt;star&lt;/strong&gt; ⭐ the repo, open issues, or contribute!&lt;/p&gt;

&lt;p&gt;🔗 &lt;a href="https://github.com/syedharis14/git-ai-commit" rel="noopener noreferrer"&gt;GitHub Repository&lt;/a&gt;&lt;br&gt;&lt;br&gt;
🔗 &lt;a href="https://www.npmjs.com/package/@syedharis14/git-ai-commit" rel="noopener noreferrer"&gt;NPM Package&lt;/a&gt;  &lt;/p&gt;




&lt;p&gt;What do you think about &lt;code&gt;git-ai-commit&lt;/code&gt;? Would this help improve your workflow? Let me know in the comments! 🚀&lt;/p&gt;

</description>
      <category>git</category>
      <category>opensource</category>
      <category>automation</category>
      <category>ai</category>
    </item>
  </channel>
</rss>
