{
  "markdown": "[![MIT License](http://img.shields.io/badge/license-MIT-blue.svg?style=flat)](LICENCE)\n\n<a name=\"top\"></a>\n\n# Gemini CLI Extension for GAS Development Kit\n\n<a name=\"abstract\"></a>\n\n# Description\n\nThis is a Gemini CLI extension for the Google Apps Script development kit. The recent advancement of generative AI is fundamentally changing the application development landscape, and Google Apps Script is no exception. This repository introduces a Gemini CLI extension designed to enhance the Google Apps Script development environment by integrating with powerful existing tools. By combining this extension with `clasp` and `gas-fakes`, developers can create a more streamlined and efficient workflow.\n\nGoogle Apps Script development is enhanced by the combination of these tools. `clasp` is a command-line tool that allows developers to manage their Google Apps Script projects locally using their preferred integrated development environment (IDE), like VSCode. This enables the use of modern development practices, such as version control with Git. To address the challenges of testing code that interacts with Google services, `gas-fakes` provides a local \"fake sandbox\" environment. This allows for safer and more efficient local testing by emulating the Google Apps Script runtime.\n\nThe Gemini CLI extension for Google Apps Script leverages these tools to create a unified and powerful development experience. It brings the advanced capabilities of Gemini's AI directly into the terminal, streamlining the entire development process—from script creation and local testing to deployment and management—all within a single environment. This powerful combination allows developers to fully harness the potential of generative AI for Google Apps Script development.\n\n# Repository\n\n[https://github.com/tanaikech/gas-development-kit-extension](https://github.com/tanaikech/gas-development-kit-extension)\n\n# How to Install dev-gas-extension\n\n## 1. Install Gemini CLI\n\nFirst, install the [Gemini CLI](https://github.com/google-gemini/gemini-cli) using npm:\n\n```bash\nnpm install -g @google/gemini-cli\n```\n\nNext, you will need to authorize the CLI. Follow the instructions provided in the [official documentation](https://github.com/google-gemini/gemini-cli?tab=readme-ov-file#-authentication-options).\n\n## 2. Install Clasp\n\nEven when Clasp is not installed, when gas-fakes is installed, you can run Google Apps Script in a sandbox using gas-fakes.\n\nInstall [Clasp](https://github.com/google/clasp), the command-line tool for Google Apps Script:\n\n```bash\nnpm install -g @google/clasp\n```\n\nAuthorize Clasp by following the instructions in the [official GitHub repository](https://github.com/google/clasp?tab=readme-ov-file#authorization).\n\nClasp can now be used as an MCP server. While you can configure it directly in your `settings.json`, the Gemini CLI extension in this guide handles this for you.\n\n## 3. Install gas-fakes\n\nInstall [gas-fakes](https://github.com/brucemcpherson/gas-fakes), the command-line tool for executing Google Apps Script:\n\n```bash\nnpm install -g @mcpher/gas-fakes\n```\n\n### Authorize\n\nAlternatively, you can use the `gas-fakes` command-line interface (CLI) to assist with the setup. Before you begin, please have your Google Cloud Project ID ready.\n\nFirst, create a `.env` file to store your project configuration:\n\n```bash\ngas-fakes init\n```\n\nNext, authorize the tool. This command will guide you through the process of logging into your Google account and setting up the necessary credentials:\n\n```bash\ngas-fakes auth\n```\n\nIf you need to enable the required Google APIs for your project, you can do so with the following command. This will ensure that all necessary services are accessible. Please check how to use this command using the help message as follows.\n\n```bash\ngas-fakes enableAPIs --help\n```\n\nFor authorization instructions, see the [Getting Started guide](https://github.com/brucemcpherson/gas-fakes/blob/main/GETTING_STARTED.md).\n\n## 4. Install gas-development-kit-extension\n\nInstall the Gemini CLI extension for the GAS Development Kit:\n\n```bash\ngemini extensions install https://github.com/tanaikech/gas-development-kit-extension\n```\n\nThis Gemini CLI extension doesn't include the scripts for the Clasp and gas-fakes MCP servers because both tools have already implemented them. This makes the extension's installation lightweight.\n\nFor managing Google Workspace, you can also install the [ToolsForMCPServer-extension](https://github.com/tanaikech/ToolsForMCPServer-extension).\n\n## 5. Testing the Installation\n\nThis extension can be used on the terminal, both with and without VSCode.\n\n**1. Launch Gemini CLI**\n\nLaunch the Gemini CLI from your terminal:\n\n```bash\ngemini\n```\n\n**2. Verify the installed MCP servers**\n\nVerify the servers with the following command in the Gemini CLI:\n\n```\n/mcp\n```\n\nIf `gas-development-kit-extension` was installed correctly, you will see the following response:\n\n```text\nConfigured MCP servers:\n\n🟢 gas-fakes - Ready (1 tool)\n  Tools:\n  - run-gas-by-gas-fakes\n\n🟢 clasp (from gas-development-kit-extension) - Ready (5 tools)\n  Tools:\n  - clone_project\n  - create_project\n  - list_projects\n  - pull_files\n  - push_files\n\n🟢 workspace-developer (from gas-development-kit-extension) - Ready (2 tools)\n  Tools:\n  - fetch_workspace_docs\n  - search_workspace_docs\n```\n\nThe `workspace-developer` tool is from the [Use Large Language Models (LLMs) to develop on Google Workspace](https://developers.google.com/workspace/guides/build-with-llms) guide.\n\nThis extension includes the following custom commands:\n\n- `/devgas-update-gas`: Update a Google Apps Script project on Google Drive\n- `/devgas-test-gas`: Test run Google Apps Script using gas-fakes\n- `/devgas-load-gas`: Load a Google Apps Script project from Google Drive\n- `/devgas-create-new-gas`: Create a new Google Apps Script project and push a script\n\n# Sample Prompts\n\nTo run the generated Google Apps Script, use the `/devgas-test-gas` custom command as follows:\n\n```text\n/devgas-test-gas Create a new Google Spreadsheet by putting a formula `=GOOGLEFINANCE(\"CURRENCY:USDJPY\")` in cell \"A1\" of the first sheet. Then, get and show the value of cell \"A1\". (Note: `gas-fakes` has no `getActiveSheet()` method. In this case, use `getSheets()[0]`.)\n```\n\n![](images/fig2.jpg)\n\nTo modify the script, the following prompt can be used. This example assumes that the previous prompt is in your history.\n\n```text\nModify the script from `CURRENCY:USDJPY` to `CURRENCY:EURJPY` and test it again.\n```\n\n![](images/fig3.jpg)\n\nTo save the generated script to Google Drive, use the following prompt:\n\n```text\n/devgas-create-new-gas\n```\n\nor\n\n```text\n/devgas-create-new-gas @script.js\n```\n\n![](images/fig4.jpg)\n\nThis creates the following Google Apps Script project in your Google Drive:\n\n![](images/fig5.jpg)\n\n---\n\n<a name=\"licence\"></a>\n\n# License\n\n[MIT](LICENCE)\n\n<a name=\"author\"></a>\n\n# Author\n\n[Tanaike](https://tanaikech.github.io/about/)\n\n[Donate](https://tanaikech.github.io/donate/)\n\n<a name=\"updatehistory\"></a>\n\n# Update History\n\n- v1.0.0 (October 26, 2025)\n\n  1.  Initial release.\n\n- v1.0.1 (November 7, 2025)\n\n  1.  `devgas-create-new-gas.toml`, `devgas-load-gas.toml`, and `devgas-update-gas.toml` were updated.\n\n[TOP](#top)\n",
  "bytes": 7243,
  "sha": "f2b1cefa762c986934c8c8853bc08e5363b305fb33bb5201dc17d187952805d6",
  "repo_slug": "tanaikech/gas-development-kit-extension",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/plg_tanaikech_gas_development_kit_extension_f6c45e01/readme"
}