pch and the MCP server do what git can’t: search, remix, who can see it, change requests and releases.
Who can see it
- A new repo is open once its first push has been read for secrets, usually within a few minutes. Until then it’s
closed_source. Make itprivateorclosed_sourcebefore that push if you don’t want it public (pch set,update_repo). - A repo made in a Patch Desktop chat starts private. It opens only when you press publish and don’t choose keep code closed.
- Open is for good. Everyone can read every commit, with each author’s name and email.
pch newcommits as<username>@users.noreply.patch.gg, so your own email stays out. - Visibility is separate from the release channel. A private release of an open repo is a game only your team can find, but its code is public.
Secrets
An open repo’s new commits are read for secrets just after they land. If one holds a key, the repo closes toclosed_source and everyone in its org hears, with the file and line. Revoke the key first: it was public. Deleting it in a new commit leaves it in the history, so history_scan_status gives the steps to rewrite it out. The repo opens again once a scan of its whole history is clean.
Before opening a repo that was private, pch scan start (start_history_scan) reads its whole history and says what going open would publish.
Git
pch new <owner/slug> makes a repo with a README, licence, .gitignore and big-file rules, and pushes its first commit. Anyone can clone an open repo without signing in. Without pch, git takes any user name and an API key with the publish scope as its password, from a credential helper.
A push is refused only for the refs it moves, never for what’s in it:
A release from a repo records the commit it came from:
pch publish tags it and pushes the tag.
Remix
A remix builds on something on Patch: all of a game, one mechanic from a mod, or a block.pch remix <owner/slug> (fork_repo) makes a project of yours that starts where it is, with its history, and records where it came from. Keep its licence, and credit it in the recipe’s credits and a CREDITS.md. A closed-source repo can’t be remixed.
A remix starts open when the original is. Pass --visibility private to keep it private.
A remix is quiet until it has a public release: search, the original’s remix count and other people’s list of its remixes leave it out. It’s still at its own address, which the change requests it sends link to, and its first public release makes it show like any other project. You always see your own among the original’s remixes (GET /projects/{owner}/{slug}/repo/forks, where they say yours).
Deleting a remix
Delete a project that’s still scratch on its page, signed in (on a game’s page, from its pill once you pressedit): one that’s never had a release published (one taken back since still counts), with no change request open from it or into it, and that nobody has remixed. That removes its page, its repo and its address, and its releases that never went out, such as drafts, with their checks and tests. Change requests it sent keep what they changed, since their commits were copied into the repo they went to as each one opened; they just don’t say where they came from any more. It can’t be undone, so API keys and agents can’t do it: DELETE /projects/{owner}/{slug} answers them session_required.
Change requests
A change request asks a repo’s org to merge a branch, once they’ve read it (get_change_request, change_request_diff) and talked on it. It comes from one of two places:
- A branch of the repo itself, for its org, so a change gets a look before it lands: push a branch, then
pch cr open <owner/slug>in your clone (open_change_requestwith nofrom). It works whatever the repo’s visibility, and whether or not it takes requests from remixes. Anyone in the org can merge it. You can withdraw it, and the rest of the org can decline it. - A remix’s branch, offered back to the repo it came from: remix it, clone your copy, push a branch, then
pch cr open(open_change_request). The original’s org merges or declines it, and you can withdraw it. Only open repos take these, unless their org turns them off, and the remix has to be open too. Its commits are read for secrets before they’re copied in.
A game’s brief
ABRIEF.md at the top of a repo, with pictures in brief/, holds the idea for the game, what it’s going for and your rules, so you don’t repeat them to every new agent session. pch agent brief starts one. Agents read it first and follow it, but what you say now wins. It’s as public as the rest of an open repo, and pch publish leaves it out of releases.
Repos on GitHub
A project’s home can be a GitHub repo instead. Patch then keeps none of its files: you clone from and push to GitHub as you always do, and Patch shows the project, publishes its releases and lets agents work on it. Connect one withpch connect in a clone of it, or connect_repo with owner/name. You need:
- admin or maintain on the repo on GitHub. With only write access, fork it on GitHub and connect your fork
- Patch’s GitHub App installed on the repo’s account, with the repo among those it can reach. If something’s missing, the answer is
needs_person, with what to do
LICENSE, and Patch picks up a change within an hour.
Working on it:
- Pushes go to GitHub with your own git login. A push updates the project’s card on Patch and never releases anything.
open_pull_requestopens a pull request as you, andget_pull_requestsays how it stands.merge_pull_requestmerges it, only when you’ve said so.- A release names a GitHub commit:
pch publishpushes a tag to GitHub and sends the commit. Patch keeps its own copy of that source, so a moved tag can’t change a release.
DELETE /projects/{owner}/{slug}/repo/github.