google-drive
Upload, download, and manage files in Google Drive via the Drive API using curl.
来源信息
- 仓库
- ThinkfleetAI/thinkfleet-engine
- 最近来源活动
- 2026年2月1日 16:21
- 检测到的 SKILL.md 语言
- 英语
- 星标
- 0
- Forks
- 0
安装方式
默认使用会先检查来源的 Prompt;你也可以切换为直接命令,或下载本地副本。
检查来源文件
决定是否安装前,请先阅读 SKILL.md,以及 SkillsMP 当前展示的配套文件。
正在显示 SKILL.md
SKILL.md
来源说明 · 只读预览- name
- google-drive
- description
- Upload, download, and manage files in Google Drive via the Drive API using curl.
- metadata
- {"thinkfleetbot":{"emoji":"📁","requires":{"bins":"[Truncated]","env":"[Truncated]"}}}
# Google Drive
File operations via Google Drive API v3.
## Environment Variables
- `GOOGLE_ACCESS_TOKEN` - OAuth2 access token with `drive` scope
## List files
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://www.googleapis.com/drive/v3/files?pageSize=10&fields=files(id,name,mimeType,modifiedTime)" \
| jq '.files[]'
```
## Download a file
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://www.googleapis.com/drive/v3/files/FILE_ID?alt=media" -o /tmp/downloaded-file
```
## Upload a file
```bash
curl -s -X POST \
-H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
-F "metadata={\"name\":\"myfile.txt\"};type=application/json;charset=UTF-8" \
-F "file=@/tmp/myfile.txt" \
"https://www.googleapis.com/upload/drive/v3/files?uploadType=multipart" \
| jq '{id, name}'
```
## Search files
```bash
curl -s -H "Authorization: Bearer $GOOGLE_ACCESS_TOKEN" \
"https://www.googleapis.com/drive/v3/files?q=name%20contains%20'report'&fields=files(id,name)" \
| jq '.files[]'
```
## Notes
- For large files (>5MB), use resumable upload.
- Always confirm before deleting files.
在 GitHub 查看