跳到主要内容
哒哒星球DADA PLANET

Skill · 已公开版本

gws-script-push · Apps Script 项目文件上传

通过 gws 命令行把本地文件上传到指定的 Google Apps Script 项目,支持 .gs、.js、.html 与 appsscript.json。

先看看示例

作者提供的示例,实际效果取决于你的输入和使用工具。

输入

把 ./src 目录下的脚本与 HTML 文件推送到指定 Apps Script 项目 ID。

输出

预期交付:上传结果;项目内文件被本地文件整体替换。(编辑说明,非实际运行结果)

方法说明

---
name: gws-script-push
description: "Google Apps Script: Upload local files to an Apps Script project."
metadata:
  version: 0.22.5
  openclaw:
    category: "productivity"
    requires:
      bins:
        - gws
    cliHelp: "gws script +push --help"
---

# script +push

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

Upload local files to an Apps Script project

## Usage

```bash
gws script +push --script <ID>
```

## Flags

| Flag | Required | Default | Description |
|------|----------|---------|-------------|
| `--script` | ✓ | — | Script Project ID |
| `--dir` | — | — | Directory containing script files (defaults to current dir) |

## Examples

```bash
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](../gws-shared/SKILL.md) — Global flags and auth
- [gws-script](../gws-script/SKILL.md) — All manage google apps script projects commands