Firenook and the Cost of Starting a Local Firebase Stack
A local emulator should make a development loop shorter. In practice, starting several services, importing a useful dataset, waiting for functions to load, and restoring that dataset after a restart can become the slowest part of a test. Firenook is an attempt to shorten that loop while preserving the connection points a Firebase application already uses.
The project replaces the emulator commands, rather than the Firebase client SDKs or deployment tools. It reads firebase.json and .firebaserc, listens on the familiar service ports, accepts the same emulator host settings, and supports the official import and export format. Its central proposition is that a native implementation can start quickly and keep local data between runs. That is useful, but the word replacement deserves careful reading: each service and each application’s behavior still needs a compatibility check.
What changes in a project
A project can install firenook as a development dependency and change its emulator script from firebase emulators:start to firenook emulators:start. The application still calls connectFirestoreEmulator or sets FIRESTORE_EMULATOR_HOST; its normal SDKs continue to speak to local endpoints. The Firebase CLI remains necessary for deployment and other non-emulator commands.
Firenook currently covers Firestore, Authentication, Cloud Storage, Cloud Functions, Pub/Sub, Cloud Tasks, Eventarc, and Extensions. It says it implements the corresponding service protocols and integrations, including Security Rules, listeners, triggers, and the official export format. Realtime Database, Hosting, App Hosting, and Data Connect are outside its emulator coverage. A configuration naming those services can start with a warning, which is quite different from having tested them.
This arrangement matters for teams with many integration tests. A test written against the SDK need not know which emulator executable owns port 8080. But successful connection is only the first layer of compatibility. Query results, rules decisions, transaction behavior, trigger delivery, and edge cases must match what the application expects.
Persistent state changes the restart loop
The official Firebase suite can export emulator data and import it on the next start. That is a portable way to share fixtures, but exporting on shutdown and importing on startup takes work proportional to the dataset. Firenook adds --keep-data, which stores Firestore, Auth, and Storage state locally so a restart can reopen it directly. It also retains import and export for moving data between tools.
These mechanisms serve different purposes. Persistent state is convenient for a developer resuming work after a restart. A committed or shared export is better for a known starting fixture. Tests that depend on a clean baseline should explicitly reset or reimport it; persistence can otherwise make a passing test depend on yesterday’s data. Firenook says a clean stop closes its data fully, while a crash could lose up to the last second of writes. That is a sensible tradeoff for development data, and one to remember when debugging a sudden shutdown.
What the speed figures actually say
Firenook reports a benchmark of two hours of traffic from a production application replayed against each emulator. The application had 211,205 Firestore documents and 6.7 GB in Storage; both suites ran on one server, with timings taken at the client. In that workload, the reported median write fell from 208.2 ms to 5.1 ms, peak memory from 22.57 GiB to 2.11 GiB, and restart with retained data from 30.8 seconds to 0.59 seconds. It also reports a median listener update of 209 ms versus 11 ms and lower CPU time across the run. The benchmark page provides the method and results.
Those are project measurements, not a universal speed guarantee. The workload’s query shapes, event volume, fixture size, machine, and configuration determine how much of the difference another team will see. In particular, a comparison of emulator resource use should not be read as a comparison of the production Firebase services. The interesting engineering result is that startup and data restoration can be a large share of local feedback time, and Firenook has targeted both.
The project’s own demo has over 1.2 million Firestore documents, 64,000 users, and 5,400 objects. It shows a restart that retains those records, then runs test operations and displays a failed webhook with a stack trace. The demo illustrates the intended workflow; the larger benchmark is the basis for the headline ratios.
The wider development loop
firenook emulators:exec starts the suite, runs a test command once services are ready, shuts down, and returns the test command’s exit code. That makes it suitable for CI jobs where a local stack is needed for one test run. A built-in console displays service state, documents, users, files, and function calls, including trigger, duration, logs, and errors. It extends the visibility of the usual emulator UI to services such as Pub/Sub and task queues.
The project also exposes an MCP server with tools for inspecting and modifying the running local environment. A coding agent can examine a failed function call, inspect the relevant data, or ask why a Security Rule denied an operation. This is a local debugging capability; it does not make a production incident safe to reproduce without suitable test data. The usefulness comes from giving the agent a bounded view of an emulator that can be reset.
How to decide whether to switch
Start with one representative integration test, not the smallest hello-world example. Run it against the official suite and Firenook using the same fixture. Check rules, named databases, listeners, function triggers, Storage metadata, and any service-specific feature the application relies on. Compare the resulting data as well as the test’s pass status. Then measure startup, test duration, and memory on your own machine or CI runner.
This matters because emulators have limits even when maintained by the service provider. Google’s Firestore emulator documentation notes differences from production around indexes, some transaction behavior, and limits. A second emulator implementation adds another compatibility boundary. Keep a path to run important tests against the official suite, and validate production-sensitive behavior in an appropriate Firebase environment.
Firenook’s strongest idea is straightforward: local infrastructure is part of developer experience, and its time and memory costs are worth measuring. Its familiar ports and formats make an experiment relatively small. Its performance claims make that experiment interesting. The decision to adopt it should follow the behavior of the application you actually ship.