This page keeps the command-level details out of the main README.
Run from the root of a clean Git worktree:
procoder prepareWhat it does:
- validates that the repo is clean
- rejects untracked files, submodules, and Git LFS usage
- creates a local task branch at
refs/heads/procoder/<exchange-id>/task - writes the local exchange record to:
.git/procoder/exchanges/<exchange-id>/exchange.json - builds a sanitized export repo with local heads and tags for context
- injects the
procoder-returnhelper at the exported repo root - writes
./procoder-task-<exchange-id>.zipat the source repo root
Notes:
- the current checkout is left unchanged
- on success, the command prints the task branch ref and the absolute task package path
Run inside the prepared task package after ChatGPT has committed its work:
./procoder-returnWhat it does:
- verifies that it is running inside a prepared task package
- rejects dirty worktrees
- rejects tag changes
- rejects branch changes outside
refs/heads/procoder/<exchange-id>/* - verifies that returned refs descend from the prepared base commit
- writes
./procoder-return-<exchange-id>.zipat the repo root
On success it prints:
- the absolute return package path
- a
sandbox:hint that can be pasted back to the local user
Return package contents:
procoder-return-<exchange-id>.zip
procoder-return.json
procoder-return.bundle
Apply a return package from the original source repo:
procoder apply procoder-return-<exchange-id>.zipSupported flags:
--dry-run: verify the return package and print the ref update plan without mutating refs--namespace <prefix>: import returned refs underrefs/heads/<prefix>/<exchange-id>/...--checkout: check out the updated default task branch after a successful apply
Examples:
procoder apply procoder-return-<exchange-id>.zip
procoder apply procoder-return-<exchange-id>.zip --dry-run
procoder apply procoder-return-<exchange-id>.zip --namespace procoder-import
procoder apply procoder-return-<exchange-id>.zip --checkoutDefault behavior is:
- update task-family refs when safe
- otherwise fail clearly
If the prepared task branch moved locally, procoder apply fails with BRANCH_MOVED and suggests retrying with --namespace.
Print the installed CLI version:
procoder --versionprocoder --help
procoder --version
procoder prepare
procoder apply <return-package.zip>
procoder apply <return-package.zip> --dry-run
procoder apply <return-package.zip> --namespace <prefix>
procoder apply <return-package.zip> --checkoutprocoder is designed to fail with clear, actionable messages.
Typical cases:
- the source repo is dirty when running
procoder prepare - ChatGPT changed refs outside the allowed task branch family before running
./procoder-return - the return package has no new commits
- the local task branch moved before
procoder apply - a destination ref already exists when using a namespace import
For the product-level rationale and internal workflow, see How It Works.