Installing Sideffect adds the core library and its required peer dependency, Effect. Effect provides the schema primitives (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/eersnington/sideffect/llms.txt
Use this file to discover all available pages before exploring further.
Schema.Struct, Schema.String, and friends) that back Sideffect’s typed step payloads and results. If you are using the Vite-based setup — the recommended path — you will also install @cloudflare/vite-plugin so the workflow auto-discovery plugin has something to wrap. The @cloudflare/workers-types package is optional but strongly recommended for full env type coverage inside step run functions.
Sideffect requires Node.js >= 22.12.0. Make sure your local environment and any CI runners meet this requirement before installing.
If you are using the Vite adapter for automatic workflow discovery, add the Cloudflare Vite plugin. It is an optional peer dependency — skip this step if you are using plain Wrangler.
Sideffect step
run functions access Cloudflare bindings through ctx.env, which is typed from your project’s Cloudflare.Env. Add @cloudflare/workers-types to your dev dependencies and reference it in tsconfig.json:{
"compilerOptions": {
"target": "ESNext",
"module": "ESNext",
"moduleResolution": "Bundler",
"strict": true,
"types": ["@cloudflare/workers-types"]
}
}
Alternatively, generate precise types for your specific Worker with
wrangler types or augment the global Cloudflare.Env interface in src/env.d.ts.Wrap the
cloudflare plugin with withCloudflareWorkflows in your vite.config.ts. This tells Sideffect to scan your workflow directories and generate bindings automatically at dev and build time.import { cloudflare } from "@cloudflare/vite-plugin";
import { defineConfig } from "vite";
import { withCloudflareWorkflows } from "sideffect/vite";
export default defineConfig({
plugins: [
...withCloudflareWorkflows(cloudflare, {
workflowPaths: ["src/workflows"],
}),
],
});
See the Vite Integration guide for the full list of
withCloudflareWorkflows options, including how to merge additional Wrangler config such as Durable Object bindings.