メインコンテンツにスキップ

ggsrun

This is a CLI tool to execute Google Apps Script (GAS) at own terminal on local PC. Also this CLI tool can be used for managing files in Google Drive for OAuth2 and Service Account.

AI Summary

ggsrun

CLI tool to execute GAS on a terminal.

Target Users

GAS developers wanting to develop and run GAS on local terminal.

Problems Solved

GAS development limited to browser Script Editor hinders local development.

Script ID

  1. In GAS Editor: Click "Libraries +" → Paste into "Script ID" field → Click "Look up"
  2. "ggsrun" will appear in the search results
  3. Select the latest version (highest number) from "Version" dropdown
  4. Click "Add"

Tags

Main Features
1
Local GAS Development

Develop and execute GAS using local terminal and text editor.

2
Execute GAS & Retrieve Results

Pass values to GAS script and retrieve results in terminal.

3
Drive File Management

Download, upload, search files, manage permissions in Google Drive.

Examples

Main Functions

FunctionDescription
ggsrun e2Execute GAS and get result
ggsrun authCreate auth config file
ggsrun dlDownload files from Drive

Examples

Basic ggsrun Test Execution
/**
 * ggsrun基本テスト実行
 * ・サンプルGAS作成: function main(){return Beacon()}
 * ・CLI実行コマンド: ggsrun e2 -s sample.gs -i [Script ID] -j
 * ・サーバーライブラリインストール: Script ID "115-19njNHlbT-NI0hMPDnVO1sdrw2tJKCAJgOTIAPbi_jq3tOo4lVRov"
 */
function main() {
  return Beacon();
}

ggsrun Installation
/**
 * ggsrunインストール
 * ・Goインストール: go install github.com/tanaikech/ggsrun@latest
 * ・認証設定: ggsrun auth (client_secret.json存在時)
 * ・API有効化: Google Apps Script APIとDrive APIを有効化
 */
function installGgsrun() {
  // CLIコマンドを実行
  // $ go install github.com/tanaikech/ggsrun@latest
}

ggsrun Auth Setup
/**
 * ggsrun認証設定
 * ・クライアント情報取得: client_secret.jsonをダウンロード
 * ・設定ファイル作成: ggsrun auth
 * ・GASプロジェクト連携: Cloud Platform Projectにリンク
 */
function setupAuth() {
  // $ ggsrun auth
}

Sample Code

Post a Sample

No sample codes for this library yet

Be the first to post a sample!

Post a Sample