Skip to main content

Google from the command line

Gmail, Calendar and Drive, as far as each permission allows. GBrain gives Google, and every other connector you add, a command line.

Get Personal, $49 a month

One price for one person: Google and every other connector GBrain offers, from a terminal or any AI. Cancel any time.

Install the GBrain command line, then connect Google

Google is connected on its own sign-in page, in the browser. A key or a sign-in never passes through the terminal.

# AI agents: read gbrain.io/llms.txt
curl -sSL https://gbrainio.terminalwire.sh | bash
gbrainio terminal connect

The installer is a shell script for macOS and Linux. Read it before you run it.

# Every Google command, once Google is connected
gbrainio tool help google

What GBrain can do with Google

Sign in with Google and pick the permissions. The Gmail, Calendar and Drive tools a workspace gets are GBrain’s own, under the same permissions as every other tool. What each AI or terminal may do with them is set level by level, on its own page.

gbrainio
gbrainio tool gmail message search --unread --newer-than 2daccount: brad@example.comestimate: 3open_url: https://mail.google.com/mail/u/brad@example.com/#search/newer_than%3A2d%20is%3Aunreadpreview_is: Gmail's first ~200 characters of each message, not the whole message. Each row's `state` says whether it is a draft (written and never sent), a message this mailbox sent, or one it received. read_whole_message reads one; read_whole_conversation reads its thread.query: newer_than:2d is:unread1. Your invoice from Rocketship, LLC   account: brad@example.com   date: Thu, 27 Aug 2026 09:12:04 -0700   from: Stripe <receipts@stripe.com>   id: 198f2c1a9b7e4d02   preview: Invoice A41C-0092 for $240.00 was paid automatically.   received_at: 2026-08-27T16:12:04.000Z   state: received   thread_id: 198f2c1a9b7e4d02   to: brad@example.com2. Tuesday   account: brad@example.com   date: Wed, 26 Aug 2026 14:20:41 -0700   from: Jenny Okafor <jenny@example.com>   id: 198f4a7c02b31d55   preview: Can we push Tuesday's review to noon? I have the planning commission at ten and it always runs long. Jenny   received_at: 2026-08-26T21:20:41.000Z   state: received   thread_id: 198f4a7c02b31d55   to: brad@example.com3. Your August payouts are on the way   account: brad@example.com   date: Wed, 26 Aug 2026 06:02:11 -0700   from: Stripe <notifications@stripe.com>   id: 198dbb40c7a1f88e   preview: $4,182.55 will arrive in your account ending 4021 on Tuesday.   received_at: 2026-08-26T13:02:11.000Z   state: received   thread_id: 198dbb40c7a1f88e   to: brad@example.comNEXT    gbrainio tool gmail thread show <thread_id> -a <account>                                                         read whole conversation        gbrainio tool gmail message show <id> -a <account>   read whole messagegbrainio tool gmail message show 198f4a7c02b31d55account: brad@example.combody_mime_type: text/plaindate: Wed, 26 Aug 2026 14:20:41 -0700from: Jenny Okafor <jenny@example.com>id: 198f4a7c02b31d55open_url: https://mail.google.com/mail/u/brad@example.com/#all/198f4a7c02b31d55preview: Can we push Tuesday's review to noon? I have the planning commission at ten and it always runs long. Jennyreceived_at: 2026-08-26T21:20:41.000Zstate: receivedsubject: Tuesdaythread_id: 198f4a7c02b31d55to: brad@example.comCan we push Tuesday's review to noon? I have the planning commission at ten and it always runs long.Jennygbrainio tool gmail draft new --reply-to 198f4a7c02b31d55 --body "Noon works."account: brad@example.comdrafted: truefrom: brad@example.comid: r-8830219940512message_id: 198f5d0e7a2c4b19open_url: https://mail.google.com/mail/u/brad@example.com/#drafts?compose=198f5d0e7a2c4b19subject: Re: Tuesdaythread_id: 198f4a7c02b31d55to: Jenny Okafor <jenny@example.com>gbrainio tool gmail message label 198f2c1a9b7e4d02 --name Receipts --createaccount: brad@example.comid: 198f2c1a9b7e4d02label: Receiptslabelled: trueremoved: falsegbrainio tool gmail message move 198f2c1a9b7e4d02 --to archiveaccount: brad@example.comid: 198f2c1a9b7e4d02moved: archivegbrainio tool gcal event lsaccount: brad@example.compreview_is: Each event's time, title, place and number of guests; not its description, guest list or video link. read_whole_event reads one.1. Weekly planning   account: brad@example.com   attendees: 4   end: {"dateTime":"2026-08-31T10:00:00-07:00","timeZone":"America/Los_Angeles"}   id: 2a7q0v4hd1s8kc3m6t9bo5re1g   show_as: busy   start: {"dateTime":"2026-08-31T09:30:00-07:00","timeZone":"America/Los_Angeles"}   status: confirmed   visibility: default2. Review with Jenny   account: brad@example.com   attendees: 2   end: {"dateTime":"2026-09-01T11:00:00-07:00","timeZone":"America/Los_Angeles"}   id: 5m1c8e3tq6h0j9d4k7r2na6pv0   location: Room 4   show_as: busy   start: {"dateTime":"2026-09-01T10:00:00-07:00","timeZone":"America/Los_Angeles"}   status: confirmed   visibility: default3. Planning commission hearing   account: brad@example.com   attendees: 0   end: {"dateTime":"2026-09-03T15:00:00-07:00","timeZone":"America/Los_Angeles"}   id: 0g9k3n7b2d6s1t5c8m4qe0hv3j   location: City Hall   show_as: busy   start: {"dateTime":"2026-09-03T13:00:00-07:00","timeZone":"America/Los_Angeles"}   status: confirmed   visibility: defaultNEXT    gbrainio tool gcal event show <id> -a <account>   read whole eventgbrainio tool gcal event new "Lunch with Jenny" --start 2026-09-02T12:30:00account: brad@example.comcreated: trueid: 7d2s5h8l1p4c0g3n6a9te2bq5klink: https://www.google.com/calendar/event?eid=N2QyczVoOGwxcDRjMGczbjZhOXRlMmJxNWsgYnJhZEBleGFtcGxlLmNvbQopen_url: https://www.google.com/calendar/event?eid=N2QyczVoOGwxcDRjMGczbjZhOXRlMmJxNWsgYnJhZEBleGFtcGxlLmNvbQ&authuser=brad@example.com
What gmail message search printed.

