<?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: Riderman de Sousa Barbosa</title>
    <description>The latest articles on DEV Community by Riderman de Sousa Barbosa (@ridermansb).</description>
    <link>https://dev.to/ridermansb</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%2F49438%2Fbe01ad6d-3eb1-4cbe-8b20-583c16facc1e.jpeg</url>
      <title>DEV Community: Riderman de Sousa Barbosa</title>
      <link>https://dev.to/ridermansb</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ridermansb"/>
    <language>en</language>
    <item>
      <title>How I use AI, Raycast, and Lazygit to help me write better commit messages</title>
      <dc:creator>Riderman de Sousa Barbosa</dc:creator>
      <pubDate>Wed, 28 May 2025 19:13:43 +0000</pubDate>
      <link>https://dev.to/ridermansb/how-i-use-ai-raycast-and-lazygit-to-help-me-write-better-commit-messages-55g1</link>
      <guid>https://dev.to/ridermansb/how-i-use-ai-raycast-and-lazygit-to-help-me-write-better-commit-messages-55g1</guid>
      <description>&lt;p&gt;In this blog post, I will explain how to use the Raycast AI feature to write effective Git commit messages and explore Lazygit to automate this process.&lt;br&gt;
Essentially, the idea is to press one or two keys to commit changes with a generated commit message by AI that has good context about your work.&lt;br&gt;
When I say good context, I mean that it understands the task (we just need to have the task open in a browser tab, whether it's Jira, a GitHub issue, or anything else), the files you changed, and a summary that you provide.&lt;/p&gt;
&lt;h1&gt;
  
  
  Raycast
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://www.raycast.com/" rel="noopener noreferrer"&gt;Raycast&lt;/a&gt; has a nice feature called AI Commands, which allows you to add instructions and placeholders, making it easier to call the command later.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1mni0qw90kgabus8p3c.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fu1mni0qw90kgabus8p3c.png" alt="Raycast Creating AI Command.png" width="765" height="505"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These instructions come with placeholders that make the command highly customizable.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fi8ggrof902dz5qzqvo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fi8ggrof902dz5qzqvo.png" alt="Raycast Placeholders in AI Commands.png" width="765" height="489"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In my case, I use the &lt;code&gt;{argument name="I did:"}&lt;/code&gt; placeholder. Before Raycast runs the AI command, it asks me, "I did:" so I can write a brief summary of what I did.&lt;/p&gt;

&lt;p&gt;I include &lt;code&gt;browser&lt;/code&gt; and &lt;code&gt;web&lt;/code&gt; context since in my prompt I include reference to &lt;a href="https://www.conventionalcommits.org/en/v1.0.0-beta.4/" rel="noopener noreferrer"&gt;conventional commits&lt;/a&gt; documentation&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lues6kjm4o0y0oqajqe.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7lues6kjm4o0y0oqajqe.png" alt="Raycast Browser and Web Context" width="168" height="38"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I added the &lt;code&gt;{browser-tab}&lt;/code&gt; placeholder because before asking the AI to generate the commit message, I open the browser tab containing the issue or ticket I worked on. This allows the AI to access the page and gain more context about the task.&lt;/p&gt;

&lt;p&gt;Finally, I added the &lt;code&gt;{clipboard}&lt;/code&gt; placeholder, which will contains the git diff results obtained using &lt;code&gt;git diff --cached -U4&lt;/code&gt;. The &lt;code&gt;-U4&lt;/code&gt; option includes four lines before and after the changes.&lt;/p&gt;
&lt;h2&gt;
  
  
  Lazygit
&lt;/h2&gt;

&lt;p&gt;Lazygit is not necessary, but it makes my work with Git easier by providing a highly customizable shell interface that I can use.&lt;/p&gt;

&lt;p&gt;To make my job easier, I created a custom command for Lazygit to:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask me for a summary of the changes I made.&lt;/li&gt;
&lt;li&gt;Get the diff using the git diff command.&lt;/li&gt;
&lt;li&gt;Open a Raycast deeplink for the AI command I created earlier, with the argument being the summary and the git diff already in the clipboard.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Following the command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;&amp;lt;c-d&amp;gt;'&lt;/span&gt;
  &lt;span class="na"&gt;context&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;files'&lt;/span&gt;
  &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Copy&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;diff&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;changes'&lt;/span&gt;
  &lt;span class="na"&gt;command&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;git&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;diff&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;--cached&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;-U4&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;pbcopy&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;&amp;amp;&amp;amp;&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;open&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;"raycast://ai-commands/generates-git-commit?arguments="{{.Form.Explain&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;|&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;quote}}""'&lt;/span&gt;
  &lt;span class="na"&gt;prompts&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;input'&lt;/span&gt;
      &lt;span class="na"&gt;title&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Explain&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;the&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;changes'&lt;/span&gt;
      &lt;span class="na"&gt;key&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;Explain'&lt;/span&gt;
      &lt;span class="na"&gt;initialValue&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;With this configuration, when I press &lt;code&gt;Ctrl + d&lt;/code&gt; in Lazygit, a prompt will open asking me for the summary. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpc6pdwap1xry09waujal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpc6pdwap1xry09waujal.png" alt="Lazygit asking for summary" width="800" height="50"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then it will copy the diff and launch the Raycast AI Command with everything in place. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabw95wvp8wsrhq5q6k84.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fabw95wvp8wsrhq5q6k84.png" alt="Raycast generaged commit message" width="749" height="470"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I just need to copy the generated commit message created by AI based on your summary, the git diff, and the opened webpage.&lt;/p&gt;

&lt;p&gt;And paste into Lazygit&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzugpmhpklrpceb3n78iq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fzugpmhpklrpceb3n78iq.png" alt="Paste commit message in Lazygit" width="800" height="551"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx0dazlo2ubs6517nthj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdx0dazlo2ubs6517nthj.png" alt="Message pasted into Lazygit" width="800" height="198"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Raycast is ideal for this because we can use these placeholders to dynamically provide context for AI. Additionally, with &lt;a href="https://chromewebstore.google.com/detail/raycast-companion/fgacdjnoljjfikkadhogeofgjoglooma" rel="noopener noreferrer"&gt;their extension&lt;/a&gt;, the AI utilizes the browser tab containing information about the task, allowing us to focus on writing effective prompts.&lt;/p&gt;

</description>
      <category>git</category>
      <category>lazygit</category>
      <category>ai</category>
      <category>raycast</category>
    </item>
    <item>
      <title>Serverless is just for image processing or can I use to build my API</title>
      <dc:creator>Riderman de Sousa Barbosa</dc:creator>
      <pubDate>Thu, 14 Dec 2017 23:13:13 +0000</pubDate>
      <link>https://dev.to/ridermansb/serverless-is-just-for-image-processing-or-can-i-use-to-build-my-api-d3c</link>
      <guid>https://dev.to/ridermansb/serverless-is-just-for-image-processing-or-can-i-use-to-build-my-api-d3c</guid>
      <description>&lt;p&gt;I was talking with a friend and he told me that Lamda functions (serverless) is just for operations like resize an image and cannot be used as API for example.&lt;/p&gt;

&lt;p&gt;What do you think?&lt;/p&gt;

&lt;p&gt;Can I use Serverless for everything? and replace my Backend.&lt;/p&gt;

</description>
      <category>discuss</category>
    </item>
  </channel>
</rss>
