Bridging the Gap: Seamless Integration for Local Google Apps Script Development

Gists

Bridging the Gap: Seamless Integration for Local Google Apps Script Development

Abstract

This article explores the evolution of Google Apps Script (GAS) development, focusing on the powerful capabilities unlocked by the gas-fakes CLI. Discover how to seamlessly integrate your local development environment with GAS, enabling you to use local files, execute scripts without uploading, and build a more efficient, modern workflow.

Introduction

Google Apps Script is a versatile platform that continues to evolve. A significant leap forward in its development is the ability to work with GAS projects locally, a paradigm shift driven by Bruce McPherson’s gas-fakes. This tool, and the ecosystem it has inspired, are changing how developers approach GAS development.

Next-Level Google Apps Script Development

GitHub

Next-Level Google Apps Script Development

Abstract

This article introduces a powerful method for developing and testing Google Apps Script (GAS) locally. By leveraging the gas-fakes library, you can build a secure, local Model Context Protocol (MCP) server, enabling the creation of AI-powered tools for Google Workspace automation without deploying to the cloud.

Introduction

gas-fakes, developed by Bruce McPherson, is an innovative library that enables Google Apps Script (GAS) code to run directly in a local environment by substituting GAS classes and methods with their corresponding Google APIs.

Secure and Streamlined Google Apps Script Development with gas-fakes CLI and Gemini CLI Extension

Gists

Secure and Streamlined Google Apps Script Development with gas-fakes CLI and Gemini CLI Extension

Abstract

This document introduces a powerful integration of the gas-fakes CLI and a Gemini CLI extension, creating a secure and streamlined development workflow for Google Apps Script. This setup enables local testing of AI-generated scripts in a secure sandbox, preventing unintended access to your Google Drive, and provides a seamless transition to cloud deployment.

Introduction

The gas-fakes project by Bruce McPherson is a groundbreaking endeavor that recreates the Google Apps Script (GAS) execution environment on Node.js, enabling local testing and debugging. When Bruce invited me to join the project, I first started by understanding gas-fakes. The project enables local execution by converting GAS service calls (e.g., SpreadsheetApp.create()) into corresponding Google API requests.

Gemini CLI Extension for GAS Development Kit

I created a Gemini CLI extension as a GAS Development Kit. For this, I developed the CLI of gas-fakes.

Repository

https://github.com/tanaikech/gas-development-kit-extension

Installation

1. Install Gemini CLI

First, install the Gemini CLI using npm:

npm install -g @google/gemini-cli

Next, you will need to authorize the CLI. Follow the instructions provided in the official documentation.

2. Install Clasp

Even when Clasp is not installed, when gas-fakes is installed, you can run Google Apps Script in a sandbox using gas-fakes.

Streamlining Google Apps Script Development with Gemini CLI Extensions and VSCode

Gists

Streamlining Google Apps Script Development with Gemini CLI Extensions and VSCode

Abstract

This guide explores a powerful, next-level workflow for Google Apps Script (GAS) development by integrating Gemini CLI Extensions with Visual Studio Code (VSCode). This combination streamlines the entire development process, from script creation and local testing in a secure sandbox to deploying and managing projects, all within a unified and efficient environment.

Introduction

Visual Studio Code (VSCode) is widely recognized as a premier source code editor. The release of the Gemini CLI has dramatically transformed script development by bringing advanced AI capabilities directly into the terminal. In particular, combining Gemini CLI with VSCode creates a powerful development ecosystem, highly effective for languages typically executed locally, such as Python, Node.js, Go and so on. Beyond coding, this setup streamlines content creation, including articles and papers, by leveraging AI for drafting and editing. Ref For cloud-based Google Apps Script (GAS) development, the standard approach involves using VSCode alongside Clasp to manage projects locally. Ref Integrating Gemini CLI into this established workflow promises significant synergistic effects. A recent update has further expanded these possibilities by enabling Clasp to function experimentally as a Model Context Protocol (MCP) server, allowing LLMs to directly interact with GAS project structures. Ref Furthermore, to address security concerns when executing AI-generated GAS code, I have introduced a “fake sandbox” environment for safer testing. Ref and Ref With the recent release of Gemini CLI Extensions, which allow for custom AI tools and specialized workflows, combining these assets creates a vastly superior developer environment. In this article, I will introduce next-level Google Apps Script development by leveraging the combined power of Gemini CLI Extensions and VSCode.

A Developer's Guide to Building Gemini CLI Extensions

Gists

A Developer's Guide to Building Gemini CLI Extensions

Abstract

This guide offers a comprehensive walkthrough of the essential steps and key considerations for developing Gemini CLI extensions. It covers setting up a sample project, configuring the gemini-extension.json file, local testing, and automating dependency management with GitHub Actions, providing developers with the foundational knowledge to create their own custom tools.

Introduction

After the release of Gemini CLI Extensions, a growing community of users is developing a wide range of extensions to enhance their command-line workflows. Ref and Ref This trend is expected to continue and strengthen. As the ecosystem expands, knowing how to develop these extensions becomes increasingly valuable for users who want to create their own custom tools. Many useful articles for understanding Gemini CLI Extensions have already been published. In particular, the articles by Romin Irani are very helpful. Ref In this article, I would like to introduce the core parts I paid attention to when I developed my own extensions (Ref). I hope this article proves useful. As a sample tool in this article, the current time is returned using Node.js.

Simplified Google Workspace Automation with Gemini CLI Extensions

Gists

Simplified Google Workspace Automation with Gemini CLI Extensions

Abstract

This project simplifies Google Workspace automation by using a Gemini CLI Extension. It installs a local Model Context Protocol (MCP) server that communicates with a powerful, securely authorized backend built on Google Apps Script Web Apps, overcoming previous complex setup and performance bottlenecks.

Introduction

In order to achieve Google Workspace Automation with seamless authorization and safety, I have published a Model Context Protocol (MCP) server built by Google Apps Script Web Apps. Ref This is very useful because Google Apps Script provides native, secure authorization for Google Workspace APIs like Gmail, Drive, and Calendar. However, there was a bottleneck in the complex installation and a long loading time of the MCP server. Recently, Gemini Extensions have been released. Ref By this, tools and MCP servers can be directly and easily installed from sources like GitHub repositories using a simple command. From this situation, I attempted to implement this simplified installation method on the MCP server built by Google Apps Script Web Apps.

Recipient of the Outstanding Google Developer Expert Award

Recipient of the Outstanding Google Developer Expert Award

I am thrilled and deeply honored to be recognized with the “First place in the Outstanding GDE award”. This incredible honor inspires me to redouble my efforts in advancing new projects and further energizing our amazing community.

Dynamic Tool Creation for Google Workspace Automation with Gemini CLI

Gists

Dynamic Tool Creation for Google Workspace Automation with Gemini CLI

Abstract

This article presents a method for optimizing Google Workspace automation by dynamically converting frequently used, AI-generated Google Apps Scripts into permanent, reusable tools. By integrating the Gemini CLI with a gas-fakes sandbox via an MCP server, we demonstrate how to securely add and manage these custom tools, reducing operational costs and improving efficiency.

Introduction

When using generative AI to create scripts, ensuring the secure execution of the generated code is critical. This is especially true for applications that manage cloud resources like Google Workspace, where it is paramount to prevent unintended data access or modification. The standard permission model for Google Apps Script often requires broad access, creating a significant security risk when running code from untrusted sources.