forkctl
Reusable, mise-provisioned maintenance for downstream forks carried as StGit patch stacks.
The repository publishes:
forkctl— a self-contained Rust binary that validates fork policy and delegates patch operations tostg;tasks/fork.toml— remote mise tasks exposingfork:init,fork:verify, andfork:rebasewith every tool dependency declared.
Consumer setup
A fork keeps one manifest and its exported patches, then pins this task catalog:
= "2026.7.7"
[]
= true
= true
[]
= "patches/embedding/fork.json"
[]
= [
"git::https://github.com/victor-software-house/forkctl.git//tasks/fork.toml?ref=<immutable-ref>",
"mise-tasks",
]
task_config.includes replaces mise's default task directories, so list local mise-tasks explicitly when the repository has unrelated local tasks.
Then use:
Mise installs the pinned forkctl, Rust, and cargo:stgit tools in its isolated store before running a task. No global Cargo or Homebrew installation is required.
For direct use outside mise, install the CLI from crates.io and provide git and stg on PATH:
Development
The gate runs rustfmt check, Clippy across all targets/features with warnings denied, and all tests. Lefthook runs formatting and lint checks before commits and tests before pushes; hooks skip in CI.
Manifest
Patches with export are source patches and must precede tooling-only patches. The last exported patch defines the source tree reconstructed by verification. The final patch is refreshed after a successful rebase.
StGit template
forkctl embeds a pinned patchexport.tmpl matching StGit's stable mail-style export. StGit templates can interpolate patch descriptions, authors, dates, and diffstats; base commit SHAs remain explicit manifest state updated by fork:rebase.