$npx -y skills add googleworkspace/cli --skill gws-scriptManage Google Apps Script projects.
| 1 | # script (v1) |
| 2 | |
| 3 | > **PREREQUISITE:** Read `../gws-shared/SKILL.md` for auth, global flags, and security rules. If missing, run `gws generate-skills` to create it. |
| 4 | |
| 5 | ```bash |
| 6 | gws script <resource> <method> [flags] |
| 7 | ``` |
| 8 | |
| 9 | ## Helper Commands |
| 10 | |
| 11 | | Command | Description | |
| 12 | |---------|-------------| |
| 13 | | [`+push`](../gws-script-push/SKILL.md) | Upload local files to an Apps Script project | |
| 14 | |
| 15 | ## API Resources |
| 16 | |
| 17 | ### processes |
| 18 | |
| 19 | - `list` — List information about processes made by or on behalf of a user, such as process type and current status. |
| 20 | - `listScriptProcesses` — List information about a script's executed processes, such as process type and current status. |
| 21 | |
| 22 | ### projects |
| 23 | |
| 24 | - `create` — Creates a new, empty script project with no script files and a base manifest file. |
| 25 | - `get` — Gets a script project's metadata. |
| 26 | - `getContent` — Gets the content of the script project, including the code source and metadata for each script file. |
| 27 | - `getMetrics` — Get metrics data for scripts, such as number of executions and active users. |
| 28 | - `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. |
| 29 | - `deployments` — Operations on the 'deployments' resource |
| 30 | - `versions` — Operations on the 'versions' resource |
| 31 | |
| 32 | ### scripts |
| 33 | |
| 34 | - `run` — |
| 35 | |
| 36 | ## Discovering Commands |
| 37 | |
| 38 | Before calling any API method, inspect it: |
| 39 | |
| 40 | ```bash |
| 41 | # Browse resources and methods |
| 42 | gws script --help |
| 43 | |
| 44 | # Inspect a method's required params, types, and defaults |
| 45 | gws schema script.<resource>.<method> |
| 46 | ``` |
| 47 | |
| 48 | Use `gws schema` output to build your `--params` and `--json` flags. |