Local Web App and UI Emulation for Google Apps Script with gas-fakes

gas-fakes server enables local development and testing of GAS webapps and Add-ons on Node with support for templating and server side calls

Bruce Mcpherson has updated his gas-fakes command-line tool, adding a local web server command to emulate Google Apps Script Web Apps and user interfaces:

At the heart of this update is the new gas-fakes serve command. This command spins up a local HTTP endpoint that routes requests directly to your doGet or doPost and other server side functions. This emulates the Apps Script environment, enabling a “save and refresh” workflow that was previously impossible without constant cloud deployments.

For those tracking the project, this update joins a deep archive of local execution experiments. We first examined the library’s foundational role as a secure sandbox for running AI-generated code [September 2025]. Since then, we have explored how to containerise Apps Script logic for Google Cloud Run [February 2026] and how to implement securing local execution via agentic automation [April 2026]. This latest release targets local web development. It eliminates the constant friction of saving, pushing and redeploying code to the cloud just to test minor visual tweaks.

How the Local Emulator Operates

The local emulator runs a lightweight Node.js process to mimic the Google Apps Script environment directly on your machine. When you run the server, the utility instantly parses your HTML templates and directs client-side google.script.run calls straight to local JavaScript function exports. This workflow lets you debug your interface and server logic in real time with zero latency, saving hours of deployment downtime.

Sandbox and Security Considerations

One thing to keep in mind is that your local machine does not enforce Google’s strict iframe security restrictions. Developing with this in mind will prevent broken features if your project is deployed to Google Apps Script. To find out more and view the complete setup code, read Bruce Mcpherson’s complete guide.

Source: Local Apps Script Webapp and UI Emulation with gas-fakes – Desktop liberation

 

Leave a Reply

Your email address will not be published. Required fields are marked *