
gemini-hub
io.github.qwnzkkldsfai/gemini-hub
Zero-latency context bridge across Antigravity IDE, Gemini Web/Desktop, and Google Drive & Docs
Documentation
⚡ Gemini_Hub
Zero-latency, cross-platform context bridge across Antigravity IDE, Gemini Web, Gemini Desktop, Chrome Sidebar, and Gemini Mobile App.
Official MCP Registry · Related Open-Core & Pro Companion Tools · VaultGraph Core (MIT MCP) · Live Survival Telemetry & Pro Kits · Ko-fi Store · Gumroad
Why Gemini_Hub?
Developers constantly switch between Antigravity (across multiple workstations and windows), Gemini Web (gemini.google.com), Gemini Desktop, Gemini in Chrome Sidebar, and Gemini Mobile App. While Gemini surfaces share cloud chat history, they are isolated from your local IDE engineering context:
| Approach | Antigravity → Gemini Latency | Drive Clutter | Gemini / Mobile → Antigravity | Cloud Auth Setup |
|---|---|---|---|---|
| Manual Copy & Paste | Repetitive, breaks flow | None | Manual | None |
| Creating a new Google Doc per turn | 1–3 min Drive search indexing lag | Hundreds of duplicate files | No (@Google Drive is read-only) | Tedious OAuth setup |
| ⚡ Gemini_Hub | 0.05s via Alt+Shift+J or fixed-file Drive overwrite | Zero (1 fixed Now whiteboard + per-repo archive) | < 50ms queued multi-note auto-injection | Zero-OAuth when Drive Desktop is mounted |
Architecture Overview
flowchart LR
subgraph AG["Antigravity (Multi-Window / Multi-PC)"]
AG_In["SessionStart / PreInvocation Hook (<50ms, Anti-Steal Guard)"]
AG_Out["Stop Hook (Windowless Async Delta Worker)"]
end
subgraph Hub["Google Drive Shared Hub (Zero-OAuth Local Sync OR Pure API Mirror)"]
Inbox["inbox/*.md & *.txt (Multi-Note Queue + Recall)"]
NowMD["⚡ Gemini Hub - Now.md (Fixed File In-Place Overwrite)"]
ProjMD["projects/📁 <Project>.md (Per-Repo Rolling History)"]
Archive["archive/ (Session Logs & Consumed Notes)"]
end
subgraph Gem["Gemini Surfaces"]
GChrome["Gemini Web (Right-Aligned ⚡ Pill & /hub + Tab)"]
GDesk["Gemini Desktop & Chrome Sidebar (Alt+Shift+J / H Hotkeys)"]
GMobile["Gemini Mobile App (Share Sheet -> Save .txt to inbox)"]
end
AG_Out -->|"Turn-aligned Q->A + 3-entry rolling overwrite"| NowMD
AG_Out -->|"Per-workspace history"| ProjMD
NowMD -->|"Alt+Shift+J (0.05s paste) / /hub+Tab / @Google Drive"| GChrome
NowMD -->|"Alt+Shift+J (0.05s paste) / @Google Drive"| GDesk
GChrome -->|"⚡ Send to Hub pill / Alt+Shift+S selection"| Inbox
GDesk -->|"Copy + Alt+Shift+H"| Inbox
GMobile -->|"iOS Shortcut / Android Save to Drive"| Inbox
Inbox -->|"Batched System Message injection (<50ms) -> archive"| AG_In
Key Capabilities
- Zero-OAuth Native Drive Sync (
LocalSyncBackend):- Automatically detects mounted Google Drive directories on Windows (
G:\My Drive/ localized folders), macOS (~/Library/CloudStorage/GoogleDrive-*), and Linux (rclone/gvfs/Insync). Reuses your existing Drive Desktop login to sync⚡ Gemini Hub - Now.mdin-place—no Google Cloud Console setup required! - Also includes a clientless
PureAPIBackend(using Drive APIchanges.listincremental mirroring to~/.cache/gemini-hub/mirror/) for headless/clientless Linux workstations.
- Automatically detects mounted Google Drive directories on Windows (
- Turn-Aligned Multi-Turn Summarizer (
summarizer.py):- Reads only newly appended bytes of
transcript.jsonl, pairs user intents with AI conclusions within the same turn (preserving the last 3[Turn 1..3] Q -> Aexchanges), supports optional Gemini Flash LLM summarization viaGEMINI_API_KEY, and degrades gracefully to a zero-cost deterministic rule engine. - Wraps injected context in
<antigravity_context>...</antigravity_context>tags so Gemini cleanly separates background IDE state from your current prompt.
- Reads only newly appended bytes of
- Kernel-Level Zero-Lag Symmetric Hotkeys (
Alt + Shift + JCopy Context /Alt + Shift + HPush):- Uses native Win32
user32.RegisterHotKeyon Windows (zero low-levelWH_KEYBOARD_LLkeyboard hooks—never stalls the OS input queue): Alt + Shift + J: Instantly copies your latest<antigravity_context>block to the clipboard so you canCtrl+V/Cmd+Vinto Gemini Web, Gemini Desktop, or Chrome Sidebar!Alt + Shift + H: Copy any text in Gemini Desktop, Chrome Sidebar, or another app and pressAlt + Shift + Hto push it straight into the Antigravity inbox.
- Uses native Win32
- Multi-Note Queue, One-Click Recall & Multi-Window Anti-Steal Guard:
- Push multiple notes in a row—they queue chronologically in
inbox/and merge into a single structuredNote #1..#NSystem Messageon your next Antigravity prompt (with one-click↩ Recallin the extension popup to undo the latest unread note). - Multi-Window Anti-Steal Protection: Background Antigravity windows running autonomous
/goaltool loops (invocationNum > 1) never snatch untargeted inbox notes meant for the foreground window where you next press Enter.
- Push multiple notes in a row—they queue chronologically in
- Truly Windowless Detached Daemon:
- Running
gemini-hub daemonautomatically detaches invisibly in the background (pythonw.exeon Windows,start_new_sessionon macOS/Linux) and returns your terminal prompt in< 0.5s—closing the terminal never kills the daemon, and zero black CMD windows ever flash.
- Running
- Chrome MV3 Extension, Mobile Share-to-Drive & MCP Server:
- Right-aligned ⚡ Send to Hub pill on completed
gemini.google.comreplies (waits cleanly during streaming and adapts to Light/Dark themes); /hub+Tabinline0mscontext expansion inside Gemini's prompt editor;- Native
.txt&.mdinbox ingestion so you can drop ideas from Gemini Mobile App (iOS Shortcuts / Android Save to Drive) while away from your desk; - Standard stdio MCP Server (
gemini-hub mcp) for Claude Code, Cursor, and Gemini Desktop.
- Right-aligned ⚡ Send to Hub pill on completed
3-Minute Installation & Deployment
Step 1: Install the CLI
Using uv (recommended, includes global hotkeys, LLM summarizer, and desktop notifications):
# Install directly from GitHub:
uv tool install "gemini-hub[all] @ git+https://github.com/qwnzkkldsfai/Gemini_Hub.git"
# Or install from a local clone (Tip: omit `-e` on Windows if the folder path contains non-ASCII characters):
uv tool install "./Gemini_Hub[all]"
Or via pipx: pipx install "git+https://github.com/qwnzkkldsfai/Gemini_Hub.git".
Step 2: Initialize & Register Antigravity Hooks
gemini-hub init
This detects your Google Drive sync mount, creates GeminiHub/{inbox,archive,projects,state}, and non-destructively merges gemini-hub-sync into ~/.gemini/config/hooks.json (preserving any existing hooks).
Step 3: Start the Windowless Background Daemon (& Optional Login Autostart)
# Detaches invisibly in the background and returns your terminal prompt immediately:
gemini-hub daemon
# Optional: auto-start silently on OS login (Windows Startup / Task Scheduler fallback, macOS LaunchAgent, Linux systemd):
gemini-hub service install
Lifecycle management commands:
gemini-hub daemon status # Check PID, health, storage mode, and unread inbox count
gemini-hub daemon restart # Restart background daemon
gemini-hub daemon stop # Stop background daemon cleanly
gemini-hub doctor # Run 5-point end-to-end health diagnostics
Step 4: Load & Pin the Chrome / Edge / Brave Companion Extension (Manifest V3)
- Open
chrome://extensions(oredge://extensions) and enable Developer mode (top right). - Click Load unpacked and select the
extension/directory in this repository. - Click the 🧩 Extensions puzzle icon in your browser toolbar and click 📌 Pin next to Gemini Hub Companion to keep the blue-and-gold ⚡ icon visible.
- Refresh any open
https://gemini.google.comtab (F5) once. (Zero"scripting"tab-injection permissions—100% safe alongside Chrome'sAuto Browse/GlicSide Panel!)
Daily Workflows Across All Devices
1. Bring Antigravity Context into Gemini (3 Ways)
Every time an Antigravity turn finishes, the Stop hook updates your local cache and GeminiHub/⚡ Gemini Hub - Now.md. In Gemini:
- Method A — Press
Alt + Shift + J(Works in Web, Gemini Desktop & Chrome Sidebar): PressAlt + Shift + J(or click📋 Copy Now Contextin the ⚡ toolbar popup) to copy your latest<antigravity_context>block, then pressCtrl+V/Cmd+Vinside any Gemini chat box! - Method B — Type
/hub+Tabongemini.google.com: Typing/hubin the Gemini Web prompt shows a subtle floating pill; pressTabto expand your latest context inline in< 10ms. - Method C — Cloud
@Google DriveLookup (Cross-Device / Mobile): Rungemini-hub skillto copy a safety-compliant Saved Info note and open Gemini Saved Info (or create a custom Gem), then ask@Google Driveto readGemini Hub Now(or attach⚡ Gemini Hub - Now.mdvia+ → Add from Drive).
2. Send Context Back to Antigravity (5 Entry Points, Supports Multi-Note Queuing)
Queue one or many notes—on your next prompt in Antigravity, all queued notes are merged in chronological order and injected automatically in < 50ms:
- Gemini Web Inline Pill: Click the right-aligned ⚡ Send to Hub button beneath any completed Gemini response.
- Chrome Native Sidebar (
Gemini in Chrome/Auto Browse) Combo:- Sessions using Chrome's privileged
Auto Browseside panel often do not appear ingemini.google.comweb history. Click the native 📋 Copy icon in the Sidebar, then either:- Press
Alt + Shift + Hdirectly, OR - Click the toolbar ⚡ icon →
📥 Paste Clipboard→Ctrl + Enterto bundle the Sidebar reply together with the active left-tab URL and an optional note!
- Press
- Sessions using Chrome's privileged
- Any Webpage Selection: Highlight text on GitHub or docs and right-click →
⚡ Send to Gemini Hub(or copy and pressAlt + Shift + S; click↩ Recallin the popup to undo the latest unread note). - Gemini Desktop / Native Apps: Copy text and press
Alt + Shift + H. - Gemini Mobile App (iPhone / Android Away from Desk):
- iOS: Create a 2-action Shortcut enabled in the Share Sheet (Receive Text from Share Sheet → Save File to
Google Drive/GeminiHub/inbox/mobile_date.txt). Tap Share → Send to Gemini Hub on any mobile Gemini reply! - Android: Tap Share → Save to Drive into
GeminiHub/inbox/as.txtor.md. - Google Drive syncs your mobile notes to your PC in the background, ready for automatic injection as soon as you sit back down at Antigravity!
- iOS: Create a 2-action Shortcut enabled in the Share Sheet (Receive Text from Share Sheet → Save File to
Multi-PC Sync & Linux Clientless Mode
- Multi-PC Sync (Windows / macOS / Linux with Drive Mount):
Sign into the same Google Drive account on your second machine, install
gemini-hub, and rungemini-hub init+gemini-hub daemon. Both machines automatically share the same whiteboard andinbox/! - Linux Wayland & Clientless
PureAPIBackend(Optional Google Cloud OAuth):- Wayland Shortcut: Bind a desktop keyboard shortcut in GNOME / KDE / Hyprland / Sway to
gemini-hub push --clipboard(auto-probeswl-paste→xclip→xsel);Alt + Shift + Sinside Chrome works natively on Wayland. - Clientless
pure_apiMode: On machines without a local Drive sync client, enable Google Drive API and Google Docs API in Google Cloud Console, create an OAuth Client ID of application type Desktop app, download the JSON to~/Downloads, and simply run:gemini-hub authgemini-hubautomatically discovers the newestclient_secret_*.jsonin~/Downloadsand completes browser authorization ($0 cost, least-privilegedrive.filescope).
- Wayland Shortcut: Bind a desktop keyboard shortcut in GNOME / KDE / Hyprland / Sway to
MCP Server Integration (Claude Code / Cursor / Gemini Desktop)
- Official MCP Registry:
io.github.qwnzkkldsfai/gemini-hub(v0.1.2, OCIghcr.io/qwnzkkldsfai/gemini-hub:0.1.2)
Local CLI (stdio)
{
"mcpServers": {
"gemini-hub": {
"command": "gemini-hub",
"args": ["mcp"]
}
}
}
Docker MCP Quickstart (Zero Local Python Install)
docker run -i --rm \
-e GEMINI_HUB_CONFIG_DIR=/data/config \
-e GEMINI_HUB_CACHE_DIR=/data/cache \
-v gemini-hub-data:/data \
ghcr.io/qwnzkkldsfai/gemini-hub:0.1.2
Or configure the container directly in mcpServers:
{
"mcpServers": {
"gemini-hub": {
"command": "docker",
"args": [
"run", "-i", "--rm",
"-e", "GEMINI_HUB_CONFIG_DIR=/data/config",
"-e", "GEMINI_HUB_CACHE_DIR=/data/cache",
"-v", "gemini-hub-data:/data",
"ghcr.io/qwnzkkldsfai/gemini-hub:0.1.2"
]
}
}
}
Exposes save_handoff, get_now_context, and list_inbox over standard JSON-RPC 2.0 stdio.
Security & Privacy
- Loopback-Only & Origin Guard: The HTTP daemon binds strictly to
127.0.0.1:18765, requiresBearertoken authentication, blocks/api/v1/shutdownfrom browser origins, and rejects untrusted webOriginheaders with403 Forbidden. - Zero Credential Leakage: Configurations and optional tokens live in OS-standard user config directories (
0600permissions on POSIX) and are excluded via.gitignore. The Chrome extension requests only127.0.0.1:18765andgemini.google.com—never<all_urls>.
Related Open-Core & Pro Companion Tools
Gemini_Hub stays scoped to MIT-licensed local and Google Drive context bridging (hooks, background daemon, Chrome MV3 extension, and stdio MCP). Related open-core tools and optional companion packages:
| Project / Channel | Scope & Technical Details | Links |
|---|---|---|
| VaultGraph Core (MIT Sibling MCP) | AGPL-free static dependency/AST license scanner (license-audit), local Graph+RRF sample retrieval harness (eval --golden --corpus sample), and zero-dependency JSON-RPC 2.0 stdio MCP server (mcp-stdio). Official MCP Registry: io.github.qwnzkkldsfai/vaultgraph-core (v0.1.5, active). | GitHub Repo |
| mcpguard-core (MIT Sibling MCP) | Zero-dependency pre-flight MCP tool-poisoning & secret-leak scanner (scan-text, scan-tools), signed .mcpb desktop extension builder, and JSON-RPC 2.0 stdio server (mcp-stdio). Official MCP Registry: io.github.qwnzkkldsfai/mcpguard-core (v0.1.3, active). | GitHub Repo |
| Public Live Survival Telemetry & Pro Kits | Public operational telemetry ledger, 16 Live Client Demos, and optional Pro companion kits, including the Connect-RPC awakener (--auto-wake), Sidecar permission compiler, git-worktree branch isolation and circuit-breaker kits, plus turnkey VaultGraph appliances. | Telemetry & Pro Kits · 16 Live Client Demos |
| Storefronts | Optional packaged Pro kits (Gemini Hub Pro Kit, War-Room Blueprint, VaultGraph Appliance / Pro, and bundle tiers). | Ko-fi Store · Tier A $79 · Gumroad |
1-line uvx quickstart for VaultGraph Core (no local clone required; replace self-check with mcp-stdio for MCP clients):
uvx --from "git+https://github.com/qwnzkkldsfai/vaultgraph-core" vaultgraph-core self-check
License
Released under the MIT License. See CONTRIBUTING.md for development and testing guidelines.
Need Custom MCP Integration for your team's IDE hooks, Google Drive pipelines, or private workflows? Support ongoing maintenance via Ko-fi or request a custom build on Ko-fi Commissions.
ghcr.io/qwnzkkldsfai/gemini-hub:0.1.2docker pull ghcr.io/qwnzkkldsfai/gemini-hub:0.1.2:undefined