Ggsrun

Updated ggsrun to v537

ggsrun was updated to v5.3.7.

  • v5.3.7 (June 2026) - Simplified Quick Onboarding, On-demand Setup Prompting, Optional Credentials Path, and Seamless Configuration Initializer Introduced the groundbreaking, extremely easy-to-use $ ggsrun setup onboarding command to dramatically simplify Google Cloud API and OAuth2 credentials setup, while keeping traditional $ ggsrun auth fully intact for backward compatibility. This command automates Google Cloud Workspace API enablement (Drive, Sheets, Slides, Docs, Google Apps Script, Gmail) using GCP Quick Flows, immediately redirecting users straight to the Credentials creation page. It removes any credential filename renaming constraints (you can load credentials from any custom file path like {your path}/{credential name}.json rather than renaming to exactly client_secret.json) or supports manual credential copy-pasting. Added a dynamic config initializer (ggsrunIniForSetup) to gracefully bypass “missing client_secret.json” startup errors on first-time runs, and added interactive prompts to configure Script IDs and Web Apps URLs with automated pre-filled defaults from existing configurations.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v533

ggsrun was updated to v5.3.3.

  • v5.3.3 (June 2026) - Recursive Directory Walk, Safe Interactivity & GAS Zip Download Enhanced updateproject (alias ud) command to recursively traverse folders specified via -f / --filename to batch overwrite remote GAS projects. Prints targeted local files in a beautiful bullet list using pterm.BulletListPrinter and requires explicit interactive confirmation (Y/N) in CLI/TUI modes before mutating Google Drive files. Supported downloading whole Apps Script projects directly as local packaged .zip archives via ggsrun download -i <fileId> -z. Added robust security warnings to the updateproject MCP tool description directing AI agents to obtain user approval before calling the tool. Introduced a complete automated integration testing suite (cli_test.go) validating download structures, document conversions, standalone uploads, and binary fallbacks.
  • v5.3.2 (June 2026) - Script Upload Flag Registration and TUI Focus Fallbacks Fixed a TUI upload crash where converting and uploading .js/.gs files to standalone Apps Script projects threw a panic: internal process exited with code 1 due to unregistered projectname and googledocname flags in createOpContext. Integrated full text file previews on Enter for remote files, and implemented dynamic importFormats MIME type lookup via utl.GetImportTargets to automatically bypass conversion prompts for unconvertible file types, as well as robust focus restoration.
  • v5.3.1 (June 2026) - Script Upload Routing Fixes, Non-Convertible Upload Fallbacks, and TUI Error Propagation Fixed a bug in concurrentUpload that caused .js/.gs/.gas uploads to throw HTTP 400 Bad Request by redirecting script project uploads to the Apps Script project builder and overriding raw script uploads to text/plain. Allowed non-Workspace files (such as .zip or .mp3) to bypass conversion checks and upload as-is when no conversion format is requested. Integrated TransferResult and FileInf error inspections in the TUI filer (ggsrun fd) to propagate upload/download failures to the user instead of failing silently.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v530

