build-fix parses your TypeScript or JavaScript build log and surgically patches source files to fix the errors. Zero config, zero dependencies.
GitHub
nometria/build-fix-agents
PyPI
build-fix on PyPI
Install
Usage
What it fixes
| Error type | Example |
|---|---|
| Missing type annotations | Parameter 'x' implicitly has an 'any' type |
| Undefined variables | Cannot find name 'foo' |
| Wrong import paths | Cannot find module './utils' |
| Type mismatches | Type 'string' is not assignable to type 'number' |
| Missing return types | Function lacks ending return statement |
| Unused variables (strict mode) | 'x' is declared but its value is never read |
| Property does not exist | Property 'foo' does not exist on type 'Bar' |
How it works
- Parse — reads the build log and extracts error locations (file, line, message)
- Read context — loads the relevant source file sections
- Patch — LLM generates the minimal fix for each error
- Verify — re-runs
npm run buildto confirm errors are resolved - Repeat — iterates up to
--max-passestimes until the build is clean
Requirements
OPENAI_API_KEYorANTHROPIC_API_KEYset in environment- Node.js project with a
buildscript inpackage.json