Skip to main content

Google Drive from the command line

Find, read and change documents, and export any document as a PDF. GBrain gives Google Drive, and every other connector you add, a command line.

Get Personal, $49 a month

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

Install the GBrain command line, then connect Google Drive

Install, connect the terminal, then connect Google Drive. Each step after the install opens a browser tab, does one thing, and hands the terminal back.

# 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.

# Connect your Google Drive account
gbrainio tool gdrive open

# Turn Google Drive on for the terminal
gbrainio terminal open

What GBrain can do with Google Drive

Drive has two levels: read what is there, or change it. Read finds a file, reads it as text and downloads it, and a PDF, a Word file or a spreadsheet reads too, because Google converts it on the way through. Manage adds writing, copying, the Trash and sharing, and a share stops and asks before it hands anything to anyone.

gbrainio
gbrainio tool gdriveFind, read, change and export documents.USAGE  gbrainio tool gdrive <command> [arguments]COMMANDS  file     ls, show, new, edit, search, trash, restore, upload, export, append,…  share    ls, new, rm  folder   new  doc      edit  comment  ls, new, edit, rm, reply, resolve  open     Open its page in the browserLEARN MORE  gbrainio tool gdrive <command> -h  What one command takes  https://gbrain.io/docs/tools       The manualgbrainio tool gdrive fileFiles in your Drive.USAGE  gbrainio tool gdrive file <command> [arguments]COMMANDS  ls       See a folder  show     See a file's details  new      Create a file  edit     Change a file  search   Find your files  trash    Move a file to the Trash  restore  Restore a file  upload   Upload a file  export   Download a file  append   Add to a document  copy     Copy a file  read     Read a fileLEARN MORE  gbrainio tool gdrive file <command> -h  What one command takes  https://gbrain.io/docs/tools            The manual
Every Google Drive command, by the kind of thing it works on.

The page and the CLI print these from the same code, so they are what the CLI answers today.

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

A level for each terminal, from Off up

Each terminal reaches Google Drive at the level set for it in the browser: Off, Read or Full. A terminal reads its level and never raises it.

A daily limit on each command

Each of Google Drive'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 Drive 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 gdrive reads it back.

From a terminal, Claude Code or Codex

gbrainio tool help gdrive says what Google Drive 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 Drive from a terminal, with GBrain Personal

Personal is $49 a month for one person. Connect Google Drive 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.