Live data from Hacker News

Show HN: I built an AI that turns GitHub codebases into easy tutorials

github.com

91–100 of 181 posts

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#91
post #77
post #51

Does it use the docs in the repository or only the code?

By default we use both based on regex: DEFAULT_INCLUDE_PATTERNS = { " .py", " .js", " .jsx", " .ts", " .tsx", " .go", " .java", " .pyi", " .pyx", " .c", " .cc", " .cpp", " .h", " .md", " .rst", "Dockerfile", "Makefile", " .yaml", " .yml", } DEFAULT_EXCLUDE_PATTERNS = { " test ", "tests/ ", "docs/ ", "examples/ ", "v1/ ", "dist/ ", "build/ ", "experimental/ ", "deprecated/ ", "legacy/ ", ".git/ ", ".github/ ", ".next/…

Have you tried giving it tests? Curious if you found they made things worse.

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#92
post #89
post #86

This is neat, but I did find an error in the output pretty quickly. (Disregard the mangled indentation) # Use the Session as a context manager with requests.Session() as s: s.get('https://httpbin.org/cookies/set/contextcookie/abc') response = s.get(url) # ??? print("Cookies sent within 'with' block:", response.json()) https://the-pocket.github.io/Tutorial-Codebase-Knowledge/Req...

This code creates an HTTP session, sets a cookie within that session, makes another request that automatically includes the cookie, and then prints the response showing the cookies that were sent. I may miss the error, but could you elaborate where it is?

The url variable is never defined

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#93
post #92
post #89

Earlier quoted context omitted.

This code creates an HTTP session, sets a cookie within that session, makes another request that automatically includes the cookie, and then prints the response showing the cookies that were sent. I may miss the error, but could you elaborate where it is?

The url variable is never defined

Yes it is, just before the pasted section.

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#94
post #86

This is neat, but I did find an error in the output pretty quickly. (Disregard the mangled indentation) # Use the Session as a context manager with requests.Session() as s: s.get('https://httpbin.org/cookies/set/contextcookie/abc') response = s.get(url) # ??? print("Cookies sent within 'with' block:", response.json()) https://the-pocket.github.io/Tutorial-Codebase-Knowledge/Req...

If only the AI could explain the errors that the AI outputs.

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#95
I had not used gemini before, so spent a fair bit of time yak shaving to get access to the right APIs and set up my Google project. (I have an OpenAPI key but it wasn't clear how to use that service.)

I changed it to use this line:

   api_key=os.getenv("GEMINI_API_KEY", "your-api_key")
instead of the default project/location option.

and I changed it to use a different model:

    model = os.getenv("GEMINI_MODEL", "gemini-2.5-pro-preview-03-25")
I used the preview model because I got rate limited and the error message suggested it.

I used this on a few projects from my employer:

- https://github.com/prime-framework/prime-mvc a largish open source MVC java framework my company uses. I'm not overly familiar with this, though I've read a lot of code written in this framework.

- https://github.com/FusionAuth/fusionauth-quickstart-ruby-on-... a smaller example application I reviewed and am quite familiar with.

- https://github.com/fusionauth/fusionauth-jwt a JWT java library that I've used but not contributed to.

Overall thoughts:

Lots of exclamation points.

Thorough overview, including of some things that were not application specific (rails routing).

Great analogies. Seems to lean on them pretty heavily.

Didn't see any inaccuracies in the tutorials I reviewed.

Pretty amazing overall!

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#99
post #98
post #80

I've said this a few times on HN: why don't we use LLMs to generate documentation? But then came the naysayers ...

Alternatively, document your code.

Id have bought a lot of lunches for myself if I had a dollar for every time I’ve pushed my team for documentation and had it turn into a discussion of “Well, how does that stack up against other priorities?

It’s a pretty foolproof way for smart political operators to get out of a relatively dreary - but high leverage - task.

AI doesn’t complain. It just writes it. Makes the whole task a lot faster when a human is a reviewer for correctness instead of an author and reviewer.

Re: Show HN: I built an AI that turns GitHub codebases into easy tutorials

#100
it appears like it's leveraging the docs and learned tokens more than the actual code. For example I don't believe it could achieve that understanding of levelDB without the prior knowledge and extensive material it's probably learned on already
Post reply on HN