gemini-claude-sync
README.md
# Gemini <-> Claude Sync (`gemini-claude-sync`)
Zero-dependency Node.js **Plugin + MCP Server + CLI** for bidirectional (**both-side**) chat history sync, import, and export across:
- **Gemini CLI** (`~/.gemini/tmp/*/chats/session-*.jsonl`)
- **Antigravity CLI** (`~/.gemini/antigravity-cli/brain/*/transcript.jsonl`)
- **Gemini Desktop App / Gemini Web** (Google Takeout `MyActivity.json` & JSON exports)
- **Claude Code** (`~/.claude/projects/*/*.jsonl` + `~/.claude/history.jsonl`)
- **Claude Desktop** (`claude_desktop_config.json` MCP + `conversations.json` export/import + Markdown)
Supports **SHA-256 content-hash deduplication**, **automatic state backups**, **dry-run previews**, and **email-account profile binding** (`geminiEmail <-> claudeEmail`).
---
## Install from Plugin Marketplaces
### 1. Claude Code / Claude Plugin Marketplace
This repository ships `.claude-plugin/marketplace.json`, `.claude-plugin/plugin.json`, and `.mcp.json`:
```text
/plugin marketplace add Happyjainmatigarg/gemini-claude-sync
/plugin install gemini-claude-sync@gemini-claude-sync
```
### 2. Gemini CLI Extension
This repository ships `gemini-extension.json`:
```bash
gemini extensions install https://github.com/Happyjainmatigarg/gemini-claude-sync
```
### 3. Antigravity Plugin
Clone or copy into `~/.gemini/config/plugins/gemini-claude-sync/` (or `.agents/plugins/gemini-claude-sync/`). Antigravity auto-discovers `plugin.json`, `mcp_config.json`, `hooks.json`, `rules/AGENTS.md`, and `skills/*/SKILL.md`.
### 4. Claude Desktop (Electron App)
Run the built-in installer to merge the stdio MCP server into `%APPDATA%\Claude\claude_desktop_config.json` (Windows) or `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS):
```bash
node src/cli.js install-claude-desktop
```
Then restart **Claude Desktop**.
---
## Email-Account Sync (Gemini Desktop/Web <-> Claude Desktop)
1. **Bind your email profile** (auto-detects Google email from `~/.gemini/google_accounts.json`):
```bash
node src/cli.js profile
node src/cli.js set-profile --gemini-email you@gmail.com --claude-email you@example.com
```
2. **Import Gemini Desktop App / Web history** (Google Takeout `MyActivity.json`):
```bash
node src/cli.js import-takeout --file /path/to/MyActivity.json --dry-run
node src/cli.js import-takeout --file /path/to/MyActivity.json
```
3. **Two-way sync** (including a Claude Desktop `conversations.json` export):
```bash
node src/cli.js sync --file /path/to/conversations.json --dry-run
node src/cli.js sync --file /path/to/conversations.json --markdown
```
Exported Claude Desktop bundles are saved to `~/.gemini-claude-sync/exports/latest-claude-desktop.json`.
---
## MCP Tools (10) & Resources (2)
| Tool | Description |
| :--- | :--- |
| `sync_status` | Counts, active email profile, pending sync items, and paths |
| `list_conversations` | List conversations across Gemini CLI, Antigravity, Claude Code, and exports |
| `read_conversation` | Read normalized messages for a `conversationId` |
| `search_conversations` | Keyword search across titles and message text on both sides |
| `export_gemini_to_claude` | Export Gemini/Antigravity chats to Claude Code + Claude Desktop JSON/Markdown |
| `import_claude_to_gemini` | Import Claude Code or Claude Desktop `conversations.json` into Gemini CLI |
| `import_gemini_takeout` | Import Google Takeout `MyActivity.json` / Gemini Web JSON into both sides |
| `sync_bidirectional` | Full two-way sync with content-hash deduplication |
| `get_account_profiles` | View configured `geminiEmail <-> claudeEmail` profiles |
| `configure_account_profile` | Bind Google/Gemini and Claude email logins to a profile |
Resources: `sync://status`, `sync://conversations`.
---
## Testing
Requires Node.js `>=20.0.0` (no `npm install` needed):
```bash
npm test
```
See [docs/GUIDE.md](./docs/GUIDE.md) for the full step-by-step guide.
## License
MIT — see [LICENSE](./LICENSE).
This server cannot be deployed
Maintenance
ActivityMaintained
ResponsivenessNo recent community issues