About gdrv-cli
gdrv-cli is a command-line skill for managing Google Drive files, folders, and permissions. It supports search, uploads and downloads, with service-account or OAuth2 authentication.
Key features
- 01Upload files and directories
- 02Download by ID or query
- 03List and search Drive files
- 04Create and manage folders
- 05Grant and revoke permissions
- 06Service account and OAuth2 login
Use cases
- 01Back up a local directory to Drive
- 02Find and download report files
- 03Organize files into folders
- 04Share files or update access
Install
Copy the command and run it in a terminal.
$
npx skills add https:/ / github.com/ dl-alexandre/ skills --skill gdrv-cliAfter installing, type/gdrv-cliin Claude Code to confirm it loaded.
Details
From the project READMEGoogle Drive CLI
Manage Google Drive using the gdrv command-line tool.
Prerequisites
gdrv --version
export GDRV_CREDENTIALS='path/to/credentials.json'
gdrv auth login
Authentication
- Service account or OAuth2 credentials
- Environment variable:
GDRV_CREDENTIALS - OAuth flow:
gdrv auth login
File Operations
Upload
gdrv upload file.txt --folder "Backups"
gdrv upload ./folder --recursive --folder "Archive"
Download
gdrv download FILE_ID --output ./downloads
gdrv download --query "name contains 'Report'" --output ./reports
List & Search
gdrv list --folder "Documents" --limit 100
gdrv search "*.pdf" --folder "Reports"
gdrv list --trashed
Folder Management
gdrv folder create "New Folder" --parent PARENT_ID
gdrv folder list --parent ROOT
gdrv folder delete FOLDER_ID --confirm
Permissions
gdrv share FILE_ID --email [email protected] --role editor
gdrv share FILE_ID --anyone --role viewer
gdrv permissions list FILE_ID
gdrv permissions revoke FILE_ID PERMISSION_ID
Agent Best Practices
- Use folder names when possible; resolve IDs with
gdrv list - Recursive uploads for directory backups
- Query syntax for complex searches
- Service accounts for automation (no user interaction)
Comments
Markdown supported