Skip to main content

Google Drive

Google Drive from the command line.

Find a document, read it, change it, and get it back as a PDF.

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.

Four commands

Each of the last three opens a browser tab, does one thing, and hands the terminal back.

curl -sSL https://gbrainio.terminalwire.sh | bash   # install it
gbrainio terminal connect                           # set the terminal up and connect it
gbrainio tool gdrive open                           # connect the account
gbrainio terminal open                              # turn Google Drive on for the terminal

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

Every Google Drive command

This is gbrainio tool gdrive, run for real. The page and the CLI print from the same code, so the cheatsheet is what the CLI answers to today.

gbrainio tool gdrive
Find, read, change and export documents.

USAGE
  gbrainio tool gdrive <command> [arguments]

COMMANDS
  file     ls, show, new, edit, search, trash, restore, upload, export, append,…
  folder   new
  share    ls, new, rm
  comment  ls, new, edit, rm, reply, resolve
  open     Open its page in the browser

LEARN MORE
  gbrainio tool gdrive <command> -h  What one command takes
  https://gbrain.io/docs/tools       The manual
gbrainio tool gdrive file
Files 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 file

LEARN MORE
  gbrainio tool gdrive file <command> -h  What one command takes
  https://gbrain.io/docs/tools            The manual
gbrainio tool gdrive share
Who a file is shared with.

USAGE
  gbrainio tool gdrive share <command> [arguments]

COMMANDS
  ls   See who can reach a file
  new  Share a file
  rm   Stop sharing a file

LEARN MORE
  gbrainio tool gdrive share <command> -h  What one command takes
  https://gbrain.io/docs/tools             The manual
gbrainio tool gdrive folder
Folders in your Drive.

USAGE
  gbrainio tool gdrive folder <command> [arguments]

COMMANDS
  new  Create a folder

LEARN MORE
  gbrainio tool gdrive folder <command> -h  What one command takes
  https://gbrain.io/docs/tools              The manual
gbrainio tool gdrive comment
Comments on a file.

USAGE
  gbrainio tool gdrive comment <command> [arguments]

COMMANDS
  ls       Read comments
  new      Comment on a file
  edit     Edit your comment
  rm       Delete your comment
  reply    Reply to a comment
  resolve  Resolve a comment

LEARN MORE
  gbrainio tool gdrive comment <command> -h
                                            What one command takes
  https://gbrain.io/docs/tools              The manual

Same tools, any assistant

Claude Code, Cursor and Codex reach the same Google Drive through MCP, on the same permission and the same record.

Google Drive over MCP

How the whole thing fits

One permission, one daily ceiling, one record, across every client that asks.

Tools