Skip to content
alyn
badlogic

Gdcli skill

Google Drive CLI for listing, searching, uploading, downloading, and sharing files and folders.

$npx skills add badlogic/pi-skills --skill gdcli
View this skill on GitHubbadlogic/pi-skills/gdcli/SKILL.md
Pack stars
2,655
Pack installs
4.2k
Alyn Score
48/99
Updated
5 months ago
License
MIT
– views – installs via Alyn

badlogic

Gdcli

Install Gdcli

Pick your agent. Every command is ready to paste.

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

The open skills CLI detects your agents (Claude Code, Cursor, Codex and 70+ more) and installs to the right folder. Add -g to install globally.

01

Install it

Run the command above, or upload the folder in Claude.

02

Ask naturally

Describe the task. Your agent loads gdcli when the request matches its description.

03

Name it if needed

If it does not trigger, say “use the gdcli skill”. In Codex, type $gdcli.

The skill itself

SKILL.md

FolderGitHub

Google Drive CLI

Command-line interface for Google Drive operations.

Installation

npm install -g @mariozechner/gdcli

Setup

Google Cloud Console (one-time)

  1. Create a new project (or select existing)
  2. Enable the Google Drive API
  3. Set app name in OAuth branding
  4. Add test users (all Gmail addresses you want to use)
  5. 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:

  1. Ask if they have a Google Cloud project with Drive API enabled
  2. If not, walk them through the Google Cloud Console steps above
  3. Have them download the OAuth credentials JSON
  4. Run: gdcli accounts credentials ~/path/to/credentials.json
  5. Run: gdcli accounts add <email> (use --manual for browserless OAuth)

Usage

Run gdcli --help for full command reference.

Common operations:

  • gdcli <email> ls [folderId] - List files/folders
  • gdcli <email> ls --query "<query>" - List with Drive query filter
  • gdcli <email> search "<text>" - Full-text content search
  • gdcli <email> download <fileId> [destPath] - Download a file
  • gdcli <email> upload <localPath> [--folder <folderId>] - Upload a file
  • gdcli <email> mkdir <name> - Create a folder
  • gdcli <email> share <fileId> --anyone - Share publicly

Two different commands:

  • search "<text>" - Searches inside file contents (fullText)
  • ls --query "<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
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

  • ~/.gdcli/credentials.json - OAuth client credentials
  • ~/.gdcli/accounts.json - Account tokens
  • ~/.gdcli/downloads/ - Default download location

Tips for Gdcli

  • • Start a fresh session after installing so your agent picks up the new skill.
  • • It is part of a pack with 8 skills. Install only the ones you need with --skill to keep triggers precise.
  • • If two skills overlap, mention the one you want by name.

Questions about Gdcli

What does the Gdcli skill do?

Google Drive CLI for listing, searching, uploading, downloading, and sharing files and folders.

How do I install Gdcli?

Run "npx skills add badlogic/pi-skills --skill gdcli" in your project. The skills CLI installs it for Claude Code, Cursor, Codex and 70+ other agents. In Claude on the web, upload the skill folder as a ZIP under Customize > Skills.

Does Gdcli work in Cursor and Codex?

Yes. Gdcli uses the open SKILL.md format, so it works in Claude Code, Claude, Cursor, OpenAI Codex, Gemini CLI, GitHub Copilot and other agents that support agent skills.

Is Gdcli free?

Gdcli is open source on GitHub under the MIT license. It is free to install; check the license before commercial use.

Who made Gdcli?

Gdcli is published by badlogic in the badlogic/pi-skills repository, together with 7 other skills.

Similar skills. From other creators.