ggsrun was updated to v5.3.0.

  • v5.3.0 (June 2026) - Responsive TUI Filer (FD Mode) Enhancements, Focus Persistence, and Platform Compatibility Fixes Refactored TUI Filer (FD Mode) popup layouts using tview.Flex to center dialogs (errors, sorting, details, help) and prevent text clipping. Implemented focus locking to preserve active panel focus post-action. Added wrap-around to lists and mapped the y key to yank (copy) selected file paths or File IDs to the clipboard. Resolved compilation errors on 32-bit Linux platforms (e.g. linux/arm) by explicitly casting syscall.Stat_t Ctim fields to int64 inside build-tagged files, and adapted the mock simulation test suite (fd_test.go) to match the new responsive structures.
  • v5.2.4 (June 2026) - Latest MIME Type Formats, CLI Option Help Details, Concurrent Conversion Overhaul, and Destination Directory Support Updated internal MIME type mapping definitions (googlemimetypes.go) to synchronize with the latest Google Drive API importFormats/exportFormats. Revamped the CLI options help display for --extension (download/revision) and --convertto (upload) to explicitly list all supported formats. Overhauled the concurrent upload/download engines to handle --convertto / --noconvert directly in parallel streams without falling back to the legacy single-threaded uploader, adding validation capability checks and graceful error warning feedback. Added --destination (-d) option to the download and revision commands to allow specifying the target local directory for saving downloaded files.
  • v5.2.3 (June 2026) - Directory Reuse Conflict Resolution, Output Control, and CLI/MCP Alignment Upgraded the directory upload conflict resolution mechanism to silently and recursively reuse existing remote folders without prompting. Aligned the --conflict-mode behavior for -j / --jsonparser CLI runs to match the automated MCP mode (defaulting to OverwriteIfNewer, overridable via --cm). Muted TUI output and progress bars (mpb) when running with the -j option to return clean JSON. Supported --cm as a shorthand alias for --conflict-mode in file transfers.
  • v5.2.2 (June 2026) - MCP Help Display Expansion, Safety Review Prompt, Dual-Mode Conflict Engine, and File-Level Error Feedback Expanded ggsrun mcp -h (and --help) to display all exposed MCP tool names and their detailed description outputs directly. Implemented strict programmatic safety review prompts inside the exe1 MCP tool description, instructing LLMs to statically analyze Apps Script payloads for API mutations (write/update/delete) and obtain user Y/N confirmations before running, while allowing read-only scripts to run automatically. Re-designed the conflict resolution engine into a dual-mode system: automated and non-interactive for MCP server sessions (defaulting to OverwriteIfNewer, with options for Ignore and Rename), and preserving legacy interactive CLI prompts for raw executions. Refactored parallel transfer loops to capture and return detailed file-level error feedback instead of crashing.
  • v5.2.1 (June 2026) - Dynamic CLI Help Customization, Beacon Script Integration, and Namespace Binding Updated the CLI help systems for e1, e2, and w to integrate comprehensive execution command examples (including stateless beacon checks) dynamically within both the --help flag screens and optionless execution error overlays. Fixed a namespace bug where evaluated scripts executing ggsrunif.Beacon() inside the library threw a ggsrunif is not defined ReferenceError, by binding ggsrunif to the library’s global execution context.
  • v5.2.0 (June 2026) - Go standard layout, WSL2 browser integration, Web Apps URL registration, CLI UX hardening, and MCP Server Schema Improvements Reorganized the codebase to follow the standard Go project structure (main.go, /internal/app/, /internal/utl/). Expanded ggsrun auth to request Web Apps URL registration and dynamically persist it in ggsrun.cfg, allowing ggsrun w to run without the -u option. Integrated WSL 2 environment detection to prompt the user to choose between the Windows host browser, WSL/Ubuntu native browser, or manual URL copy-pasting. Upgraded ggsrun e1, ggsrun e2, and ggsrun w commands to dynamically print full CLI flag helps alongside custom usage examples. Improved the MCP server (ggsrun mcp) tools schema, adding rich parameter descriptions, Drive API query examples, new scriptfile/stringscript parameters to the exe1 schema, searchbyid parameter to the filelist schema, and making scriptid optional by resolving automatically from ggsrun.cfg (via GGSRUN_CFG_PATH or the local directory). Refined tools/call backend handling to safely strip null/empty values.
  • v5.1.1 (May 2026) - Modular Handlers & Enhanced MCP Server Core Refactored the codebase to modularize legacy single-file command handlers into dedicated, organized handler files (handler_download.go, handler_upload.go, handler_transfer.go, handler_mcp.go, handler_execute.go). Strengthened the MCP server core (ggsrun mcp) by capturing stdout and stderr execution logs for comprehensive error recovery. Embedded full support for --conflict-mode inside the MCP JSON-RPC schemas and standardized file transfer outputs into TransferResult to support interactive multi-turn collision resolution in LLM conversations. Fully updated pre-built binaries for all major architectures.
  • v5.1.0 (May 2026) - Advanced Conflict Resolution Engine Introduced a robust pre-computation conflict resolution matrix for both download and upload commands via the new --conflict-mode (-cm) flag. Users can now choose from skip, overwrite, rename (appends timestamp _YYYYMMDD_HHMMSS to avoid collisions), or update (syncs only if the source file is newer than the target). Includes interactive fallback CLI prompts if no mode is specified. Deprecated the legacy --overwrite (-o) and --skip (-s) options in favor of --conflict-mode. To avoid Drive API rate limits during massive concurrent uploads, metadata query is pre-fetched in bulk.
  • v5.0.3 (May 2026) - CLI UX Overhaul & Dynamic TUI Integration Introduced a highly visual, modern Terminal UI (TUI) powered by pterm for exe1, exe2, and webapps commands. Added interactive loading spinners with anti-ghosting fixed-width padding (%-70s) and beautifully structured execution reports. Maintained strict backward compatibility by preserving pure JSON output streams via the -j flag for CI/CD pipeline automation.
  • v5.0.2 (May 2026) - Secure Web Apps Protocol Upgrade Upgraded the webapps command to natively support “Only myself” execution deployments by bridging OAuth tokens (drive scope) across Google’s HTTP 302 Auth Redirects. Ported the IIFE/JSON-literal double-eval protections from exe2 to webapps.
  • v5.0.1 (May 2026) - Execution Engine Hardening & Double-Eval Eradication Eliminated the V8 engine double-eval 500 server crash during dynamic script execution by enforcing IIFE and JSON-literal payload encoding. Redefined -f flag mapping for proper API gateway resolution in exe2. Added precision deployment documentation for stateful and stateless execution modes.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v500

  • v5.0.0 (May 2026) - The Omnibus Architecture Rewrite Engine fundamentally rewritten for Go 1.26.3+. Implemented channel-based concurrency (errgroup), freeze-proof TUI (mpb/v8), SIMD JSON parsing (goccy/go-json), native MCP server (ggsrun mcp), Shared Drives full-support, auto MIME-mapping, isolated fault tolerance, and OAuth2 loopback automation.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Simple Method for using ggsrun

