Upload, download, search, and share files on Google Drive. Create folders and manage permissions. Use when asked to share a file, upload to gdrive, search cloud storage, manage a Drive folder, or organize Google Drive files.
94
Quality
94%
Does it follow best practices?
Impact
Pending
No eval scenarios have been run
Full argument details and examples for all google-drive commands.
Verify configuration and connectivity.
$SKILL_DIR/scripts/google-drive.py checkThis validates:
Store OAuth 2.0 client credentials for custom OAuth flow.
$SKILL_DIR/scripts/google-drive.py auth setup \
--client-id YOUR_CLIENT_ID \
--client-secret YOUR_CLIENT_SECRETCredentials are saved to ~/.config/agent-skills/google-drive.yaml.
Clear stored OAuth token. The next command that needs authentication will trigger re-authentication automatically.
$SKILL_DIR/scripts/google-drive.py auth resetUse this when you encounter scope or authentication errors.
Show current OAuth token information without making API calls.
$SKILL_DIR/scripts/google-drive.py auth statusDisplays: whether a token is stored, granted scopes, refresh token presence, token expiry, and client ID.
List files in your Drive.
# List recent files
$SKILL_DIR/scripts/google-drive.py files list
# List with search query
$SKILL_DIR/scripts/google-drive.py files list --query "name contains 'report'"
# List with max results
$SKILL_DIR/scripts/google-drive.py files list --max-results 20
# List sorted by name
$SKILL_DIR/scripts/google-drive.py files list --order-by "name"Arguments:
--query: Drive search query (optional)--max-results: Maximum number of results (default: 10)--order-by: Sort order (default: "modifiedTime desc")Search for files with filters.
# Search by name
$SKILL_DIR/scripts/google-drive.py files search --name "quarterly report"
# Search by MIME type
$SKILL_DIR/scripts/google-drive.py files search --mime-type "application/pdf"
# Search in a specific folder
$SKILL_DIR/scripts/google-drive.py files search --folder FOLDER_ID
# Combine filters
$SKILL_DIR/scripts/google-drive.py files search --name "budget" --mime-type "application/vnd.google-apps.spreadsheet"Arguments:
--name: File name to search for (partial match)--mime-type: MIME type filter--folder: Parent folder IDGet file metadata by ID.
# Get file details
$SKILL_DIR/scripts/google-drive.py files get FILE_IDArguments:
file_id: The file ID (required)Download a file from Google Drive.
# Download a file
$SKILL_DIR/scripts/google-drive.py files download FILE_ID --output /path/to/local/file
# Short form
$SKILL_DIR/scripts/google-drive.py files download FILE_ID -o ./downloaded-file.pdfArguments:
file_id: The file ID (required)--output, -o: Output file path (required)Note: Google Docs, Sheets, and Slides cannot be downloaded directly. Use the Google Drive web interface to export them.
Upload a file to Google Drive.
# Upload a file
$SKILL_DIR/scripts/google-drive.py files upload /path/to/file.pdf
# Upload to a specific folder
$SKILL_DIR/scripts/google-drive.py files upload /path/to/file.pdf --parent FOLDER_ID
# Upload with custom name
$SKILL_DIR/scripts/google-drive.py files upload /path/to/file.pdf --name "Quarterly Report 2024"
# Upload with specific MIME type
$SKILL_DIR/scripts/google-drive.py files upload /path/to/file --mime-type "text/csv"Arguments:
path: Local file path (required)--parent: Parent folder ID--mime-type: MIME type (auto-detected if not provided)--name: Name for the file in DriveMove a file to a different folder.
# Move a file to a folder
$SKILL_DIR/scripts/google-drive.py files move FILE_ID --parent FOLDER_IDArguments:
file_id: The file ID (required)--parent: Destination folder ID (required)Create a new folder.
# Create folder in root
$SKILL_DIR/scripts/google-drive.py folders create "New Folder"
# Create folder inside another folder
$SKILL_DIR/scripts/google-drive.py folders create "Subfolder" --parent FOLDER_IDArguments:
name: Folder name (required)--parent: Parent folder IDList contents of a folder.
# List folder contents
$SKILL_DIR/scripts/google-drive.py folders list FOLDER_ID
# List with max results
$SKILL_DIR/scripts/google-drive.py folders list FOLDER_ID --max-results 50Arguments:
folder_id: The folder ID (required)--max-results: Maximum number of results (default: 100)Share a file with a user.
# Share as reader (default)
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email user@example.com
# Share as writer
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email user@example.com --role writer
# Share as commenter
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email user@example.com --role commenter
# Share without sending notification
$SKILL_DIR/scripts/google-drive.py share FILE_ID --email user@example.com --no-notifyArguments:
file_id: File ID to share (required)--email: Email address to share with (required)--role: Permission role - reader, writer, commenter, owner (default: reader)--no-notify: Don't send notification emailList permissions for a file.
# List permissions
$SKILL_DIR/scripts/google-drive.py permissions list FILE_IDArguments:
file_id: The file ID (required)Remove a permission from a file.
# Delete a permission
$SKILL_DIR/scripts/google-drive.py permissions delete FILE_ID PERMISSION_IDArguments:
file_id: The file ID (required)permission_id: The permission ID to delete (required)Install with Tessl CLI
npx tessl i odyssey4me/google-drive@0.1.2