Install
Run PatchFlow from source, create a configuration, and verify the CLI.
Requirements
- Node.js 22.13 or newer
- A GitHub repository with tests or GitHub Checks
- A Cursor API key for cloud migration agents
- GitHub access for PatchFlow: the PatchFlow GitHub App, or a token for local use
- GitHub access for Cursor: its own integration, connected to the same repository
Two GitHub connections, not one
PatchFlow and Cursor reach your repository separately, and granting one does not grant the other. PatchFlow reads pull requests and checks and writes labels and comments. The migration itself runs on Cursor's infrastructure, so Cursor's own GitHub integration is what clones the repository, commits, pushes the branch, and opens the pull request.
If Cursor is not connected to the repository, a run fails at agent start with "The SCM integration does not have access to repository". Connect it in the Cursor dashboard under Integrations.
PatchFlow's repository scoping governs what PatchFlow does. It does not constrain Cursor's integration, which is granted separately and may be broader. Review what you grant Cursor as its own decision, and note that repository contents are processed by Cursor when an agent runs.
Install dependencies
npm install
cp .env.example .env
npm run patchflow -- --helpCreate the first configuration
The command writes patchflow.config.json without overwriting an existing file. Use --force only when you intend to replace it.
npm run patchflow -- init \
--repo https://github.com/acme/checkout \
--package stripeCredentials
CURSOR_API_KEY=cursor_...
GITHUB_TOKEN=github_pat_...PatchFlow never embeds the GitHub token in a clone URL. Private clones use a temporary askpass helper that is removed with the test workspace.