app
Adom Google
Public Made by Adomby adom
Drive your whole Google Workspace from the terminal, run by your AI. Read Gmail, write Google Docs, build Google Sheets and Google Slides, search Google Drive, manage Google Calendar and Google Tasks, and post to Google Chat, plus any Google API and a zero-setup personal Gmail.
← Commit history
v0.2.1 β per-app recipe prompts (incl. YouTube 3D board walkthrough upload), --upload-file for binary uploads, dark-mode console + chat screenshots
5 files changed
+91−5
README.md+82−1@@ -126,12 +126,93 @@ granted plus your own Google permissions (admin APIs only work for admins). ### See it in action Read from one app, write to another β in a single flow. Here your AI reads an invoice-attachment out of **Gmail** and posts the total straight into a **Google Chat** space:+attachment out of **Gmail** and posts a summary straight into a **Google Chat** space:  --- +## Recipes β one prompt per app++Talk to your AI in plain English. Each line below is something you'd actually *say*; under it+is the `adom-google` call your agent runs to make it happen. Everything not shown is still one+`api` call away.++**π§ Gmail** β *"Grab the invoice PDF from that email and save it."*+```bash+adom-google gmail attachments <messageId> # list parts+adom-google gmail read <messageId> <attId> -o invoice.pdf+```++**π€ Contacts** β *"Save this new fab vendor; put the portal login in the notes."*+```bash+adom-google contacts create --name "Jane Fab" --org "Fab Co" --notes "portal login in 1Password"+```++**π Calendar** β *"Put a Rev C bring-up on my calendar Tuesday 2pm and invite the team."*+```bash+adom-google api -X POST "https://www.googleapis.com/calendar/v3/calendars/primary/events?sendUpdates=all" \+ -d '{"summary":"Rev C bring-up","start":{"dateTime":"2026-06-23T14:00:00","timeZone":"America/Chicago"},+ "end":{"dateTime":"2026-06-23T15:00:00","timeZone":"America/Chicago"},+ "attendees":[{"email":"[email protected]"}]}'+```++**β Tasks** β *"Add 'order solder stencil' to my list."*+```bash+adom-google api -X POST "https://tasks.googleapis.com/tasks/v1/lists/@default/tasks" \+ -d '{"title":"Order solder stencil"}'+```++**π¬ Chat** β *"Tell the Hardware space the boards shipped."*+```bash+adom-google api -X POST "https://chat.googleapis.com/v1/spaces/<spaceId>/messages" \+ -d '{"text":"Rev C boards shipped π"}'+```++**π Drive** β *"Find every Gerber zip, then upload my new one."*+```bash+adom-google api "https://www.googleapis.com/drive/v3/files" -q q="name contains 'gerber'"+adom-google api -X POST "https://www.googleapis.com/upload/drive/v3/files?uploadType=media" \+ --upload-file rev-c-gerbers.zip --content-type application/zip+```++**π Sheets** β *"Make a Rev C BOM and drop in the first rows."*+```bash+adom-google api -X POST "https://sheets.googleapis.com/v4/spreadsheets" -d '{"properties":{"title":"Rev C BOM"}}'+adom-google api -X PUT "https://sheets.googleapis.com/v4/spreadsheets/<id>/values/A1?valueInputOption=RAW" \+ -d '{"values":[["Ref","Part","Qty"],["C1","100nF 0402","12"]]}'+```++**π Docs** β *"Start a bring-up checklist doc."*+```bash+adom-google api -X POST "https://docs.googleapis.com/v1/documents" -d '{"title":"Rev C bring-up checklist"}'+```++**π½ Slides** β *"Spin up a board-review deck."*+```bash+adom-google api -X POST "https://slides.googleapis.com/v1/presentations" -d '{"title":"Rev C board review"}'+```++**βΆ YouTube** β *"Upload the 3D walkthrough of my latest circuit board as unlisted."* π¬+```bash+# 1) start a resumable upload with the metadata β returns an upload URL in the Location header+adom-google api -X POST \+ "https://www.googleapis.com/upload/youtube/v3/videos?uploadType=resumable&part=snippet,status" \+ -d '{"snippet":{"title":"Rev C β 3D board walkthrough",+ "description":"Flythrough rendered from the tscircuit / chipfit 3D viewer"},+ "status":{"privacyStatus":"unlisted"}}'++# 2) PUT the rendered .mp4 to that upload URL β binary body via --upload-file+adom-google api -X PUT "<upload-url>" --upload-file board-walkthrough.mp4 --content-type video/mp4+```+> The YouTube recipe needs the **YouTube Data API v3** enabled and the `youtube.upload` scope on+> your client (it rides the very same gateway). Pair it with the tscircuit/chipfit 3D viewer's+> recording and a board becomes a shareable flythrough on YouTube in two commands.++**β¦anything else** β Forms, Apps Script, Photos, Admin SDK, Maps β same pattern: `adom-google api <url>`.++---+ ## Commands ```bash
bin/adom-google+8−3@@ -431,9 +431,12 @@ def cmd_api(a): url = a.url if a.url.startswith("http") else "https://" + a.url.lstrip("/") headers = {"Authorization": f"Bearer {_access_token(cfg)}"} body = None- if a.data is not None:- body = open(a.data[1:]).read() if a.data.startswith("@") else a.data- headers["Content-Type"] = "application/json"+ if getattr(a, "upload_file", None):+ body = open(a.upload_file, "rb").read() # raw bytes: Drive media, YouTube resumable PUT, etc.+ headers["Content-Type"] = a.content_type or "application/octet-stream"+ elif a.data is not None:+ body = open(a.data[1:], "rb").read() if a.data.startswith("@") else a.data+ headers["Content-Type"] = a.content_type or "application/json" params = dict(q.split("=", 1) for q in (a.query or [])) r = requests.request(a.method.upper(), url, headers=headers, params=params or None, data=body, timeout=120)@@ -759,6 +762,8 @@ def main(): x.add_argument("-d", "--data", help="JSON body string, or @file") x.add_argument("-q", "--query", action="append", help="key=value query param (repeatable)") x.add_argument("--raw", action="store_true", help="print raw bytes (don't pretty-print JSON)")+ x.add_argument("--upload-file", dest="upload_file", help="send a file's raw bytes as the body (binary uploads: Drive media, YouTube resumable PUT)")+ x.add_argument("--content-type", dest="content_type", help="override Content-Type (e.g. video/mp4)") x.set_defaults(fn=cmd_api) sub.add_parser("help")
docs/chat-reads-email.png⋯ 1 unchanged line ⋯
docs/enable-apis.png⋯ 1 unchanged line ⋯
package.json+1−1@@ -1,6 +1,6 @@ { "slug": "adom-google",- "version": "0.2.0",+ "version": "0.2.1", "type": "app", "description": "Drive your whole Google Workspace from the terminal \u2014 Gmail, Contacts, Drive, Sheets, Docs, Slides, Calendar, Tasks, Google Chat, plus a generic `api` passthrough to hit ANY Google API. One-click OAuth via the Adom token-broker gateway (no client secret on your machine). On first run it asks each user to choose safe mode (no delete) or full mode (incl. delete).", "install": {