forkr.sh: Cloudflare Pages site and installer endpoint.4kr-*archives: CLI release artifacts on GitHub Releases and optionally Cloudflare R2.
Cloudflare site
Deploy:wrangler login. CI deploys use the GitHub secrets listed below.
The site worker (ts/apps/forker-sh/_worker.js) inspects each request to /. When the request looks like a CLI fetcher (the User-Agent matches curl, wget, fetch, or httpie, or the Accept header is non-HTML), it serves ts/apps/forker-sh/install.sh. Browsers get index.html. So both forms install the CLI:
.github/workflows/deploy-site.yml.
Required GitHub secrets:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
CLOUDFLARE_PAGES_PROJECT(defaults toforkr-sh)
CLI artifacts
Build one or more targets:dist/cli/:
x86_64-unknown-linux-gnuaarch64-unknown-linux-gnux86_64-apple-darwinaarch64-apple-darwin
cargo-zigbuild. macOS artifacts are built on matching macOS GitHub runners.
The API can serve CLI archives for 4kr upgrade from FORKR_CLI_RELEASES_DIR, defaulting to /var/lib/forks/releases/cli. Expected layout:
scripts/release/build-cli.sh also writes dist/cli/releases/<version>/.
API endpoints:
GET /v1/cli/releasesGET /v1/cli/releases/latest/<target>/archiveGET /v1/cli/releases/<version>/<target>/archiveGET /v1/cli/releases/latest/<target>/checksumGET /v1/cli/releases/<version>/<target>/checksum
GitHub Releases
Upload local artifacts:.github/workflows/release-cli.yml.
Tag pushes (v*) build and publish release assets automatically.
Cloudflare R2
Upload local artifacts:CLOUDFLARE_ACCOUNT_IDCLOUDFLARE_R2_ACCESS_KEY_IDCLOUDFLARE_R2_SECRET_ACCESS_KEYFORKR_R2_BUCKET
r2_prefix.