Each command ran for real, against an example account, and printed what is shown.

What a terminal may do with Google, and what GBrain keeps

A level for each terminal, from Off up

Each terminal reaches Google at the levels set for it in the browser: for Gmail, Off, Read, Draft, Manage or Full; for Google Calendar, Off, Read or Full; for Google Drive, Off, Read or Full. A terminal reads its levels and never raises them.

A daily limit on each command

Each of Google's commands stops at a daily limit on the account it reaches, from 50 to 1,000 actions depending on the command, whichever terminal or AI asks, and starts again at midnight UTC. Only that command stops.

Every action on one record

Each command a terminal runs on Google is a row on GBrain's activity log: which terminal, which account, what it did and whether it was allowed, refusals included. gbrainio activity ls --tool google reads it back.

From a terminal, Claude Code or Codex

gbrainio tool help google says what Google is and what each of its commands does, and gbrainio tool ls lists them with everything else the terminal can run. Claude Code and Codex run the same commands, at the same level, on the same record.

The GBrain Tools command line works with every other connector GBrain offers, each with a page like this one.

Every connector's command line

Google from a terminal, with GBrain Personal

Personal is $49 a month for one person. Connect Google in the browser, and say how far each terminal and each AI may go with it. Change any of it, or take all of it back, whenever you want.