antigravity-gdrive-sync
Syncs local project and conversation folders to Google Drive through rclone, supporting per-conversation or per-project upload modes, dry-run previews, canceled/interrupted syncs, live progress bars with ETA and transfer speed, per-file progress, and remaining Drive quota display. Uses one-way sync with a backup directory so overwritten or deleted cloud files are archived under a timestamped _archive path instead of being lost.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
Antigravity Google Drive 云同步插件 (antigravity-gdrive-sync)
简体中文 · English
基于 rclone 封装的 Google Drive 项目/对话自动同步工具 与 Antigravity 原生 MCP App 插件。无需修改 Antigravity 客户端 app.asar,通过官方插件机制即可在界面内一键同步、查看实时进度条与预计剩余时间 (ETA),并支持按对话分类上传、旧版本云端归档与跨平台后台定时备份。
核心功能
按对话分类上传(默认轻量模式):自动扫描工作区下的每个对话文件夹,分类同步至 Google Drive 的
ProjectBackups/Conversations/<对话文件夹名>/,支持搜索、勾选批量同步、单对话一键上传,并可选附带同步对话产出物 (_artifacts/)。按项目目录同步:同时支持管理多个本地项目文件夹,可在界面顶部一键切换 按对话分类 / 按项目目录。
原生 Antigravity 交互面板:在左侧栏或右侧辅助面板
+菜单直接打开 Drive 同步,提供一键同步、预演检查 (--dry-run)、取消同步、实时进度条、预计剩余时间 (ETA)、传输速率、单文件进度条及云盘空间余量展示。单向同步 + 云端旧版本归档:基于
rclone sync --backup-dir,本地更改同步到云盘,被覆盖或删除的旧文件自动归档至ProjectBackups/_archive/.../<YYYY-MM-DD_HH-mm-ss>/,防止误删数据。智能排除依赖与缓存:默认排除
node_modules/**、.venv/**、dist/**、build/**、__pycache__/**、.git/**等,可在界面内随时增删规则。跨平台后台定时同步 + 桌面通知:
Windows:Task Scheduler(VBS 无黑窗静默执行)+ 原生 Toast 通知
macOS:
launchdLaunchAgent(~/Library/LaunchAgents/com.antigravity.gdrive-sync.plist)+ Notification Center (osascript)Linux:
systemd --userTimer(自动回退至crontab)+notify-send
内置按对话分文件夹规则:随插件部署全局
rules/AGENTS.md,启用后后续每个 Antigravity 新对话都会自动按YYYY-MM-DD_<主题>建文件夹并生成.conversation.json元数据。界面双语切换:面板右上角支持 中文 / EN 即时切换与持久化。
Related MCP server: bottari
🤖 给 AI 智能体的一键安装指令 (For AI Agents)
如果你将本仓库交给 AI 助手安装,只需对 AI 说:“读取仓库里的 AGENTS.md 或 README.md,帮我安装这个 Google Drive 同步插件”。
AI 智能体只需在仓库根目录执行以下命令即可完成零依赖部署(无需执行 npm install):
# 1. 环境预检
node cli.mjs check
# 2. 非交互式一键部署插件、检查 rclone 并注册系统定时任务
node cli.mjs install --yes
# 3. 验证插件完整性与运行状态
node cli.mjs doctorAI 智能体执行边界(详见 AGENTS.md):
零外部依赖运行:仓库已附带
esbuild打包好的零依赖产物(dist/mcp-server.mjs、dist/sync-cli.mjs、dist/app.html),日常安装与运行无需npm install。免改盘官方插件:安装仅写入
~/.gemini/config/plugins/gdrive-sync/与系统定时任务,不修改app.asar、不强杀宿主进程。OAuth 授权:Google Drive OAuth 需用户在浏览器亲自登录确认,切勿尝试自动化绕过或伪造凭据。
🚀 快速开始 (Quick Start)
方式一:一键脚本(适合日常手动安装)
下载仓库(或从 Releases 下载免构建 ZIP 解压)后直接运行:
Windows(未单独安装 Node.js 时会自动借用 Antigravity 内置 Electron 运行时):
安装 / 更新:双击
install.bat立即同步:双击
sync-now.bat卸载 / 清理:双击
uninstall.bat
macOS / Linux:
安装 / 更新:
chmod +x install.sh uninstall.sh && ./install.sh卸载 / 清理:
./uninstall.sh
方式二:CLI 命令行管理器
# 1. 环境健康预检(Node、插件完整性、rclone、Drive 授权、定时任务)
node cli.mjs check
# 2. 一键安装(部署插件 + 自动安装缺失的 rclone + 注册后台定时任务 + 可选交互授权)
node cli.mjs install
# 3. 单独启动 Google Drive 浏览器 OAuth 授权向导
node cli.mjs auth
# 4. 查看当前插件状态、5TB 云盘空间与最近一次同步记录
node cli.mjs status
# 5. 完整性与契约自检
node cli.mjs doctor
# 6. 命令行立即同步 / 预演
node cli.mjs sync
node cli.mjs sync --mode projects --dry-run
# 7. 修改或开关系统定时任务
node cli.mjs schedule --daily 22:00
node cli.mjs schedule --hourly 2
node cli.mjs schedule --disable
# 8. 一键卸载插件并移除定时任务(追加 --purge-data 一并删除本地配置和日志)
node cli.mjs uninstall🌐 跨平台兼容性说明
平台 | 后台定时调度 | 桌面通知 | OAuth 授权终端 | 验证状态 |
Windows 10/11 | Task Scheduler + 无窗 VBS | WinRT Toast / 托盘气泡 | PowerShell 向导 | ✅ 本地实机完整验证 |
macOS |
|
| Terminal.app 向导 | 🧪 单测 + GitHub Actions |
Linux |
|
| 常见桌面终端 / 命令回显 | 🧪 单测 + GitHub Actions |
为什么不需要修改
app.asar? 本项目采用 Antigravity 官方插件与 MCP App (ui://) 规范,不会破坏 macOSElectronAsarIntegrity签名校验,也不受 Antigravity 客户端版本升级覆盖影响。
🧪 自动化测试与源码构建
# 使用 Node.js 原生 node:test 运行跨平台单元测试与 MCP 协议集成测试(无需安装依赖即可直接跑)
npm test
# 若修改了 src/ 下的 TypeScript / 前端代码,需安装 devDependencies 后重新打包并部署:
npm install
npm run build
npm run deploy📁 仓库结构
antigravity-gdrive-sync/
├── cli.mjs # 统一跨平台 CLI 管理器 (check / install / status / doctor / auth / sync / schedule / uninstall)
├── install.bat / uninstall.bat # Windows 一键安装 / 卸载脚本(支持 Antigravity Electron 运行时回退)
├── sync-now.bat # Windows 双击立即同步脚本
├── install.sh / uninstall.sh # macOS / Linux 一键安装 / 卸载脚本
├── AGENTS.md # 给 AI 智能体的零依赖安装与自检指南
├── src/
│ ├── core/
│ │ ├── paths.mjs # 跨平台配置目录与 rclone 自动发现
│ │ ├── config.mjs # 配置与默认排除规则管理
│ │ ├── conversations.mjs # 工作区对话文件夹与产出物扫描
│ │ ├── sync-engine.mjs # rclone 同步引擎、JSON 实时进度与 ETA 解析
│ │ ├── scheduler.mjs # 跨平台调度器 (Task Scheduler / launchd / systemd+cron)
│ │ └── notify.mjs # 跨平台桌面通知 (WinRT Toast / osascript / notify-send)
│ ├── cli/sync-cli.mjs # 后台定时与命令行同步入口
│ ├── mcp/mcp-server.mjs # Antigravity MCP Server 与 UI 工具接口
│ └── ui/ # MCP App 前端面板(HTML / CSS / TypeScript / 中英双语 i18n)
├── plugin/ # Antigravity 插件清单、MCP 配置、SVG 图标与全局 AGENTS.md 规则
├── dist/ # esbuild 预构建零依赖运行产物(可直接运行,无需 npm install)
├── scripts/ # 构建、插件部署与 Release ZIP 打包脚本
├── test/ # node:test 跨平台单元测试与 MCP 握手集成测试
└── .github/workflows/ # 三平台自动化 CI 测试与 Tag 自动 Release 打包🛡️ 安全与隐私
零外部凭据存储:Google Drive OAuth Token 完全由本地
rclone托管,本插件与仓库不收集、不上传任何账号信息。防误删归档:默认采用单向同步 +
--backup-dir,云盘中被修改或删除的文件会保留历史副本在_archive目录。开源合规:采用 MIT License 开源;工作区个人元数据
.conversation.json与本地运行日志均已加入.gitignore。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Give Claude only the Google Drive files you choose. Every action logged.
Keeps your memory as Markdown in your Google Drive or GitHub, from WhatsApp or any AI tool over MCP
One memory for every AI chat: rules, profile and work history as plain files in your own cloud
Find, read and reorganize files across Google Drive, OneDrive, SharePoint and Dropbox, with undo.
Related MCP Servers
- AlicenseAqualityBmaintenanceEnables Claude Code to read, create, update, and delete Claude Cowork/claude.ai projects and their knowledge documents, including syncing local folders to projects, with safety features like backups and overwrite protection.171MIT
- AlicenseNot gradedqualityBmaintenanceEnables Claude Desktop to synchronize and manage your CLI setup (skills, settings, sessions, projects) across machines via encrypted Google Drive, with conflict resolution and version history.GPL 3.0
- FlicenseNot gradedqualityDmaintenanceEnables AI-assisted Google Drive organization by letting Claude inspect a workspace, propose a tidy-up plan, and apply it only after deterministic validation, human approval, and audit logging.-
- AlicenseNot gradedqualityCmaintenanceEnables Claude to search, download, upload, trash, rename, move, and share Google Drive files across multiple independently authenticated Google accounts through one local stdio connection, with scoped access and confirmation safeguards.MIT