setup-google-workspace

setup-google-workspace is a command for Cursor from maccman/growth-agents. It costs 0 tokens per session (3,098 once invoked), scanned C, original, MIT.

A guided setup command for Google Workspace API access, which lets software work with services such as Gmail, Drive, and Calendar.

In plain words
What is it for?
Installing the Google Workspace command-line tool and JavaScript package, creating or configuring cloud access, and completing OAuth login for agent scripts.
Why use it?
It explains the required command-line tool, JavaScript package, cloud project, and login steps instead of leaving the developer to configure them manually. It also identifies the parts that must be done interactively in Terminal.

Command for Cursor

Install

Getting it into your agent

One page per mod, every tool's command on it. A separate URL per tool would split the same page into five that compete with each other.

agentmods
npx agentmods add commands/maccman/growth-agents/setup-google-workspace
Clone the repo
git clone --depth 1 https://github.com/maccman/growth-agents

Made for: Cursor.

Wrote this? Show the measurements

A badge with what this costs and how it scanned, read live from this page, so it follows the numbers instead of freezing them. Markdown for a README, HTML for a documentation site or a project page.

agentmods badge for setup-google-workspace

README.md
[![agentmods](https://agentmods.dev/badge/commands/maccman/growth-agents/setup-google-workspace.svg)](https://agentmods.dev/commands/maccman/growth-agents/setup-google-workspace)
Your own site
<a href="https://agentmods.dev/commands/maccman/growth-agents/setup-google-workspace"><img src="https://agentmods.dev/badge/commands/maccman/growth-agents/setup-google-workspace.svg" alt="Measured on agentmods" height="20"></a>
Per session 0 Only the description is in the session, so the agent can decide to use it. The body loads when it is invoked.
When invoked 3,098 The whole file, excluding the scripts and references it only reads on demand.
Security scan C 2 findings. Scan, not verified.
Origin original No closer match found in the catalogue.
Token cost

What it costs to keep this loaded

Counted locally with the o200k_base tokenizer, which is exact for GPT models; Claude uses its own tokenizer and its counts differ. Treat this as one consistent yardstick across the catalogue rather than a bill. Prices are per million input tokens.

ModelPer sessionOnce invoked
Fable 5 $0.00000 $0.03098
Opus 5 $0.00000 $0.01549
Sonnet 5 $0.00000 $0.00620
Haiku 4.5 $0.00000 $0.00310

Measured 4d ago against content hash 81124bb48012, method: parsed. Prices are Anthropic first-party input rates as of 2026-08-30, from the pricing page.

Security

Grade C, and why

setup-google-workspace scanned grade C with 2 findings against 26 rules in 11 categories — prompt injection, anti-refusal, data exfiltration, privilege escalation, supply chain, agent snooping, system-prompt leakage, SSRF and excessive agency — measured 4d ago.

A static scan of the body, not an audit. Every finding is printed with the line that produced it so you can judge whether it matters here. A mod is markdown that instructs an agent; that is exactly why what it instructs is worth reading.

Harvests environment variableshighData exfiltration

Enumerating or grepping the environment for keys collects credentials unrelated to what the mod says it does.

### 5c — Extract credentials to .env

Runs shell commandslowCapability

Expected in a hook, worth knowing in a rule or an instructions file.

import { exec } from 'child_process'
.cursor/commands/setup-google-workspace.md · 414 lines

How it starts

The opening of the file, as written. The whole thing — 414 lines — stays where its author put it; the contents beside it link to each section on GitHub.

Setup Google Workspace

This command sets up Google Workspace API access by installing the gws CLI and the googleapis npm package for TypeScript agent scripts.

Steps 1-4 MUST be run by the user in a real Terminal window, NOT from inside Cursor. The gws auth flow is highly interactive (opens browsers, requires terminal input) and cannot be automated.


Step 1 — Install gws

Tell the user to open Terminal and run:

npm install -g @googleworkspace/cli

Verify:

gws --version

Step 2 — Run gws auth setup

This step is interactive and MUST be done in Terminal, not from Cursor.

If gcloud is installed:

Tell the user to run:

gws auth setup

This single command handles everything:

  • Creates a GCP project
  • Enables required APIs
  • Configures OAuth consent screen
  • Logs you in via browser

If gcloud is NOT installed:

Two options:

  1. Install gcloud firstbrew install --cask google-cloud-sdk, then run gws auth setup as above.
  2. Manual path — Create a project in Cloud Console, configure OAuth consent screen, create a Desktop OAuth client, download the client JSON to ~/.config/gws/client_secret.json, then run:
    gws auth login
    

Credentials are stored encrypted in the OS keychain (~/.config/gws/).


Step 3 — Scope warning

Unverified apps (testing mode) are limited to ~25 OAuth scopes. Instead of accepting the broad default scope set, use the --scopes flag to request only what you need:

gws auth login --scopes drive,gmail,calendar

Tell the user to keep their scope list minimal to stay under the limit.


Step 4 — Verify gws

Smoke-test in Terminal:

gws gmail users messages list --params '{"userId": "me", "maxResults": 5}'
gws calendar events list --params '{"calendarId": "primary"}'

Expected: JSON output with email message IDs and calendar events.

Troubleshooting:

  • Auth issues — re-run gws auth login
  • permission denied / 403 — an API isn't enabled; re-run gws auth setup or enable manually in Cloud Console
  • account not added as test user — add your email under OAuth consent screen > Test Users in Cloud Console

Read the full file on GitHub · 414 lines

Changes

What this file has done since we first saw it

Hashed on every crawl. A supply-chain change to an agent config is a question of when, not whether, so the history is kept rather than the latest state alone.

  1. 4d ago First seen · 414 lines · 0 tokens per session scan C 81124bb48012

Subscribe to this mod's changes

setup-google-workspace is a command published in the GitHub repository maccman/growth-agents (5 stars, last pushed 6mo ago), licensed MIT. It costs nothing until one of its globs matches a file; then it loads 3,098 tokens. A static security scan graded it C with 2 findings (harvests environment variables, runs shell commands). No closer match exists in the catalogue, so it is treated as the original; first seen 2026-08-31.