Set up the GOG CLI with compile-time safety restrictions so your AI agent can access Google Workspace (Gmail, Calendar, Drive, Docs, Sheets, etc.) without being able to send emails, messages, or take other outbound actions.
- Go 1.22+
- macOS or Linux
- The
credentials.jsonfile (you should have received this from Brenner)
L1 ("Draft & Organize") lets the agent do anything to your own stuff — read email, create drafts, organize files, edit docs — but blocks all outbound actions (sending email, chat messages, comments, RSVPs). Blocked commands are physically removed from the binary at compile time — there's no runtime flag or env var to bypass them.
Pull down the gog-safety skill and build:
git clone https://github.com/tychohq/agent-skills.git
cd agent-skills/skills/gog-safety
./scripts/build-gog-safe.sh L1Install the binary:
sudo mv /tmp/gogcli-safety-build/bin/gog-l1-safe /usr/local/bin/gog
sudo chmod +x /usr/local/bin/gogVerify:
gog --version
# Should show a version with -safe suffixgog auth credentials set ~/Downloads/credentials.jsongog auth add you@gmail.com --services allReplace you@gmail.com with your actual email.
This opens a browser window. Sign in with your Google account and approve all requested permissions.
Note: Google will show a "This app isn't verified" warning. Click Advanced → Go to (app name) to proceed.
Verify it worked:
gog auth list# This should fail (blocked at L1):
gog gmail send --help
# These should work (allowed at L1):
gog gmail drafts create --help
gog gmail search --help
gog calendar events --help| Action | Status |
|---|---|
| Read email, search, labels | ✅ Allowed |
| Create/edit drafts | ✅ Allowed |
| Edit Google Docs/Sheets | ✅ Allowed |
| Manage Drive files | ✅ Allowed |
| Calendar create/view events | ✅ Allowed |
| Send email | ❌ Blocked |
| Send chat messages | ❌ Blocked |
| RSVP to events | ❌ Blocked |
| Post comments on shared docs | ❌ Blocked |
The gog-safety skill includes three levels:
- L1 — Draft & Organize: No outbound messaging. Default for AI agents.
- L2 — Draft & Collaborate: Adds comments, RSVP, but still no direct messaging.
- L3 — Full Write (No Admin): Full messaging, but no dangerous admin ops.
See the full level reference for details.