gdcli_skill

This skill helps you manage Google Drive from the command line, enabling listing, searching, uploading, downloading, and sharing files with ease.
  • JavaScript

217

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill badlogic/pi-skills --skill gdcli

  • SKILL.md3.0 KB

Overview

This skill provides a command-line interface for Google Drive to list, search, upload, download, create folders, and manage sharing. It streamlines Drive workflows for scripts and terminal-first users by exposing metadata queries, full-text search, and OAuth account management. The tool stores credentials and account tokens locally for repeated use.

How this skill works

Authenticate once with OAuth credentials from Google Cloud, then add one or more Gmail accounts to operate on. Commands use Drive API calls: ls supports metadata queries, search scans file contents, upload/download transfer file data, and share/mkdir manage permissions and folders. Configuration and tokens are stored under ~/.gdcli for reuse.

When to use it

  • Automating backups or transfers of files between local systems and Google Drive
  • Quickly listing or filtering Drive contents from the terminal using advanced query syntax
  • Searching inside documents and attachments without opening a browser
  • Scripting batch uploads, downloads, or permission changes for CI or cron jobs
  • Managing multiple Google accounts from a single CLI tool

Best practices

  • Create a Google Cloud project and enable the Drive API before configuring the CLI
  • Use the OAuth credentials JSON for desktop app flow and keep it outside version control
  • Prefer ls --query for filename and metadata filters; use search for full-text content
  • Exclude trashed items in queries (trashed = false) to avoid cluttered results
  • Use --manual for browserless environments and verify tokens under ~/.gdcli/accounts.json

Example use cases

  • List all PDFs modified after a date: gdcli <email> ls --query "mimeType = 'application/pdf' and modifiedTime > '2024-01-01'"
  • Find a phrase inside documents: gdcli <email> search "quarterly results"
  • Upload a build artifact to a project folder: gdcli <email> upload ./dist/app.zip --folder <folderId>
  • Download a file by ID to a specific path: gdcli <email> download <fileId> ./downloads/
  • Make a folder and share it publicly: gdcli <email> mkdir Reports && gdcli <email> share <fileId> --anyone

FAQ

Create a Google Cloud project, enable the Drive API, create a Desktop OAuth client, download the JSON, then run gdcli accounts credentials ~/path/to/credentials.json and add your account.

When should I use ls --query vs search?

Use ls --query for metadata and filename filtering (faster). Use search for full-text content searches inside documents.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational