DEV Community

Cover image for Let's test custom GPT that can create git repositories

Posted on

Let's test custom GPT that can create git repositories

Recently Open AI introduced custom GPTs, and the feature that made me exited was actions. According to their docs:

Actions allow GPTs to integrate external data or interact with the real-world, such as connecting GPTs to databases, plugging them into your emails, or making them your shopping assistant, all through APIs.

What if we make GPT to interact with GitHub repositories with GitHub API?
Here's the list of actions that could be useful:

  1. Create a repository
  2. Read files from a repository
  3. Create or update files in a repository

Probably, such custom GPT can open new possibilities in our developer's workflow.

So I've created a custom GPT. Here's the link

In order to enable this GPT to interact with your GitHub, you should provide access token. Here's how to generate it:

  1. Go to GitHub and open Settings
  2. Click Developer Settings in the sidebar menu
  3. Click Personal access token menu
  4. You can generate Fine grained tokens or classic tokens. Please take into account, that if you want this GPT to create repo, you should give bigger scope.

Let's open our custom GPT:
Custom GPT

Let's put this prompt:

You should create Vanilla JS project without dependencies.
I will open index.html, and I will see there one button called "Increase". Each item I press the button, I see the big number above the button which is incremented. Each time I press the button, the number is incremented and can be seen in the UI. Button should be also big. Both button and number should be at the center of the page. Button is below the number.
You can generate files and upload them to GitHub right away.

Custom GPT prompt

GPT responded showing the understanding of what it should do. It requested an auth token from me, to interact with GitHub from my account.

Custom GPT answer

It performed two actions, and gave me the link to the repository

Custom GPT answer

Here's the result when I've opened index.html file:

Gif of the result

Link to the AI generated repository
Link to the custom GPT

I think in the near future we will have very capable GPTs, that will be able to do the work for us, developers. And our role will come to the following:

  1. Generate prompts according to requirements/specifications of stakeholders
  2. Feed this prompts to custom GPTs, and receive git commits as outputs.
  3. Check the work, making sure that everything is working as expected. Do some small changes in code if necessary.

Please let me know what do you think.
In the next post I will provide a more complicated use case.

Top comments (0)