Install
$ agentstack add skill-maxandersen-skills-jgdcli ✓ scanned · ✓ verified — works with Claude Code, Cursor, and more.
Security review
✓ PassedNo issues found. Passed automated security review. · v0.1.0 How review works →
- ✓ Prompt-injection patterns
- ✓ Secret / credential exfiltration
- ✓ Dangerous shell & filesystem operations
- ✓ Untrusted network calls
- ✓ Known-malicious package signatures
What it can access
- ✓ Network access No
- ✓ Filesystem access No
- ✓ Shell / process execution No
- ✓ Environment & secrets No
- ✓ Dynamic code execution No
From automated source analysis of v0.1.0. “Used” means the capability is present in the source — more access means more to trust, not that it’s unsafe.
About
Google Drive CLI (Java)
Command-line interface for Google Drive operations. Java port of gdcli.
Source: https://github.com/maxandersen/jgdcli
Installation
Option 1: Run directly with JBang (no install)
jbang jgdcli@maxandersen/skills --help
Option 2: Install as command
jbang app install jgdcli@maxandersen/skills
jgdcli --help
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 jgdcli
First check if already configured:
jgdcli 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:
jgdcli accounts credentials ~/path/to/credentials.json - Run:
jgdcli accounts add(use--manualfor browserless OAuth)
Shared Credentials
Credentials in ~/.jgcli/ are shared across jgccli, jgmcli, and jgdcli. Set up once, use with all three.
For separate credentials, use named credentials:
jgdcli accounts credentials ~/work-creds.json --name work
jgdcli accounts add work@company.com --credentials work
Usage
Run jgdcli --help for full command reference.
Common operations:
jgdcli ls [folderId]- List files/foldersjgdcli ls --query ""- List with Drive query filterjgdcli search ""- Full-text content searchjgdcli download [destPath]- Download a filejgdcli upload [--folder ]- Upload a filejgdcli mkdir- Create a folderjgdcli share --anyone- Share publicly
Search
Two different commands:
search ""- Searches inside file contents (fullText)ls --query ""- Filters by metadata (name, type, date, etc.)
Use ls --query for filename searches!
Query Syntax (for ls --query)
Format: field operator value. Combine with and/or, group with ().
Operators: =, !=, contains, `, =`
Examples:
# By filename
jgdcli ls --query "name = 'report.pdf'" # exact match
jgdcli ls --query "name contains 'IMG'" # prefix match
# By type
jgdcli ls --query "mimeType = 'application/pdf'"
jgdcli ls --query "mimeType contains 'image/'"
jgdcli ls --query "mimeType = 'application/vnd.google-apps.folder'" # folders
# By date
jgdcli ls --query "modifiedTime > '2024-01-01'"
# By owner/sharing
jgdcli ls --query "'me' in owners"
jgdcli ls --query "sharedWithMe"
# Exclude trash
jgdcli ls --query "trashed = false"
# Combined
jgdcli ls --query "name contains 'report' and mimeType = 'application/pdf'"
Ref: https://developers.google.com/drive/api/guides/ref-search-terms
Data Storage
~/.jgcli/credentials.json- OAuth client credentials (shared with jgccli, jgmcli)~/.jgcli/accounts-drive.json- Account tokens~/.jgcli/downloads/- Default download location
Source & license
This open-source skill is cataloged on AgentStack and links to its original source — we do not rehost the code.
- Author: maxandersen
- Source: maxandersen/skills
- License: MIT
Install and usage instructions live in the source repository linked above.
Reviews
No reviews yet — be the first.
Write a review
Versions
- v0.1.0 Imported from the upstream source.