Skip to main content

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/<folder-id>
gdrive ls --folder <folder-id>
gdrive ls

Upload a file:

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

Download a file:

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

Move a file to trash:

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

Output Formats

gdrive ls supports:

  • --output table (default)
  • --output json
  • --output csv --csv-path ./files.csv

gdrive upload supports:

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

Credentials Path

By default credentials are stored at:

  • ~/.config/gdrive-cli/credentials.json

Override with env vars:

  • GDRIVE_CONFIG_DIR
  • GDRIVE_CREDENTIALS_FILE

ADC Fallback (Optional)

If preferred, ADC via gcloud still works:

gcloud auth application-default login \
  --client-id-file=/absolute/path/to/client_secret.json \
  --scopes=https://www.googleapis.com/auth/cloud-platform,https://www.googleapis.com/auth/drive

Publishing

Build artifacts:

python -m build

Upload manually:

python -m twine upload dist/*

Metadata

Release files for google-drive-cli-for-agents 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for google-drive-cli-for-agents 0.1.1
File Size Uploaded Provenance Actions
google_drive_cli_for_agents-0.1.1.tar.gz 13.1 kB With provenance Details for google_drive_cli_for_agents-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for google-drive-cli-for-agents 0.1.1
File Interpreter ABI Platform Actions
google_drive_cli_for_agents-0.1.1-py3-none-any.whl Python 3 none any Details for google_drive_cli_for_agents-0.1.1-py3-none-any.whl

Total release size: 24.2 kB

Release files / google_drive_cli_for_agents-0.1.1.tar.gz

Download URL google_drive_cli_for_agents-0.1.1.tar.gz
Size 13.1 kB
Tags Source
SHA-256 checksum
How to use checksums
824b230844c003fbed5681b15d365cd62740289be135c5473bff8185afb2a276
BLAKE2b-256 checksum
How to use checksums
856507c03561d74948ccf7fbce443ed0e063913425fe5a286e4ca951788f8e5d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Release files / google_drive_cli_for_agents-0.1.1-py3-none-any.whl

Download URL google_drive_cli_for_agents-0.1.1-py3-none-any.whl
Size 11.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
815b07cc70c57871f0744c68c295454ceff7d317e9319ba4e432f58cc7566b0a
BLAKE2b-256 checksum
How to use checksums
ab95489ee38578eae9d9a5eae48874051d0e060d26e8912734dedcaa7d0f2a9d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

Security for google-drive-cli-for-agents 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for google_drive_cli_for_agents-0.1.1.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Feb 20, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page