Live data from Hacker News

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

tesserato.web.app

151–160 of 172 posts

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

#152

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 ?

You can run an llm on your local machine, and you can get llm sandboxes for your company.

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

#153

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

Same for windsurf, I’ve been using it to generate documentation for code bases. It will generate markdown with mermaid diagrams to explain whatever you want to know; from the component architecture of an entire application, to the sequence diagram for a specific button, and data and ER diagrams.

But the approach to fit your entire codebase into one document so you can include it in your prompt context seems a dead end, instead the llm can use an agent to do targeted search through your code.

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

#154
I’ve made a CLI tool that does something similar, called Copcon:

https://github.com/kasperjunge/copcon

Point it at a code project directory to get a file tree and content, optionally with a git diff, copied to the clipboard - ready for copy pasting into ChatGPT.

It is very true that this only works for small projects, as you will bloat the LLM’s context with large codebases.

My solution to this is two files you can use to steer the tool’s behavior:

- .copconignore: For ignoring specific files and directories.

- .copcontarget: For targeting specific files and directories (applied before .copconignore).

These two files provide great control over what to include and exclude in the copied context.

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

#155
post #40

Wouldn'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…

This doesn't sound good to me, you end up with a large codebase that no human has actually laid eyes on. When you get a bug weird enough that you can't reason the LLM through it, then what? What if a bug is because of interactions between two systems, and you don't own one of them? What if there's an issue due to convoluted business process failures, that just end in a bug report like "my data is missing!"? I honestl…

An llm itself is a large codebase that no human has laid eyes on, instead you validate it through testing.

Regarding testing, I’ve had an interaction with windsurf where I told it there was a bug in the application it generated. It replied “I’ve added some log statements, can you run it and tell me what you see, then I’ll know what to fix”… The llm was instructing me…

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

#156

Earlier quoted context omitted.

I thought of using Rust, but ultimately chose Go. I'll take a look and see how something similar came out in Rust!

Something I didn't dig to find, but is it possible for these applications to also respect .gitignores? Might be a handy flag!

In any node project that basically _must_ be done or your source code will be eclipsed by whatever is in node_modules

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

#157
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…

>Can it refactor a simple function?

Certainly, I do that several times a day.

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

#158
post #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: fixe…

I copied the UX to my https://gitpodcast.com (creates podcast on a github repo, same replace `hub` with `podcast`)

i am very impressed by gitpodcast, i just listened to one podcast and first of all i am pleased with the idea, the voices are also pleasant to listen to. thanks for sharing!

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

#159
post #123

Earlier quoted context omitted.

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…

>Can it refactor a simple function? Certainly, I do that several times a day.

Listen, I don't want to brag too much, but it even made me a function today.
Post reply on HN