| name | gog |
| description | Operate Google Workspace from the terminal via the `gog` CLI (gogcli). Use for checking and replying to Gmail, managing Google Tasks, reading and creating Calendar events, Google Chat (spaces/DMs/messages), Meet spaces, Contacts, Drive/Docs/Sheets, and more. Triggers on `/gog`, `/gog mail`, `/gog tasks`, `/gog events`, `/gog chat`, `/gog meet`, or any request to check/read/reply/send email, list or add tasks, see today's agenda, or message someone on Chat for the user's Google account. |
| version | 0.1.0 |
| category | communication |
| tags | ["google","gmail","calendar","tasks","cli","workspace"] |
| recommended_skills | [] |
| platforms | ["claude-code"] |
gog — Google Workspace in the terminal
gog (gogcli) is installed system-wide. Treat this skill as the playbook for
driving it on this machine. Invoked as /gog <area> [...] — route to the
matching section below (mail, tasks, events, chat, meet, contacts, drive,
docs, sheets). With no area, show a short menu of what you can do.
Environment (this machine)
export GOG_HOME="$HOME/.config/gogcli"
ACCT="olaf@freundcloud.com"
- Auth is already provisioned (OAuth, file keyring). Always pass
-a "$ACCT" for API calls and --no-input so any auth/keyring prompt
fails fast instead of hanging.
- Use
-j (JSON) for anything you need to parse, then format it for the
user — never dump raw JSON. Use --plain (TSV) for quick human reads.
- Run
gog <area> --help (or gog schema <area> <cmd>) to confirm flags
before any write — the surface is large and flags differ per verb.
Safety rules (read before any write)
- Never print access tokens, refresh tokens, OAuth client secrets, or
keyring passwords. When inspecting auth, show status only.
- Sending/replying to mail, deleting, or any mutation requires explicit
user intent. Draft first and show the user; only
send after they
confirm. Don't add --force unless the user asked for that exact change.
- Prefer
--dry-run where supported; clean up any throwaway test objects.
- For pure reads, scope tightly (
--max, date filters) and keep it read-only.
mail — gog gmail (aliases: mail, email)
Check, read, reply, send, organise. Verbs: search get raw thread labels archive mark-read unread trash send forward autoreply drafts attachment.
Check / read:
gog -a "$ACCT" --no-input -j gmail search "is:unread in:inbox" --max 15
gog -a "$ACCT" --no-input -j gmail search "newer_than:1d"
gog -a "$ACCT" --no-input -j gmail get <messageId> --sanitize-content
gog -a "$ACCT" --no-input -j gmail thread get <threadId> --sanitize-content
Format results as: time · from · subject (· label). Resolve <messageId>/
<threadId> from a prior search.
Reply / send (confirm with user first):
gog gmail send --help
gog -a "$ACCT" --no-input gmail drafts create --thread <threadId> \
--to <addr> --subject "Re: ..." --body-file /tmp/reply.txt
gog -a "$ACCT" --no-input gmail send ...
Gotcha: there is no gmail reply verb — replying is gmail send
(or gmail drafts create) targeting the original --thread <threadId>.
Always gog gmail send --help first to confirm the exact thread/reply flags.
Organise: gmail archive|mark-read|unread|trash <messageId>,
gmail labels list, gmail forward --to <addr> <messageId>.
tasks — gog tasks (alias: task)
Default list id is @default ("My Tasks").
gog -a "$ACCT" --no-input -j tasks lists
gog -a "$ACCT" --no-input -j tasks list @default
gog -a "$ACCT" --no-input tasks add @default --title "Buy milk" --due 2026-05-30
gog -a "$ACCT" --no-input tasks done @default <taskId>
gog -a "$ACCT" --no-input tasks delete @default <taskId>
Show as ☐ Title (due …); filter .status != "completed" for the open list.
events — gog calendar (alias: cal)
gog -a "$ACCT" --no-input -j calendar calendars
gog -a "$ACCT" --no-input -j calendar events --today
gog -a "$ACCT" --no-input -j calendar events <calId> --days 7
gog -a "$ACCT" --no-input -j calendar events --today --all
gog -a "$ACCT" --no-input calendar create <calId> --summary "..." --start ... --end ...
gog -a "$ACCT" --no-input calendar respond <calId> <eventId> --status accepted
gog -a "$ACCT" --no-input -j calendar freebusy --from now --to tomorrow
For an agenda, query each .selected==true calendar and label by calendar.
Skip .eventType == "workingLocation" (Home/Office markers) unless asked.
Show as HH:MM Summary (bare summary for all-day).
Gotcha: calendar events --all returns events without a usable
.calendarId — you can't attribute them to a calendar. To colour/group
by calendar (or restrict to visible ones), query each selected calendar id
individually instead of using --all.
chat — gog chat
gog -a "$ACCT" --no-input -j chat spaces list
gog -a "$ACCT" --no-input -j chat messages list <spaceId> --max 20
gog -a "$ACCT" --no-input chat messages send <spaceId> --text "..."
gog -a "$ACCT" --no-input chat dm send <userId|email> --text "..."
meet — gog meet (alias: meeting)
gog -a "$ACCT" --no-input -j meet create
gog -a "$ACCT" --no-input -j meet get <meeting-code>
gog -a "$ACCT" --no-input -j meet history <meeting-code>
and more
- contacts / people:
gog contacts list --max 20 -j, gog people me -j
- drive:
gog drive ls --max 20 -j, gog drive search "<query>" -j,
gog drive download <fileId>
- docs / sheets:
gog docs cat <docId> -j,
gog sheets get <sheetId> 'Sheet1!A1:D20' -j
- auth (read-only inspection):
gog auth status, gog auth doctor,
gog auth list — never print token values.
Gotcha (auth setup): gog needs an OAuth client JSON registered via
gog auth credentials <file> before it can refresh tokens — a stored
refresh token alone is not enough. The client must be a "Desktop app"
type (loopback redirect); a "Web application" client causes
Error 400: redirect_uri_mismatch at consent. This setup needs a human +
browser; an agent can diagnose with gog auth doctor but not complete it.
Output discipline
- Run with
-j, parse with jq, present a clean table/list to the user.
- Lead with the answer (e.g. "3 unread"), then details.
- For writes: show exactly what will change and get a yes before executing.
Related skills
When this skill is activated, check if the following companion skills are installed.
For any that are missing, mention them to the user and offer to install before proceeding
with the task.
No registry companions — gog is a self-contained Google Workspace playbook.
It pairs naturally with the host's gog-dashboard splashboard collector
(home/shell/gogcli), which surfaces the same data at shell startup.