跳到正文
Skillpedia
通用编程32k · #9183

gws-script

它能做什么

这个命令可以帮你管理 Google Apps Script 项目。你可以创建新项目、查看项目信息、获取或更新代码,还能查看使用量指标。

适用场景

  • ✓当你想从零开始创建一个新脚本时。
  • ✓当你需要查看已有脚本的代码时。
  • ✓想了解有多少人在使用你的脚本时。

技能链接

https://github.com/googleworkspace/cli/blob/main/skills/gws-script/SKILL.md

复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。

使用方法

最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。

可直接粘贴的消息

请用这个技能帮我:https://github.com/googleworkspace/cli/blob/main/skills/gws-script/SKILL.md 阅读该链接中的 SKILL.md 文件,并在我的任务中按照它的说明来做。
想让你的 AI 自己找到这样的技能吗?安装免费的 Skillpedia MCP:只需一行,每次任务前它都会在 15,000+ 个技能中搜索。1 分钟完成安装 →

可以这样问 AI

“创建一个名为「我的第一个脚本」的新脚本项目。”

每周 5 个新技能,1 分钟读完。

工作原理

你需要指定要执行的操作(比如「创建项目」或「查看代码」)以及对应的项目。工具会与 Google 通信,完成你的请求。

技术内容(原始 SKILL.md)

作者在 GitHub 上的英文原文。

script (v1)

PREREQUISITE: Read ../gws-shared/SKILL.md for auth, global flags, and security rules. If missing, run gws generate-skills to create it.

gws script <resource> <method> [flags]

Helper Commands

Command Description
+push Upload local files to an Apps Script project

API Resources

processes

  • list — List information about processes made by or on behalf of a user, such as process type and current status.
  • listScriptProcesses — List information about a script's executed processes, such as process type and current status.

projects

  • create — Creates a new, empty script project with no script files and a base manifest file.
  • get — Gets a script project's metadata.
  • getContent — Gets the content of the script project, including the code source and metadata for each script file.
  • getMetrics — Get metrics data for scripts, such as number of executions and active users.
  • updateContent — Updates the content of the specified script project. This content is stored as the HEAD version, and is used when the script is executed as a trigger, in the script editor, in add-on preview mode, or as a web app or Apps Script API in development mode. This clears all the existing files in the project.
  • deployments — Operations on the 'deployments' resource
  • versions — Operations on the 'versions' resource

scripts

  • run —

Discovering Commands

Before calling any API method, inspect it:

# Browse resources and methods
gws script --help

# Inspect a method's required params, types, and defaults
gws schema script.<resource>.<method>

Use gws schema output to build your --params and --json flags.

常见问题

什么是 Google Apps Script?

它是一种编写小程序(脚本)的方式,可以在 Google Workspace(Gmail、表格、云端硬盘等)中自动完成各种任务。

「resource」和「method」是什么意思?

「resource」相当于你可以管理的一类对象(例如「projects」)。「method」则是你想对这类对象执行的操作(例如「create」或「get」)。

什么是 `gws schema`?

这是一个命令,用来显示使用某个功能所需的具体细节,比如你需要提供哪些信息。

详情

作者的原始描述

Manage Google Apps Script projects.

repo: googleworkspace/cli

热度

GitHub 星标
32k
排名
#9183
许可证
Apache-2.0
更新时间
2026/10/6

这个技能有用吗?

0

登录 后即可投票。

评论

  • …

同一仓库的更多技能

相似技能