google-drive-automation by sickn33/antigravity-awesome-skills
npx skills add https://github.com/sickn33/antigravity-awesome-skills --skill google-drive-automation轻量级 Google Drive 集成,具备独立的 OAuth 身份验证。无需 MCP 服务器。提供完整的读写权限。
需要 Google Workspace 账户。 不支持个人 Gmail 账户。
使用 Google 进行身份验证(会打开浏览器):
python scripts/auth.py login
检查身份验证状态:
python scripts/auth.py status
需要时注销:
python scripts/auth.py logout
所有操作均通过 scripts/drive.py 进行。首次使用时若未登录,将自动进行身份验证。
# 搜索文件(全文搜索)
python scripts/drive.py search "quarterly report"
# 仅按标题搜索
python scripts/drive.py search "title:budget"
# 使用 Google Drive URL 搜索(自动提取 ID)
python scripts/drive.py search "https://drive.google.com/drive/folders/1ABC123..."
# 搜索与您共享的文件
python scripts/drive.py search --shared-with-me
# 带分页的搜索
python scripts/drive.py search "report" --limit 5 --page-token "..."
# 通过精确名称查找文件夹
python scripts/drive.py find-folder "Project Documents"
# 列出根目录 Drive 中的文件
python scripts/drive.py list
# 列出特定文件夹中的文件
python scripts/drive.py list 1ABC123xyz --limit 20
# 下载文件
python scripts/drive.py download 1ABC123xyz ./downloads/report.pdf
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
# 上传文件到 Drive 根目录
python scripts/drive.py upload ~/Documents/report.pdf
# 上传到特定文件夹
python scripts/drive.py upload ~/Documents/report.pdf --folder 1ABC123xyz
# 使用自定义名称上传
python scripts/drive.py upload ~/Documents/report.pdf --name "Q4 Report.pdf"
# 创建新文件夹
python scripts/drive.py create-folder "Project Documents"
# 在另一个文件夹内创建文件夹
python scripts/drive.py create-folder "Attachments" --parent 1ABC123xyz
# 将文件移动到不同的文件夹
python scripts/drive.py move FILE_ID DESTINATION_FOLDER_ID
# 复制文件
python scripts/drive.py copy FILE_ID
python scripts/drive.py copy FILE_ID --name "Report Copy" --folder 1ABC123xyz
# 重命名文件或文件夹
python scripts/drive.py rename FILE_ID "New Name.pdf"
# 将文件移至回收站
python scripts/drive.py trash FILE_ID
搜索命令支持多种查询格式:
| 格式 | 示例 | 描述 |
|---|---|---|
| 全文 | "quarterly report" | 搜索文件内容和名称 |
| 标题 | "title:budget" | 仅搜索文件名 |
| URL | https://drive.google.com/... | 提取并使用文件/文件夹 ID |
| 文件夹 ID | 1ABC123... | 列出文件夹内容(25+ 字符的 ID) |
| 原生查询 | mimeType='application/pdf' | 直接传递 Drive 查询语法 |
Google Drive 使用长 ID,例如 1ABC123xyz_-abc123。可从以下位置获取 ID:
search 结果find-folder 结果list 结果令牌使用系统密钥环安全存储:
服务名称:google-drive-skill-oauth
使用 Google 的云函数自动刷新过期的令牌。
每周安装数
97
代码仓库
GitHub 星标数
27.1K
首次出现
2026年2月9日
安全审计
安装于
opencode96
codex96
gemini-cli94
github-copilot93
cursor93
amp92
Lightweight Google Drive integration with standalone OAuth authentication. No MCP server required. Full read/write access.
Requires Google Workspace account. Personal Gmail accounts are not supported.
Authenticate with Google (opens browser):
python scripts/auth.py login
Check authentication status:
python scripts/auth.py status
Logout when needed:
python scripts/auth.py logout
All operations via scripts/drive.py. Auto-authenticates on first use if not logged in.
# Search for files (full-text search)
python scripts/drive.py search "quarterly report"
# Search by title only
python scripts/drive.py search "title:budget"
# Search using Google Drive URL (extracts ID automatically)
python scripts/drive.py search "https://drive.google.com/drive/folders/1ABC123..."
# Search files shared with you
python scripts/drive.py search --shared-with-me
# Search with pagination
python scripts/drive.py search "report" --limit 5 --page-token "..."
# Find a folder by exact name
python scripts/drive.py find-folder "Project Documents"
# List files in root Drive
python scripts/drive.py list
# List files in a specific folder
python scripts/drive.py list 1ABC123xyz --limit 20
# Download a file
python scripts/drive.py download 1ABC123xyz ./downloads/report.pdf
# Upload a file to Drive root
python scripts/drive.py upload ~/Documents/report.pdf
# Upload to a specific folder
python scripts/drive.py upload ~/Documents/report.pdf --folder 1ABC123xyz
# Upload with a custom name
python scripts/drive.py upload ~/Documents/report.pdf --name "Q4 Report.pdf"
# Create a new folder
python scripts/drive.py create-folder "Project Documents"
# Create a folder inside another folder
python scripts/drive.py create-folder "Attachments" --parent 1ABC123xyz
# Move a file to a different folder
python scripts/drive.py move FILE_ID DESTINATION_FOLDER_ID
# Copy a file
python scripts/drive.py copy FILE_ID
python scripts/drive.py copy FILE_ID --name "Report Copy" --folder 1ABC123xyz
# Rename a file or folder
python scripts/drive.py rename FILE_ID "New Name.pdf"
# Move a file to trash
python scripts/drive.py trash FILE_ID
The search command supports multiple query formats:
| Format | Example | Description |
|---|---|---|
| Full-text | "quarterly report" | Searches file contents and names |
| Title | "title:budget" | Searches file names only |
| URL | https://drive.google.com/... | Extracts and uses file/folder ID |
| Folder ID | 1ABC123... | Lists folder contents (25+ char IDs) |
| Native query | mimeType='application/pdf' |
Google Drive uses long IDs like 1ABC123xyz_-abc123. Get IDs from:
search resultsfind-folder resultslist resultsTokens stored securely using the system keyring:
Service name: google-drive-skill-oauth
Automatically refreshes expired tokens using Google's cloud function.
Weekly Installs
97
Repository
GitHub Stars
27.1K
First Seen
Feb 9, 2026
Security Audits
Gen Agent Trust HubWarnSocketPassSnykFail
Installed on
opencode96
codex96
gemini-cli94
github-copilot93
cursor93
amp92
Azure 升级评估与自动化工具 - 轻松迁移 Functions 计划、托管层级和 SKU
104,900 周安装
Gmail自动化指南:使用Rube MCP和Composio实现邮件发送、回复、搜索与标签管理
173 周安装
Microsoft Ads 深度分析与优化指南:账户审计、Copilot 集成与独有功能
179 周安装
ISO 13485质量文档管理系统:编号、审批、变更控制与21 CFR Part 11合规指南
173 周安装
OAuth 2.1 迁移指南与安全最佳实践 | 认证安全专家详解
70 周安装
LatchBio集成指南:Python生物信息学无服务器工作流开发与部署
177 周安装
ISO 14971:2019 医疗器械风险管理专家指南 | 全生命周期风险分析、评估与控制
174 周安装
| Pass-through Drive query syntax |