Logo

dev-resources.site

for different kinds of informations.

Writting a GH extension with AI

Published at
1/2/2025
Categories
ai
github
bash
extensions
Author
r0x0d
Categories
4 categories in total
ai
open
github
open
bash
open
extensions
open
Author
5 person written this
r0x0d
open
Writting a GH extension with AI

I was looking out for some github repositories in my home page recently, with
the hopes to find some interesting project or just to browse out the updates
from the people that I follow. While I was looking out for those updates, I
bumped into DeekSeek-Coder.

At first, I thought to myself that it was just another AI experimental project,
but to my fortune, I discovered gold here.

My history with AI

I was always the type of person who didn't care too much about AI as I felt
that it was not worth it to use it to do the job that I was supposed to do.
That changed drastically when I started using zed and it's
awesome AI integration.

Zed makes interacting with AI pretty simple and straightforward. You just need
to configure either a local LLM provider, an API Key to a service (like
OpenAI), or you could just use the out-of-the-box Zed solution with Claude.

The later was my choice for diving into the AI world. I felt that Claude had
good code generation and was driving giving me good answers here and there.

When I bumped into the free tier limit with this integration, I started using
other providers like ChatGPT or even GitHub
Copilot
.

ChatGPT, of course, had the best results when you ask the question using that
limited amout of tokens for the good model they provide, and GitHub Copilot on
the free tier was... Strange...

With the bad experience with GitHub Copilot I had and not wanting to pay for a
subscription in ChatGPT, DeepSeek-Coder felt like a good option for myself.

Writting some code with it

So, to test this out, I asked DeepSeek-Coder to write some code for me. It
couldn't be just some random code, but something that I really wanted. I asked
DeepSeek-Coder to write me a bash script to interact with gh api command
and retrieve the stargazer from a user.

Why this matters, you may think? Well, I've grown to use stargazers in github a
lot recently, and every time that I wanted to clone a particular repository or
a set of repositories from a tag or a topic, it was a pain to do that all by
hand. So I asked DeepSeek-Coder to help me out with that and write some
simple bash script that could do the following:

  1. Fetch the user starred repositories
  2. Filter the repositories by a "tag"
  3. Show it using TUI (mainly fzf) the repositories for the user to select which repo they want to download
  4. If the repo already exists, skip it.

A pretty simple challenge, and something that an AI can do.

All of the questions I asked in that chat window, DeepSeek-Coder did it
amazingly well. The code itself was not that difficult and did not contain
trick regex expressions and stuff like that, but it managed to handle all my
use case above pretty nicely.

I need to test it a bit more and try to generate some more complex use cases,
but DeepSeek-Coder was on point with what I wanted and was able to generate
for me a single bash script that could do all the above. Something that GitHub
Copilot
failed to do.

Conclusion

If you want to take a look at what I did using DeepSeek-Coder, please feel
free to check out the gh extension repository I created:
r0x0d/gh-stargazer-clone.

bash Article's
30 articles in total
Favicon
Understanding Linux Shells: Interactive, Non-Interactive, and RC Files
Favicon
Fixing Linux Backup Sync Issues for exFAT Compatibility
Favicon
Ergonomic Pyhon Text Piping Solution for Linux Shell with pypyp and uv
Favicon
Changing the Login Shell with Security and Interactivity
Favicon
Final Bash Script Series Mastering Remote Server Management and Web App Deployment
Favicon
Writting a GH extension with AI
Favicon
Test GPIO pins on BeagleBone Black by toggling high to low
Favicon
NYP Infosec December CTF 2024 writeup!
Favicon
Building a Smart Heater Controller with Python, Docker, and Bluetooth #3
Favicon
The Complete Guide to Bash Commands
Favicon
How to Get Started with Bash Scripting for Automation
Favicon
Building a Basic Testing Framework in Bash 🐚
Favicon
Funny how, as I was writing this, I started wondering—could we make this pipeline even smarter? That’s when SonarQube came to mind. But can it even work with Bash scripts? I’d love to hear your thoughts!
Favicon
Domina Bash con ejemplos prácticos de Git
Favicon
Explaining Null Device or Black Hole Register in Vim
Favicon
A Media Server on Steroids - Walkthrough
Favicon
From FZF file preview to a browser for cht.sh to discovering the ideal solution
Favicon
Code. Battery notifier.
Favicon
🌟Simplifying User Account Management with Bash Scripting Day3🌟
Favicon
Become a Bash Scripting Pro in 10 Minutes: A Quick Guide for Beginners
Favicon
Automatically Monitor and Manage RAM Usage for Next.js Development
Favicon
Bash Script - Task Management
Favicon
Bash Your Tools
Favicon
Bash Script Series: Automating Log Analysis with Bash Script or Shell Script
Favicon
The Most Interesting Mostly Tech Reads of 2024
Favicon
🚀 Automating Process Monitoring & Restarting with Bash Scripting Day4! 🔧
Favicon
🚀 RazzShell v1.0.1 is Here: Plugin Support, Enhanced Job Management, and More! 🌟
Favicon
Step-by-Step Guide: Assigning a Namecheap Domain to DigitalOcean Hosting with Nginx
Favicon
Simplify GitHub Workflow Management with My-GitHub-Manager
Favicon
How to play a bunch of lemmings

Featured ones: