How to Script Repeatable Refactors with Codebuff in CI
Run Codebuff headless for repeatable refactors โ dependency bumps, pattern migrations โ with review gates that stop bad edits.
Open-source terminal AI coding agent for multi-file repo edits.
Codebuff is an open-source AI coding agent that lives in your terminal. You point it at a repo, describe a change, and it edits multiple files, runs tests, and iterates until the task passes or it gets stuck.
Codebuff is a command-line coding agent from the Codebuff team, distributed on GitHub under an open-source license. Unlike a chat sidebar, it can read your whole project, plan a sequence of edits, and apply them without you copying code back and forth. It supports Node and Python projects out of the box and works with any model you plug in.
The approval step is the part worth noting. Codebuff prints its intended edits before touching files, which matters when an agent wants to rename a function used in forty places.
Downsides are real. Larger refactors can burn through tokens quickly, and on a big monorepo it sometimes loses track of which package it is editing. Set a token budget before you start.
The client is free and open source. You either pay for your own model API usage or subscribe to a hosted plan; there is no published all-you-can-eat flat rate, so costs scale with how much the agent runs.