Miniflare is a fully-local simulator for Cloudflare Workers that enables developers to build and test Workers without requiring an internet connection. It provides an alternative to wrangler dev and is written in TypeScript, running workers in a sandbox that implements the Workers runtime APIs. The project is hosted at legacy.miniflare.dev and serves as a development environment with detailed logging, file watching, and pretty error pages that support source maps.
The repository implements a comprehensive set of Cloudflare Workers features. These include support for Fetch Events with both HTTP and HTTPS servers as well as manual dispatch capabilities, Scheduled Events with cron triggering and manual dispatch, and Variables and Secrets management through .env files. The simulator handles Modules support, KV storage with optional persistence, R2 object storage with optional persistence, Cache functionality with optional persistence, and Durable Objects with optional persistence. Additional features encompass Workers Sites, WebSockets, custom and Wrangler builds support, WebAssembly support, source map support, and web standards implementations including Base64, Timers, Fetch, Encoding, URL, Streams, and Crypto APIs. The tool also includes HTMLRewriter functionality, live reload on file changes, compatibility dates and flags support, multiple workers support, and a custom Jest environment with isolated per-test storage.
It is important to note that this repository contains Miniflare 2, which is now deprecated as of the release of Miniflare v3 in 2023. The README explicitly warns that Miniflare 2 simulated the Workers runtime using Node.js, whereas newer versions found in the workers-sdk repository use the open-sourced workerd runtime, which practically eliminates behavior mismatches between development and production deployments. According to the repository documentation, nearly 90 percent of Miniflare installations are now of version 3, and no new features or bug fixes are being published for version 2. Users are strongly encouraged to upgrade to the latest version and a migration guide is provided to facilitate this process.
The project shows active maintenance patterns reflected in its issue and pull request handling. GitGenius tracking data indicates a median response latency of 0.0 hours across 23 tracked items, though the mean response latency is 3027.0 hours, suggesting occasional longer-term discussions. The most active issue labels include awaiting dev response, documentation, and needs reproduction. Key contributors tracked by GitGenius include petebacondarwin with 14 events, penalosa with 10 events, and emily-shen with 6 events. The repository shares overlapping contributors with ionic-team/ionic-framework, nuxt/nuxt, and cloudflare/workers-sdk, indicating cross-project collaboration within the Cloudflare ecosystem.
Miniflare was originally created by Brendan Coll and drew inspiration from earlier projects including dollarshaveclub/cloudworker and gja/cloudflare-worker-local. The implementation of Durable Objects transactions uses Optimistic Concurrency Control as described in academic literature on database concurrency control methods.