Last week I started playing with GPT-4 and tried different ways to use it to optimize my dev workflow. It was fun, and I was just blown away by what GPT-4 can do.
The idea of CodePrompt first came to mind when I read "Show HN: GPT Repo Loader – load entire code repos into GPT prompts" [1]. It was precisely what I wanted to do! So I tried it.
The GPT Repo Loader works pretty well on a small codebase; However, due to its limitations in loading all files and content into the prompt, I still ran into token context limit issues and needed to copy/edit the code myself.
That's when I started working on CodePrompt. Instead of loading the entire repo, why not just load only relevant files or portions of code (or function headers?) that need for the requirement?
How I designed the user journey of CodePrompt.xyz: 1. Choose a GPT model. 2. Select a repo that you want to work with. 3. Pick the relevant files that you want to include in the prompt. 4. Add specific instructions and remove irrelevant codes as needed. 5. Copy the prompt to your chosen GPT model to generate the desired output. Chat & Iterate. 6. If you want to do something else, just go to (3) again.
This allows me to easily generate prompts to do something like - Implement features that evolve edits on multiple files - Create new components while reusing existing codebase - Generate code with the same style as other files, etc.
I would love to hear all your feedback and ideas on how I can improve it. Or if you want to chat, feel free to ping me on my Twitter @chunrapeepat.
P.S. The project is 100% open-source and free to use. Check it out: https://github.com/chunrapeepat/codeprompt