Gists

This is a simple method for using ggsrun. ggsrun is a CLI tool to execute Google Apps Script (GAS) on a terminal. Also this CLI tool can be used for managing files in Google Drive for OAuth2 and Service Account.

When you use ggsrun, it is required to retrieve the client ID and client secret and/or the service account at Cloud Platform Project. But, there is the case that you want to simply test or you want to just upload and download the files for Google Drive. In this post, I would like to introduce how to simply use ggsrun.

Updated ggsrun to v174

  • v1.7.4 (March 11, 2020)

    1. Recently, I noticed that new Google Apps Script project of the standalone script type cannot be created by the create method of Drive API. From now, in order to create the standalone Google Apps Script project, only Google Apps Script API is required to be used. Ref By this, I updated ggsrun. So the command for creating new GAS project is not changed.

      • $ ggsrun u -p ###folderId### -f sample.gs -pn sampleGASProjectName

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Uploading File to Shared Folder using ggsrun

Gists

ggsrun is also a CLI application for using Google Drive.

Here, I would like to introduce a sample command. This is a sample command for uploading a file to a shared folder using ggsrun.

This situation supposes that the shared folder is https://drive.google.com/drive/folders/abcdefg?usp=sharing and the folder has the edit permission.

Sample command:

$ ggsrun u -f "sample.txt" -p "abcdefg" --serviceaccount "###JSON file of Service Account###"
  • If you have already used OAuth2, you can upload the file by ggsrun u -f "sample.txt" -p "###folderId###".

Updated ggsrun to v160

ggsrun was updated to v.1.6.0

  • v1.6.0 (November 30, 2018)
    1. Although at ggsrun, files can be searched by filename and file ID, searching files using search query and regex couldn’t be done. From version 1.6.0, files got to be able to be searched using the search query and regex.
      • $ ggsrun sf -q "### search query ###" -f "### fields ###" -r "### regex ###"
    2. Some modifications.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v152

ggsrun was updated to v.1.5.2

  • v1.5.2 (November 4, 2018)
    1. About downloading folders, when files are downloaded from a folder, you can download Google Docs files with the mimeType you want. For example, when you download files from the folder, if -e txt is used, Google Docs are downloaded as the text file. When -e pdf is used, they are downloaded as the PDF file. Of course, there are mimeType which cannot be converted.
      • $ ggsrun d -f [folderName] -e txt -j
    2. About uploading files, when files are uploaded from your local PC, the files got to be able to be converted to Google Docs. For this, new option of --convertto, -c is added. For example, when a text file is uploaded, if you use -c doc, the text file is uploaded as Google Document.
      • $ ggsrun u -f [fileName] -c doc -j

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v150

ggsrun was updated to v.1.5.0

  • v1.5.0 (October 27, 2018)
    1. From this version, ggsrun got to be able to download all files and folders in the specific folder in Google Drive. When all files are downloaded from a folder, the same folder structure of Google Drive is created to the local PC.
      • $ ggsrun d -f folderName or folderId
        • When the project file is downloaded, it is downloaded as a zip file. All scripts in the project is put in the zip file.
        • Also when you download a single project, you can use an option --zip or -z. By this, the downloaded project is saved as a zip file.
        • This new function can be also used for the shared folders. When you want to download the files from the shared folder, please use the folder ID of the shared folder.
    2. The file list with the folder tree in the specific folder got to be able to be retrieved.
    3. When the files are downloaded, the progression got to be able to be seen. When you want to see the progression, please use -j when you download files and folders.
    4. Files with large size got to be able to be used. In order to download files with large size (several gigabytes), files are saved by chunks.
    5. Some modifications.

You can check ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v141

ggsrun was updated to v.1.4.1

  • v1.4.1 (February 9, 2018)
    1. For uploading, the resumable-upload method was added.
      • The resumable-upload method is automatically used by the size of file.
        • “multipart/form-data” can upload files with the size less than 5 MB.
        • “resumable-upload” can upload files with the size more than 5 MB.
      • The chunk for resumable-upload is 100 MB as the default.
        • Users can also give this chunk size using an option.
      • $ ggsrun u -f filename -chunk 10
        • This means that a file with filename is uploaded by each chunk of 10 MB.

