In the last couple of days, I’ve spent some hours playing with Patchwork. Patchwork is an open-source framework that leverages AI to accelerate asynchronous development tasks like code reviews, linting, patching, and documentation. It is a Y Combinator backed company.
The GitHub repository for Patchwork can be found here: https://github.com/patched-codes/patchwork.
Patchwork offers two ways to use it. One is through their open-source CLI that utilizes LLMs like OpenAI to perform tasks. You can install the CLI using the following command:
pip install 'patchwork-cli[all]' --upgrade
The other option is to use their cloud offering at https://app.patched.codes/signin. There, you can either leverage predefined workflows or create your own using a visual editor.
This post focuses on my experience with their CLI tool, as I haven’t used their cloud offering yet.
Patchwork comes bundled with six patchflows:
- GenerateDocstring: Generates docstrings for methods in your code.
- AutoFix: Generates and applies fixes to code vulnerabilities within a repository.
- PRReview: Upon PR creation, extracts code diffs, summarizes changes, and comments on the PR.
- GenerateREADME: Creates a README markdown file for a given folder to add documentation to your repository.
- DependencyUpgrade: Updates your dependencies from vulnerable versions to fixed ones.
- ResolveIssue: Identifies the files in your repository that need updates to resolve an issue (or bug) and creates a PR to fix it.
A patchflow is composed of multiple steps. These steps are python code.
To understand how Patchwork works, we’ll explore a couple of predefined Patchflows.
Continue reading “A look at Patchwork: YC backed LLM Startup”