Live data from Hacker News

Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

news.ycombinator.com

51–60 of 248 posts

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#51

What if you have a microservice system with a repo-per-service setup, where to add functionality to a FE site you would have to edit code in three or four specific repos (FE site repo + backend service repo + API-client npm package repo + API gateway repo) out of hundreds of total repos?

This does seem to be suited to monorepo.

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#52
post #24

The demos I see for these types of tools are always some toy project and doesn't reflect day to day work I do at all. Do you have any example PRs on larger more complex projects that have been written with codebuff and how much of that was human interactive? The real problem I want someone to solve is helping me with the real niche/challenging portion of a PR, ex: new tiptap extension that can do notebook code eval,…

Great question – we struggled for a long time to put our demo together precisely for this reason. Codebuff is so useful in a practical setting, but we can't bore the audience with a ton of background on a codebase when we do demos, so we have to pick a toy project. Maybe in the future, we could start our demo with a half-built project?

Hopefully the demo on our homepage shows a little bit more of your day-to-day workflows than other codegen tools show, but we're all ears on ways to improve this!

To give a concrete example of usefulness, I was implementing a referrals feature in Drizzle a few weeks ago, and Codebuff was able to build out the cli app, frontend, backend, and set up db schema (under my supervision, of course!) because of its deep understanding of our codebase. Building the feature properly requires knowing how our systems intersect with one another and the right abstraction at each point. I was able to bounce back and forth with it to build this out. It felt akin to working with a great junior engineer, tbh!

EDIT: another user shared their use cases here! https://news.ycombinator.com/item?id=42079914

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#53
post #36
post #24

The demos I see for these types of tools are always some toy project and doesn't reflect day to day work I do at all. Do you have any example PRs on larger more complex projects that have been written with codebuff and how much of that was human interactive? The real problem I want someone to solve is helping me with the real niche/challenging portion of a PR, ex: new tiptap extension that can do notebook code eval,…

+1; Ideally I want a tool I don't have to specify the context for. If I can point it via config files at my medium-sized codebase once (~2000 py files; 300k LOC according to `cloc`) then it starts to get actually usable. Cursor Composer doesn't handle that and seems geared towards a small handful of handpicked files. Would codebuff be able to handle a proper sized codebase? Or do the models fundamentally not handle t…

Yes. Natively, the models are limited to 200k tokens which is on the order of dozens of files, which is way too small.

But Codebuff has a whole preliminary step where it searches your codebase to find relevant files to your query, and only those get added to the coding agent's context.

That's why I think it should work up to medium-large codebases. If the codebase is too large, then our file-finding step will also start to fail.

I would give it a shot on your codebase. I think it should work.

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#54
post #24

The demos I see for these types of tools are always some toy project and doesn't reflect day to day work I do at all. Do you have any example PRs on larger more complex projects that have been written with codebuff and how much of that was human interactive? The real problem I want someone to solve is helping me with the real niche/challenging portion of a PR, ex: new tiptap extension that can do notebook code eval,…

Kind of like "please describe the solution and I will write code to do it". That's not how programming works. Writing code and testing it against expectations to get to the solution, that's programming.

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#55

What if you have a microservice system with a repo-per-service setup, where to add functionality to a FE site you would have to edit code in three or four specific repos (FE site repo + backend service repo + API-client npm package repo + API gateway repo) out of hundreds of total repos?

This does seem to be suited to monorepo.

Yes, unfortunately, Codebuff will only read files within one directory (and sub-directories).

If you have multiple repos, you could create a directory that contains them all, and that should work pretty well!

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#56
post #47

Earlier quoted context omitted.

> it won't do that. Claude is trained to be careful about this stuff and we've further prompted it to be careful. Could you please explain a bit how you are sure about it?

It's mainly from experience. From when I set it up I didn't have the feature to ask whether to run commands. It has been rawdogging commands this whole time and has never been a problem for me. I think we have many other users who are similar. To be fair, sometimes after watching it install packages with npm, people are surprised and say that they would have preferred that it asked. But usually this is just the initi…

