gws-script
googleworkspace/cli
Manage Google Apps Script projects via CLI with deploy, versioning, and execution capabilities.
What is gws-script?
A CLI skill for managing Google Apps Script projects through the Google Workspace API. Use it to create projects, upload code, deploy versions, run scripts, and monitor execution metrics.
- Create and retrieve Google Apps Script projects
- Upload local files to Apps Script projects via the push helper
- Get script content including code source and metadata
- Deploy script versions and manage deployments
- Execute scripts via the run method
- List and monitor script execution processes
How to install gws-script
npx skills add null --skill gws-script- gws CLI installed and configured
- Authentication credentials set up (see gws-shared/SKILL.md)
- Google Workspace account with Apps Script access
How to use gws-script
- 1.Run `gws script --help` to browse available resources and methods
- 2.Use `gws schema script.<resource>.<method>` to inspect required parameters and types
- 3.Call API methods with `gws script <resource> <method> [flags]` using discovered parameters
- 4.Use `gws script +push` helper to upload local files to your Apps Script project
- 5.Monitor execution with `gws script processes list` or `gws script processes listScriptProcesses`
Use cases
- Automate deployment of Apps Script code from local development environment
- Monitor script execution processes and performance metrics
- Create new Apps Script projects programmatically
- Retrieve script project metadata and content for auditing or backup
- Deploy multiple versions of a script for testing and production
- Google Workspace administrators
- Apps Script developers automating deployments
- DevOps engineers managing script infrastructure
- Teams using Google Sheets, Docs, or Forms with custom automation
gws-script FAQ
You must read gws-shared/SKILL.md for authentication, global flags, and security rules. If missing, run `gws generate-skills` to create it.
Use the `+push` helper command, which is documented in gws-script-push/SKILL.md.
Run `gws schema script.<resource>.<method>` to inspect required parameters, types, and defaults before calling the API.
Yes, use the `projects.deployments` and `projects.versions` resources to manage and deploy different versions of your script.
Use `gws script processes list` to see processes made by or on behalf of a user, or `gws script processes listScriptProcesses` for a specific script's execution history.
Full instructions (SKILL.md)
Source of truth, from googleworkspace/cli.
name: gws-script description: "Manage Google Apps Script projects." metadata: version: 0.22.5 openclaw: category: "productivity" requires: bins: - gws cliHelp: "gws script --help"
script (v1)
PREREQUISITE: Read
../gws-shared/SKILL.mdfor auth, global flags, and security rules. If missing, rungws generate-skillsto 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' resourceversions— 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.
Related skills
More from googleworkspace/cli and the wider catalog.
gws-gmail
Send, read, and manage Gmail emails via Google Workspace CLI.
gws-drive
Manage Google Drive files, folders, and shared drives via CLI.
gws-docs
Read and write Google Docs via command line.
gws-calendar
Manage Google Calendar events, calendars, and access control via CLI.
gws-sheets
Read and write Google Sheets spreadsheets via CLI.
gws-gmail-send
Send emails via Gmail with attachments, CC/BCC, HTML support, and draft options.