Claude-skill-registry gdcli
Google Drive CLI for listing, searching, uploading, downloading, and sharing files and folders.
install
source · Clone the upstream repo
git clone https://github.com/majiayu000/claude-skill-registry
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/majiayu000/claude-skill-registry "$T" && mkdir -p ~/.claude/skills && cp -r "$T/skills/data/gdcli" ~/.claude/skills/majiayu000-claude-skill-registry-gdcli && rm -rf "$T"
manifest:
skills/data/gdcli/SKILL.mdsource content
Google Drive CLI
Command-line interface for Google Drive operations.
Installation
npm install -g @mariozechner/gdcli
Setup
Google Cloud Console (one-time)
- Create a new project (or select existing)
- Enable the Google Drive API
- Set app name in OAuth branding
- Add test users (all Gmail addresses you want to use)
- Create OAuth client:
- Click "Create Client"
- Application type: "Desktop app"
- Download the JSON file
Configure gdcli
First check if already configured:
gdcli accounts list
If no accounts, guide the user through setup:
- Ask if they have a Google Cloud project with Drive API enabled
- If not, walk them through the Google Cloud Console steps above
- Have them download the OAuth credentials JSON
- Run:
gdcli accounts credentials ~/path/to/credentials.json - Run:
(usegdcli accounts add <email>
for browserless OAuth)--manual
Usage
Run
gdcli --help for full command reference.
Common operations:
- List files/foldersgdcli <email> ls [folderId]
- List with Drive query filtergdcli <email> ls --query "<query>"
- Full-text content searchgdcli <email> search "<text>"
- Download a filegdcli <email> download <fileId> [destPath]
- Upload a filegdcli <email> upload <localPath> [--folder <folderId>]
- Create a foldergdcli <email> mkdir <name>
- Share publiclygdcli <email> share <fileId> --anyone
Search
Two different commands:
- Searches inside file contents (fullText)search "<text>"
- Filters by metadata (name, type, date, etc.)ls --query "<query>"
Use
for filename searches!ls --query
Query Syntax (for ls --query)
Format:
field operator value. Combine with and/or, group with ().
Operators:
=, !=, contains, <, >, <=, >=
Examples:
# By filename ls --query "name = 'report.pdf'" # exact match ls --query "name contains 'IMG'" # prefix match # By type ls --query "mimeType = 'application/pdf'" ls --query "mimeType contains 'image/'" ls --query "mimeType = 'application/vnd.google-apps.folder'" # folders # By date ls --query "modifiedTime > '2024-01-01'" # By owner/sharing ls --query "'me' in owners" ls --query "sharedWithMe" # Exclude trash ls --query "trashed = false" # Combined ls --query "name contains 'report' and mimeType = 'application/pdf'"
Ref: https://developers.google.com/drive/api/guides/ref-search-terms
Data Storage
- OAuth client credentials~/.gdcli/credentials.json
- Account tokens~/.gdcli/accounts.json
- Default download location~/.gdcli/downloads/