Google Drive Cli banner
NmadeleiDev NmadeleiDev

Google Drive Cli

Design community

Description

CLI for Google Drive. Design for convinient usage by LLMs / Coding Agents

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

google-drive-cli-for-agents

CLI for Google Drive using the official Google API Python client.

Features

  • OAuth login without mandatory gcloud
  • pipx-friendly install (gdrive available globally)
  • List folder contents via folder ID or folder link
  • Upload local files to a folder via folder ID or folder link
  • Download files via file ID or file link
  • Move files to trash via file ID or file link
  • Diagnostics with gdrive doctor

Install (Recommended)

python3 -m pip install --user pipx
python3 -m pipx ensurepath
pipx install google-drive-cli-for-agents

Verify:

gdrive --version

Upgrade:

pipx upgrade google-drive-cli-for-agents

Install From Source

Local development:

python3 -m venv .venv
source .venv/bin/activate
pip install -e ".[dev]"

Install via pipx from local clone:

pipx install -e /absolute/path/to/google-drive-cli

OAuth Setup

Create a Google OAuth client of type **Desktop app**, then run:

gdrive auth login --client-secret /absolute/path/to/client_secret.json

Readonly token:

gdrive auth login --readonly --client-secret /absolute/path/to/client_secret.json

Inspect local credentials:

gdrive auth whoami
gdrive doctor

Usage

List a folder (or root if omitted):

gdrive ls --folder https://drive.google.com/drive/folders/
gdrive ls --folder 
gdrive ls

Upload a file:

gdrive upload ./report.csv --folder 
gdrive upload ./report.csv --folder https://drive.google.com/drive/folders/

Download a file:

gdrive download --file 
gdrive download --file https://drive.google.com/file/d//view --output-path ./report.csv

Move a file to trash:

gdrive trash --file 
gdrive trash --file https://drive.google.com/file/d//view

Output Formats

`gdrive ls` supports:

  • --output table (default)
  • --output json
  • `--output