Live data from Hacker News

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

tesserato.web.app

51–60 of 172 posts

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

#51
Tip: If you ever need to do this on a public GitHub repository you can use "gitingest".

This will open a website that creates a copy of all the file contents of the repo (code, docs, ...) It's a great tool to use when using new/obscure code with LLMs in my opinion.

The UX is so just easy and great, change the URL from https://github.com/user_name/repo_name> to https://gitingest.com/user_name/repo_name>

//edit: fixed URLs

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

#53
post #25
post #5

Earlier quoted context omitted.

or https://github.com/azer/llmcat

I simply have a bash script called printall which takes in some args, and outputs markdown codeblocks with filenames and a tree. One of hundreds of scripts built up over the years.

if you add fzf to speed up file / folder selection, you'll have your own llmcat :)

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

#55
post #37

Earlier quoted context omitted.

you're not. looks like that's kind of it, but would the thing have the context of the whole project when I'm in a file/class/function? With copilot, in my case, it was so far mostly like a fancy autocomplete that has immediate vicinity in its memory where it would be vastly more useful if it had the context of the whole project / all files.

Cursor indexes the entire code use with embeddings. It works well in small single app projects

it is also the "right thing to do" IMHO.

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

#58
See the script I created that does something similar with a few improvements for large projects:

https://paste.mozilla.org/9rD95yAy

I would like to be able to create sets of files that I can easily send to the clipboard in this kind of format. The files could correspond to the ones relevant to a particular feature, etc. They don't always fall under the same subtree of the source code, and the entire source code is too big for the context.

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

#59
post #56

Any unique benefits over using this vs something like Repomix? https://github.com/yamadashy/repomix

CodeWeaver is compiled, so it might be faster. Also, you can grab a compatible executable from the releases section, and you're good to go, instead of using `go install` so, no dependencies. Personally, I considered following the `.gitignore` route but found that manually specifying what to exclude via a comma-separated list of regular expressions provided me with the flexibility I needed (initial setup might be a bit tedious, though, but, then again, you can use an LLM for that).

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

#60
I made a similar tool in Golang, https://github.com/foresturquhart/grimoire. It tries to be a bit cleverer, by prioritising files that have had many commits, respecting .gitignore files, and excluding useless content like binaries or vector images.
Post reply on HN