docs/pr-edit-watcher.md
Flow supports editing GitHub PR title/body from local Markdown files stored in ~/.flow/pr-edit/.
There are two modes:
f pr open editf serverWhen f server is running, it starts a lightweight watcher that:
~/.flow/pr-edit/ (non-recursive)~/.flow/pr-edit/status.jsonEndpoints:
GET /pr-edit/statusPOST /pr-edit/rescanDefault server URL: http://127.0.0.1:9060
Example:
curl -s http://127.0.0.1:9060/pr-edit/status
Each file must map to a PR. The preferred mapping is YAML frontmatter:
---
repo: owner/repo
pr: 123
---
# Title
My PR title
# Description
Body goes here.
If the frontmatter is missing, Flow may fall back to ~/.flow/pr-edit/.index.json (managed by
f pr open edit).
# Title# Description (verbatim)f pr open edit:
~/.flow/pr-edit/<project>-<pr>.md if missing~/.flow/pr-edit/status.json is written by the always-on watcher and can be used to build a UI.
States:
unknown: file exists but no PR mappingsyncing: change detected and being pushedclean: last sync succeeded, content matches last pushed digesterror: last sync failed (see last_error)The watcher uses gh auth token once and caches the token in memory. If syncing fails with auth
errors, run:
gh auth status
gh auth login
Start the server in foreground with debug prints for the PR watcher:
FLOW_PR_EDIT_DEBUG=1 f server foreground
If the watcher failed to start, GET /pr-edit/status returns HTTP 503 with a detail field.