You can read “How to install” at here.

Updated ggsrun to v140

ggsrun was updated to v.1.4.0

You can read “How to install” at here.

Updated ggsrun to v134

ggsrun was updated to v.1.3.4

  • v1.3.4 (January 2, 2018)

    1. Added new option for downloading ‘bound-scripts’ of Google Sheets, Docs, or Forms file.
      • When the bound-scripts are downloaded, the project name cannot be retrieved because Drive API cannot be used for the bound-scripts. So when the bound-scripts are downloaded, the project ID had been used previously. Such filename is not easily to be seen. By this additional option, users can give the filename when it downloads the bound-scripts.
      • The usage is here
    2. Removed a bug.
      • When a project is downloaded, script ID in the project is added to the top of each downloaded script as a comment. There was a problem at the character using for the comment out. This was modified.

You can check this and download ggsrun at https://github.com/tanaikech/ggsrun.

Create New Project with Original Manifests

It was found that you can also create new project with your original Manifests using ggsrun. By using this, for example, when you created new project, the project can have libraries, Advanced Google Services and so on at the initial stage. I think that this can be used as a template for Project.

$ ggsrun u -pn [Project name] -f appsscript.json

https://github.com/tanaikech/ggsrun/blob/master/help/README.md#ModifyManifests

Create New Project with Original Manifests

You can check this and download ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v133

ggsrun was updated to v.1.3.3

Awesome points of Manifests :

Awesome points of Manifests that I think are below.

Updated ggsrun to v132

ggsrun was updated to v.1.3.2

  • v1.3.2 (October 20, 2017)

    1. Updated ggsrun’s Install manual (README.md). Since I thought that the manual became too complicated, I separated it to the simple version and the detail version. And also , recently, since Google’s specification was updated, about how to deploy API executable and enable APIs for ggsrun’s Install manual were updated.
    2. From this version, scripts in a project can be rearranged. The rearrangement can be done by interactively on your terminal and/or a configuration file. The usage is here
      • For rearranging scripts, there is one important point. When scripts in a project is rearranged, version history of scripts is reset once. So if you don’t want to reset the version history, before rearranging, please copy the project. By copying project, the project before rearranging is saved.

Updated ggsrun to v132

Updated ggsrun to v131

ggsrun was updated to v.1.3.1

  1. Recently, when scripts on local PC is uploaded to Google Drive as a new project, the time to create on Google became a bit long. (I think that this is due to Google Update.) Under this situation, when the script is uploaded, the timeout error occurs while the new project is created using the script. So the time until timeout of fetch was modified from 10 seconds to 30 seconds. By this, when the script is uploaded, no error occurs and the information of the created project is shown.
    • You can create a new project on Google Drive using scripts on local PC. The sample command is ggsrun u -f sample.gs1,sample2.gs,sample3.html -pn newprojectname

You can check this and download ggsrun at https://github.com/tanaikech/ggsrun.

Updated ggsrun to v130

ggsrun was updated to v.1.3.0

  1. From this version, container-bound scripts can be downloaded. The container-bound script is the script created at the script editor on Google Sheets, Docs, or Forms file.
    • In order to download container-bound scripts, the project ID of container-bound scripts is required. The project ID can be retrieved as follows.
      • Open the project. And please operate follows using click.
        • -> File
        • -> Project properties
        • -> Get Script ID (This is the project ID.)
  2. When a project is downloaded, the filename of HTML file had become .gs. This bug was modified.

The usage is here.

Updated ggsrun to v122

ggsrun was updated to v.1.2.2

  1. For Google Docs (spreadsheet, document, slide and drawing), since I noticed that the revision files would not be able to be retrieved using Drive API v3, I modified this using new workaround.
    • The new workaround is to use Drive API v2. drive.revisions.get of Drive API v2 can retrieve not only the revision list, but also the export links. I thought of the use of the export links. This became the new workaround.
    • For the files except for Google Docs, the revision files can be retrieved using Drive API v3.
    • The usage is here.

I don’t know when this workaround will not be able to be used. But if this could not be used, I would like to investigate of other method.

CLI Tool - ggsrun

Overview

This is a CLI tool to execute Google Apps Script (GAS) on a terminal.

Motivation

Will you want to develop GAS using CoffeeScript on your local PC? Generally, when we develop GAS, we have to login to Google using own browser and develop it using Javascript on the Script Editor. Recently, I have wanted to have more convenient local-environment for developing GAS. So I created this “ggsrun”.

CLI Tool - ggsrun