(:Project)

pr-split

pr-split decomposes a large pull request into a DAG of small, reviewable pull requests.

Built by
me
Since
February 2026
Language
Python
Licence
MIT

GitHub

Why I built it

Coding with AI assistants produces pull requests that nobody wants to review. A 2,000 line change across dozens of files gets skimmed, approved without reading or ignored. pr-split turns that change into focused pull requests, each with a clear purpose and explicit dependencies.

How it works

pr-split takes a local branch, a pull request number or a user:branch reference and produces a split plan, a set of smaller pull requests arranged in a dependency DAG. Each one gets its own branch, commit and GitHub pull request that targets the correct base.

Three backends can partition the diff. llm sends it to a language model, graph is deterministic and needs no model, and cp_sat solves the partition as a constraint model. The --min-loc and --max-loc flags bound the size of each pull request, and --stack registers dependent chains as native GitHub stacks.

Install

uv tool install "git+https://github.com/vitali87/pr-split"

Preview a plan without creating anything.

pr-split split feature-branch --base main --dry-run

pr-split needs Python 3.12 or newer and an authenticated GitHub CLI.

Questions people ask

Who created pr-split?

I did, in February 2026.

Does pr-split need an LLM API key?

No. Without a key and without a chosen strategy, it uses its graph backend, which needs no model. The llm backend needs an Anthropic or OpenAI key, or a local model.