gws-script

Manage Google Apps Script projects, deployments, versions, and executions via the gws CLI.

Updated Nov 9, 2023
One-click install
npx skills add https://github.com/oresttokovenko/dot-files --skill gws-script-oresttokovenko
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: gws-script
Source: https://github.com/oresttokovenko/dot-files/tree/main/chezmoi/dot_agents/skills/gws-script
Command: npx skills add https://github.com/oresttokovenko/dot-files --skill gws-script-oresttokovenko

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Managing Google Apps Script projects through the web editor is slow and hard to automate. This Skill lets you create projects, push code, manage deployments and versions, and monitor script executions directly from the command line using the gws CLI. ## Core Features & Use Cases - Project Management: Create new script projects, fetch metadata, and retrieve or update full project content including code files and manifests. - Execution Monitoring: List script processes and pull metrics such as execution counts and active users to track script health. - Deployments & Versions: Manage deployments and versions through dedicated API resources, with a helper command to push local files to a project. - Use Case: You maintain an Apps Script automation in a local Git repo. Use this Skill to push local changes to the project, create a new version, redeploy, and then check process metrics to confirm the update runs correctly. ## Quick Start Use the gws script skill to create a new Apps Script project and push my local code files to it.

Frequently Asked Questions about gws-script

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage Google Apps Script projects from the command line?

Use the gws CLI with the pattern gws script <resource> <method> [flags]. It supports creating projects, getting and updating content, managing deployments and versions, and running scripts. Inspect any method first with gws schema script.<resource>.<method>.

How do I push local files to an Apps Script project?

Use the gws script +push helper command, which uploads local files to an Apps Script project. Alternatively, the projects.updateContent method replaces all project files with the content you provide as the new HEAD version.

What do I need installed before using gws script commands?

You need the gws binary installed and the gws-shared skill available for authentication, global flags, and security rules. If gws-shared is missing, run gws generate-skills to create it before calling any API method.

How do I monitor Apps Script executions and usage metrics?

Use the processes resource to list script processes and their status, and projects.getMetrics to retrieve data such as execution counts and active users. These methods help track script health after deployments.

Does updating Apps Script project content affect existing files?

Yes. The projects.updateContent method clears all existing files in the project and stores the new content as the HEAD version, which is used for triggers, the editor, add-on preview, and development-mode executions.