gog-cli_skill
- Python
151
GitHub Stars
1
Bundled Files
2 months ago
Catalog Refreshed
4 months ago
First Indexed
Readme & install
Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.
Installation
Preview and clipboard use veilstrat where the catalogue uses aiagentskills.
npx veilstrat add skill intellectronica/agent-skills --skill gog-cli- SKILL.md7.8 KB
Overview
This skill provides concise, practical instructions for using gogcli (gog), a fast, script-friendly command-line interface for Google Workspace services. It covers common patterns, global flags, authentication reminders, and examples for Gmail, Calendar, Drive, Sheets, Classroom, Contacts, Tasks, and more. Use it when you want reliable CLI recipes and troubleshooting steps for automating Google Workspace tasks.
How this skill works
The skill documents the gog command structure, global flags (account, client, json, plain, force, no-input), and service-specific commands for reading/sending email, managing calendar events, manipulating Drive files, editing Sheets, and handling Classroom or Tasks. It shows JSON/plain output patterns for scripting, multi-account use, and the config/environment variables that control default behavior. It does not perform authentication automatically; it provides exact commands to fix auth issues.
When to use it
- Automating email workflows (search, read, send, label, batch modify).
- Scheduling, creating, or responding to calendar events from scripts.
- Managing Drive files: list, search, download, upload, share, and export.
- Reading/writing Sheets and exporting Docs/Slides for CI pipelines.
- Classroom and Tasks management for bulk operations and grading.
- Scripting repeated Workspace admin tasks across multiple accounts.
Best practices
- Prefer --json for machine parsing and use jq to extract fields. Use --plain for simple shell pipelines (cut/xargs).
- Set GOG_ACCOUNT or use --account for reproducible multi-account scripts. Use auth alias for clarity.
- Use --force and --no-input for non-interactive automation; test without them first.
- Keep OAuth credentials path secure and use service accounts where supported (Keep requires service account).
- Check auth status with gog auth list --check before running batch jobs to avoid mid-run failures.
Example use cases
- Export a document to PDF in CI: gog docs export <documentId> --format pdf --out ~/artifacts/doc.pdf
- Batch upload reports to Drive and set sharing: gog drive upload ~/report.pdf --parent <folderId> && gog drive share <fileId> --email user@example.com --role writer
- Grade a classroom submission: gog classroom submissions grade <courseId> <courseworkId> <submissionId> --grade 95
FAQ
Run gog auth credentials <path-to-credentials.json> to store credentials, then gog auth add <email> --services all or use --force-consent to renew tokens.
How do I parse results in scripts?
Use --json and pipe to jq for robust parsing, or --plain for TSV-friendly tools like cut and xargs.
Can I run non-interactive scripts safely?
Yes—use --force and --no-input for non-interactive runs. Verify commands manually first and check gog auth list --check to ensure valid tokens.