gws-script-push
它能做什么
这个工具会把你的代码文件发送到一个 Google Apps Script 项目中,并且会替换项目中所有现有的文件。
适用场景
- ✓当你有一个本地脚本项目,想把它放到 Google 上时。
- ✓当你想用新的修改更新 Google 上已有的脚本时。
- ✓把本地代码备份到一个 Google 项目中。
技能链接
https://github.com/googleworkspace/cli/blob/main/skills/gws-script-push/SKILL.md复制后粘贴给你的 AI(Claude、ChatGPT 或 Cursor),让它按照说明操作。
使用方法
最简单的方法:复制下面的消息,粘贴给你的 AI。它会读取这个技能并按说明操作。
可直接粘贴的消息
适用于 Claude Code、Codex 或 Cursor:在项目文件夹中运行,即可安装该技能。
下载 SKILL.md,放进智能体的技能文件夹。
可以这样问 AI
“把我电脑上的文件上传到 ID 为「PROJECT_ID」的脚本项目中。”
每周 5 个新技能,1 分钟读完。
工作原理
你需要提供 Google Apps Script 项目的 ID,以及存放文件的文件夹。工具会把该文件夹中的所有文件发送到指定项目,并覆盖原有的文件。
技术内容(原始 SKILL.md)
作者在 GitHub 上的英文原文。
script +push
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto create it.
Upload local files to an Apps Script project
Usage
gws script +push --script <ID>
Flags
| Flag | Required | Default | Description |
|---|---|---|---|
--script |
✓ | — | Script Project ID |
--dir |
— | — | Directory containing script files (defaults to current dir) |
Examples
gws script +push --script SCRIPT_ID
gws script +push --script SCRIPT_ID --dir ./src
Tips
- Supports .gs, .js, .html, and appsscript.json files.
- Skips hidden files and node_modules automatically.
- This replaces ALL files in the project.
[!CAUTION] This is a write command — confirm with the user before executing.
See Also
- gws-shared — Global flags and auth
- gws-script — All manage google apps script projects commands
常见问题
可以上传哪些类型的文件?
你可以上传扩展名为 .gs、.js、.html 和 appsscript.json 的文件。
项目中原有的文件会怎样?
Google Apps Script 项目中原有的所有文件都会被你上传的文件替换。
使用之前需要先做什么设置吗?
需要,你得先完成身份验证的设置。详情请参阅 `../gws-shared/SKILL.md` 文件。
详情
热度
- GitHub 星标
- 32k
- 排名
- #9182
- 许可证
- Apache-2.0
- 更新时间
- 2026/10/6
评论
- …