HackerReposA FIELD GUIDE TO OPEN SOURCE
ProSponsor the shelf♧ 0
← Back to top all-time
mpoon
gpt-repository-loader
Python2023–2023
mpoon / gpt-repository-loader

gpt-repository-loader

Convert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.

7Distinct people
8Mentions
0Explicit recommenders
3KGitHub stars
REPOSITORY AT A GLANCE

What to know before exploring

What it is

Convert code repos into an LLM prompt-friendly format. Mostly built by GPT-4.

GitHub

Where it is used

No documented product use has been verified yet.

What people are saying

No recommendation phrase was found in the indexed comments.

No classified warning is attached to this page. Read the discussions before treating silence as approval.

Also in these discussions

No other repository is repeatedly linked in the same discussions.

This week on Hacker News

Nov 7–Nov 14 UTC · Direct repository links and separately labeled related project stories. Indexed through 11/14/2026, 3:56:07 PM UTC.

No direct repository links were found in the indexed HN discussions over the past seven days. Older discussions are available below.

Mentions over time

HN mentions by week8 dated mentions

Observed mentions: 2023-03-17 00:59:54 UTC to 2023-05-12 22:13:18 UTC. Weeks start Monday, UTC.

0123452023-03-13 00:00:00 UTC to 2023-03-20 00:00:00 UTC (exclusive): 5 mentions; 1 submissions, 4 commentsMar 132023-03-20 00:00:00 UTC to 2023-03-27 00:00:00 UTC (exclusive): 1 mentions; 1 submissions, 0 comments2023-03-27 00:00:00 UTC to 2023-04-03 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-03 00:00:00 UTC to 2023-04-10 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-10 00:00:00 UTC to 2023-04-17 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 commentsApr 102023-04-17 00:00:00 UTC to 2023-04-24 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-04-24 00:00:00 UTC to 2023-05-01 00:00:00 UTC (exclusive): 0 mentions; 0 submissions, 0 comments2023-05-01 00:00:00 UTC to 2023-05-08 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 comments2023-05-08 00:00:00 UTC to 2023-05-15 00:00:00 UTC (exclusive): 1 mentions; 0 submissions, 1 commentsMay 8

Counts come from the repository’s dated source evidence. Index cutoff: 2026-11-02 08:16:59 UTC.

View mention counts and date ranges
UTC ranges include their start and exclude their end. Select a period to filter the source evidence.
PeriodStart (UTC)End (exclusive, UTC)MentionsSubmissionsComments
Mar 132023-03-13 00:00:00 UTC2023-03-20 00:00:00 UTC514
Mar 202023-03-20 00:00:00 UTC2023-03-27 00:00:00 UTC110
Mar 272023-03-27 00:00:00 UTC2023-04-03 00:00:00 UTC000
Apr 32023-04-03 00:00:00 UTC2023-04-10 00:00:00 UTC000
Apr 102023-04-10 00:00:00 UTC2023-04-17 00:00:00 UTC000
Apr 172023-04-17 00:00:00 UTC2023-04-24 00:00:00 UTC000
Apr 242023-04-24 00:00:00 UTC2023-05-01 00:00:00 UTC000
May 12023-05-01 00:00:00 UTC2023-05-08 00:00:00 UTC101
May 82023-05-08 00:00:00 UTC2023-05-15 00:00:00 UTC101

What Hacker News says

8 sources
I've had access to the 32k model for a bit and I've been using this to collect and stuff codebases into the context: https://github.com/mpoon/gpt-repository-loader It works really well, you can tell it to implement new features or mutate parts of the code and it having the entire (or a lot of) the code in its context really improves the output. The biggest caveat: shit is expensive! A full 32k token request will run you like $2, if you do dialog back and forth you can rack up quite the bill quickly. If it was 10x cheaper, I would use nothing else, having a large context window is that much of a game changer. As it stands, I _very_ carefully construct the prompt and move the conversation out of the 32k into the 8k model as fast as I can to save cost.
In It looks like GPT-4-32k is rolling out
NameError·Mar 24, 2023Submission

Show HN: "GPT Take the Wheel" – write what you want, let GPT implement it

