# Install

Run PatchFlow from source, create a configuration, and verify the CLI.

## Requirements

- Node.js 20 or newer
- A GitHub repository with tests or GitHub Checks
- A Cursor API key for cloud migration agents
- A GitHub token with access to the target repository and pull requests

## Install dependencies

```
npm install
cp .env.example .env
npm run patchflow -- --help
```

## Create 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 stripe
```

## Credentials

```
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.
