A tiny CLI that prepares a JBake site for deployment to Cloudflare Workers using Cloudflare's Git integration (Workers Builds) — no GitHub Actions required.
flarebake adds exactly the files a JBake project needs:
wrangler.toml— an assets-only Worker whose[build]command bakes the site.build.sh— downloads a private Temurin JRE and JBake, then bakes./output..gitignore— entries for the generatedoutput/,.tools/and.wrangler/.
- Java 27+ (to build; the produced jar runs on Java 27+)
Maven itself is not required: the project ships a Maven Wrapper (./mvnw on
Unix, mvnw.cmd on Windows).
./mvnw clean packageOn Windows:
mvnw.cmd clean packageThe uber jar is written to target/flarebake.jar.
# Scaffold the current directory
java -jar target/flarebake.jar init
# Scaffold another project and set the Worker name explicitly
java -jar target/flarebake.jar init ~/Projects/my-site --name my-site
# Overwrite existing wrangler.toml / build.sh
java -jar target/flarebake.jar init --forceOptions:
| Option | Description |
|---|---|
-n, --name <name> |
Cloudflare Worker name (default: derived from the directory name). |
-f, --force |
Overwrite existing wrangler.toml and build.sh. |
--jbake-version <v> |
JBake version used by build.sh (default 2.7.0). |
--java-version <v> |
Temurin JRE major version used by build.sh (default 21). |
--compatibility-date <d> |
Cloudflare compatibility_date (default: today). |
- Commit the generated files and push.
- In the Cloudflare dashboard: Workers & Pages → Create → Workers → Connect to Git.
- Set the Deploy command to
npx wrangler deployand leave the build command empty (Wrangler runsbuild.shitself via the[build]block).
The Release workflow builds and tests the project with JDK 27 and publishes
the uber jar as a GitHub Release when a version tag is pushed:
git tag v0.1.0
git push origin v0.1.0The release then contains flarebake-<version>.jar. The workflow can also be
started manually from the Actions tab, which builds and uploads the jar as a
workflow artifact without creating a release.