Do you have any sandbox-like restrictions in place to ensure that commands are limited to only touching the project folder not any other places in the system?

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#57

What if you have a microservice system with a repo-per-service setup, where to add functionality to a FE site you would have to edit code in three or four specific repos (FE site repo + backend service repo + API-client npm package repo + API gateway repo) out of hundreds of total repos?

Codebuff works on a local directory level, so it technically doesn't have to be a monorepo (though full disclaimer: our codebase is a monorepo and that's where we use it most). Most important thing is to make sure you have the projects in the same root directory so you can access them together. I've used it in a setup with two different repos in the same folder. That said, it might warn you that there's not .git folder at the root level when this happens.

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#58
post #53
post #36

Earlier quoted context omitted.

+1; Ideally I want a tool I don't have to specify the context for. If I can point it via config files at my medium-sized codebase once (~2000 py files; 300k LOC according to `cloc`) then it starts to get actually usable. Cursor Composer doesn't handle that and seems geared towards a small handful of handpicked files. Would codebuff be able to handle a proper sized codebase? Or do the models fundamentally not handle t…

Yes. Natively, the models are limited to 200k tokens which is on the order of dozens of files, which is way too small. But Codebuff has a whole preliminary step where it searches your codebase to find relevant files to your query, and only those get added to the coding agent's context. That's why I think it should work up to medium-large codebases. If the codebase is too large, then our file-finding step will also st…

RAG is a well-known technique now, and to paraphrase Emily Bender[1], here are some reasons why it's not a solution.

The code extruded from the LLM is still synthetic code, and likely to contain errors both in the form of extra tokens motivated by the pre-training data for the LLM rather than the input texts AND in the form of omission. It's difficult to detect when the summary you are relying on is actually missing critical information.

Even if the set up includes the links to the retrieved documents, the presence of the generated code discourages users from actually drilling down and reading them.

This is still a framing that says: Your question has an answer, and the computer can give it to you.

1 https://buttondown.com/maiht3k/archive/information-literacy-...

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#59
post #49

Quality of code wise, is it worse or better than Cursor? I pay for Cursor now and it saves me a LOT of time to not copy files around. I actually still use the chatGPT/claude interfaces to code as well.

Cool, it's probably about the same, since we're both using the new Sonnet 3.5 for coding. We might have a bit of an advantage because we pull more files as context so the edit can be more in the style of your existing code. One downside to use pulling more context is we burn more tokens. That's partly why we have to charge $99 whereas cursor is $20 per month.

It might sound small, but pulling in more context can make a huge difference – I remember one time Cursor completely hallucinated Prisma as part of our tech stack and created a whole new schema for us, whereas Codebuff knew we were already hooked up to Drizzle and just modified our existing schema. But like James said, we do use more tokens to do this, so pros & cons.

Re: Launch HN: Codebuff (YC F24) – CLI tool that writes code for you

#60
post #53

Earlier quoted context omitted.

Yes. Natively, the models are limited to 200k tokens which is on the order of dozens of files, which is way too small. But Codebuff has a whole preliminary step where it searches your codebase to find relevant files to your query, and only those get added to the coding agent's context. That's why I think it should work up to medium-large codebases. If the codebase is too large, then our file-finding step will also st…

RAG is a well-known technique now, and to paraphrase Emily Bender[1], here are some reasons why it's not a solution. The code extruded from the LLM is still synthetic code, and likely to contain errors both in the form of extra tokens motivated by the pre-training data for the LLM rather than the input texts AND in the form of omission. It's difficult to detect when the summary you are relying on is actually missing…

We actually don't use RAG! It's not that good as you say.

We build a description of the codebase including the file tree and parsed function names and class names, and then just ask Haiku which files are relevant!

This works much better and doesn't require slowly creating an index. You can just run Codebuff in any directory and it works.

Post reply on HN