Live data from Hacker News

Show HN: Transform your codebase into a single Markdown doc for feeding into AI

tesserato.web.app

141–150 of 172 posts

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#141
post #66

Earlier quoted context omitted.

That's very nice and compact. I do the same with a short bash script, but wrap each file in triple-backticks and attempt to put the correct language label on each eg: Filename: demo.py ```python ...python code here... ```

Mind sharing the script?

I have something similar.

https://github.com/jzombie/globcat.sh

Nothing fancy, but gets the job done.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#142

If it's useful to anyone, I made a VS Code/Cursor extension that combines all open files into one big text document. I use it with ChatGPT's o1 pro (which can handle around 100,000 tokens). 1. Open all of the files I think are relevant 2. Use the extension to combine them 3. Copy and paste into ChatGPT https://marketplace.visualstudio.com/items?itemName=DVYIO.co...

I’ll be using this, thank you!

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#143
post #120

This thread has convinced me that Aider/Cursor need to do more marketing.

Cursor is all the rage. Nobody talks about Aider, sadly.

I partially disagree. Maybe it depends what circles you run in but at least here on HN I’ve seen Aider mentioned more times than I can count. Is cursor more popular? Yeah…but the people here are talking about Aider. That’s how I learned about it.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#144
I see lots of folks here using LLMs in their codebases. Does that mean there isn’t much concern about sharing your app’s code with an LLM? Have people just gotten comfortable with this now? Or does it only matter for closed source or proprietary code bases ?

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#145
post #123

Earlier quoted context omitted.

Correct, but it's the same as what OP shared. You should use Aider/Cursor for proper indexing/intelligent codebase referencing

I'm still puzzled how come people are convinced by Cursor, while my experience was meh at best. Can it index your stuff? okay it can. Can it refactor a simple function? No it cannot, it can't even rename a damn Java class. How can I trust it to generate then code based on my codebase? So, what is your use case then? Or can anybody point me to some blog/articles/videos showing some real use cases for Cursor? Real as i…

>Java

found the problem

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#146

I use the following for feeding into AI find . -print -exec cat {} \; -exec echo \; Which will return for each file (and subfolders) the filename and then the content of the file. Then `| pbcopy` to copy to clipboard and paste it into ChatGPT or similar.

Or, for a lazier approach:

    $ head -10000 *
    ==> package.json  tsconfig.json 

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#148

I use the following for feeding into AI find . -print -exec cat {} \; -exec echo \; Which will return for each file (and subfolders) the filename and then the content of the file. Then `| pbcopy` to copy to clipboard and paste it into ChatGPT or similar.

yek makes it a bit quicker and you can do all your piping with it:

https://github.com/bodo-run/yek

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#149
post #99
post #14

Unfortunate naming, given that CodeWeavers is already a company making a Windows "emulator" for Linux and macOS. [1] [1] https://www.codeweavers.com/

All names are taken. There's no need to point this out every time.

Huewoblfan is not taken! Noiewoidc is free. XIONqlic – totally available, can mean a range of things! Ciohupoij – a bit of asian flavour but still a valid free name.

Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI

#150
Given the limited context length of most LLMs, is there value in turning in an entire codebase into a doc to feed it into an LLM?

I think cherry-picking relevant sections would be necessary to make it function effectively. Has anyone tried using tree-sitter to recursively feed it the source for functions used in the section we want to analyze to optimize for this?

Post reply on HN