As mentioned in the readme, this was directly inspired by the this project: https://github.com/mpoon/gpt-repository-loader And by the top comment on the HN thread about it: https://news.ycombinator.com/item?id=35191303 Thanks to both the creator and commenter there for the idea. This adds another "twist", in that if you run the "take the wheel" version, it'll automatically implement the changes (i.e. overwrite a file with whatever GPT spits out) and show you the git diff. This is obviously potentially unsafe - you're overwriting your files with whatever the LLM spits out, so please be careful and don't run it somewhere with important files, or in a repo with files you wouldn't paste into the chatGPT input box. I wouldn't even install this on a work computer. This is pretty basic and isn't necessarily all that useful for real work, the wor
Read the rest
kflow is make request -> send file(s) -> GPT changes one file. There's no way to continue a conversation, or ask it to make multi-file changes etc. It's fun to play with though!
4 points · Open discussion
So I have been toying with an AutoPR GitHub Action for a bit but seeing this spurred me to actually put it into a format for y'all to try. It uses GPT-4 to automatically generate code based on issues in your repo and opens pull requests for those changes. https://github.com/irgolic/AutoPR/ What AutoPR can do: - Automatically generates code based on issues in your repo. - Opens PRs for the generated code, making it easy to review and merge changes. By using this GitHub Action, you can skip the manual steps of prompt design, and let the AI handle code generation and PR creation for you. Here's how I used it to make the license for itself: https://github.com/mpoon/gpt-repository-loader/issues/23 Feel free to give it a try, and I would love to hear your feedback! It's still in alpha and it works for straightforward tasks, but I have a plan to
Read the rest
scale it up. Let's see how far we can push GPT-4 and create a more efficient development process together.
In Show HN: GPT Repo Loader – load entire code repos into GPT prompts
https://github.com/mpoon/gpt-repository-loader/pull/17/ If you look at this PR, he had ChatGPT write the tests for him. He wrote the issue on https://github.com/mpoon/gpt-repository-loader/issues/16 and summarized https://github.com/mpoon/gpt-repository-loader/discussions/1... "Open an issue describing the improvement to make Construct a prompt - start with using gpt_repository_loader.py on this repo to generate the repository context, then append the text of the opened issue after the --END-- line." Feels like it needs to add a little Github client to be able to automatically append the text of issues at the end of the output. I'm sure ChatGPT can write a Github client in Python no problem.
In Show HN: GPT Repo Loader – load entire code repos into GPT prompts
mpoon·Mar 17, 2023Submission

Show HN: GPT Repo Loader – load entire code repos into GPT prompts

I was getting tired of copy/pasting reams of code into GPT-4 to give it context before I asked it to help me, so I started this small tool. In a nutshell, gpt-repository-loader will spit out file paths and file contents in a prompt-friendly format. You can also use .gptignore to ignore files/folders that are irrelevant to your prompt. gpt-repository-loader as-is works pretty well in helping me achieve better responses. Eventually, I thought it would be cute to load itself into GPT-4 and have GPT-4 improve it. I was honestly surprised by PR#17. GPT-4 was able to write a valid an example repo and an expected output and throw in a small curveball by adjusting .gptignore. I did tell GPT the output file format in two places: 1.) in the preamble when I prompted it to make a PR for issue #16 and 2.) as a string in gpt_repository_loader.py, both
Read the rest
of which are indirect ways to infer how to build a functional test. However, I don't think I explained to GPT in English anywhere on how .gptignore works at all! I wonder how far GPT-4 can take this repo. Here is the process I'm following for developing: - Open an issue describing the improvement to make - Construct a prompt - start with using gpt_repository_loader.py on this repo to generate the repository context, then append the text of the opened issue after the --END-- line. - Try not to edit any code GPT-4 generates. If there is something wrong, continue to prompt GPT to fix whatever it is. - Create a feature branch on the issue and create a pull request based on GPT's response. - Have a maintainer review, approve, and merge. I am going to try to automate the steps above as much as possible. Really curious how tight the feedback loop will eventually get before something breaks!
373 points · Open discussion

MAKE YOURSELF AT HOME

A few shortcuts

/
Search the collection
?
Open this guide
Esc
Close dialogs and navigation

Your saved repositories and interests stay in this browser.