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.
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... ```
Show HN: Transform your codebase into a single Markdown doc for feeding into AI
131–140 of 172 posts
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#132Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#133Earlier 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…
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#134Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#135I use aider /copy-context command for that https://aider.chat/docs/usage/copypaste.html and with /paste you can apply the changes.
To add some more detail, aider has a mode/UX that is optimized for "copy and paste" coding with LLM web chats. The "big brain" LLM in the web chat does the hard work, and a cheap/local LLM works with aider to apply edits to your local files.
There's a little demo video in the link above that should give you the gist.
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#136I 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...
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#137Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#138This is like a rediscovery of an org-mode capability that has existed for decades, and doesn't do as much.
Is it? I use org-babel regularly but wasn't aware of it - what's the function called? As great as org-mode / org-babel is, the user base is too small to not be overlooked.
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#139Wouldn't it be wonderful to have a tool where you interact with AI interactively through the codebase via IDE / vim / emacs tree? Say, you open your codebase and start with prompts and AI+tool navigates to a function or a place where it needs to and modifies stuff while chatting to you about it? Or you jump to somewhere, highlight where you are to scope down the focus of it (while it still retains all of the code in…
I think you’re describing Aider.chat. There are 2 Emacs packages for it, one official and a very recent fork. Aider is a cli so it works great with vim as well. In Emacs I’ve had good experience with gptel as well but I prefer aider for the coding workflow
Re: Show HN: Transform your codebase into a single Markdown doc for feeding into AI
#140Got it.