gemlatch
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 47 GitHub stars
Code Fail
- rm -rf — Recursive force deletion command in .github/workflows/release.yml
Permissions Pass
- Permissions — No dangerous permissions requested
No AI report is available for this listing yet.
Turn Gemini Web into a local Coding Agent or a 0-token-wait subagent for Claude Code, Cursor & Antigravity — Zero plugins, 100% official MCP, single Rust binary, any language, sandboxed patch & rollback | 把 Gemini 网页端变成你的本地 Coding Agent 与省额子代理
简体中文 | English
GemLatch
Let Claude Code, Cursor, or Antigravity delegate heavy repo work to Gemini Web while spending 0 host tokens waiting — or use Gemini Web directly as your local Coding Agent via official MCP Developer Mode.
Prerequisites
GemLatch relies on Google's official Custom MCP Apps / Gemini Apps Developer Mode (gemini.google.com/devmode). Per Google's requirements, all four are mandatory or the Developer Mode entry stays hidden:
- Gemini / Google Account UI language set to English (
English/United States). - Account and network in the US region, age 18+.
- Personal Google account only (Google Workspace business/education accounts are not supported).
- Gemini Apps Activity / History enabled.
Google also requires a public HTTPS Streamable HTTP endpoint (MCP 2025-03-26–2025-11-25) — direct localhost URLs and legacy SSE are not accepted, so pair GemLatch with an HTTPS tunnel (ngrok recommended, or cloudflared). Optional delegate mode additionally requires Chrome launched with --remote-debugging-port=9222 and a separate --user-data-dir (required since Chrome 136).
Installation
Download the archive for your platform from GitHub Releases, extract it, and run:
# Linux / macOS (Windows users can double-click start.bat after extracting)
./gemlatch --root /path/to/your/project --allowlist ./allowlist.toml --key-file ./secret.key
For Windows PowerShell scripts (start.ps1 / stop.ps1 / rotate-key.ps1), building from source (Rust 1.96+), and tunnel setup, see docs/setup.md.
Quick Start
- Expose the gateway over HTTPS: start
gemlatch(port3006) and runngrok http 127.0.0.1:3006(orcloudflared tunnel --url http://127.0.0.1:3006), then combine your domain with the 43-char key insecret.key:https://<your-domain>/mcp/<key>. - Open Developer Mode in Gemini Web: switch your Google account language to English (US), open gemini.google.com, and click
</> Developer Modein the sidebar under Preferences. - Register the Custom MCP App: paste your full
https://.../mcp/<key>URL, selectStreamable HTTP, and save — confirm 8 tools appear by default (9with--enable-shell-exec,10with--enable-delegate,11with both). - Run your first local Coding Agent task: open a new Gemini Web chat, mention
@<Your App Name>once (not needed on follow-up turns in the same chat), and ask Gemini to inspect your repo withworkspace_snapshotorcode_outline. Mutating tools trigger Gemini's native Allow / Deny card. - Run your first subagent task (optional): start with
--enable-delegate, launch Chrome with--remote-debugging-port=9222 --user-data-dir=<dir>(signed in to Gemini), and rungemlatch delegate --task-file task.md --mention <AppName> --new-chat --format json.
Two Modes
Local Coding Agent (Default Safe Mode)
Zero browser automation — pure official Streamable HTTP MCP. Exposes 8 sandboxed tools locked to --root (workspace_snapshot, code_outline, code_search, batch_read, git_diff, safe_patch with create: true, scoped_exec, rollback_last), with atomic snapshots and zero-restart gemlatch workspace set <dir> switching. Best when you want to chat directly with Gemini Web against a local repo. See docs/reference.md.
Subagent Delegation (--enable-delegate)
Adds get_pending_task and report_task_done plus a loopback-only Chrome CDP orchestrator so Claude Code, Cursor, or Antigravity can dispatch multi-file recon/edits in one command while spending 0 host tokens waiting and receiving a <= 3 KiB JSON report. All tool calls still use official MCP; CDP never touches credentials and immediately exits with needs_human (code 4) on login, CAPTCHA, or Allow/Deny cards. See docs/delegate-guide.md.
Documentation
| Document | Description |
|---|---|
| docs/setup.md | Prebuilt archives, source builds, Windows scripts, ngrok/cloudflared, Gemini Web connection, testing, and troubleshooting |
| docs/reference.md | Dual-mode architecture, all 11 built-in tools, allowlist.toml config, tool specs (batch_read/shell_exec/git_diff/TS outline), security, and compliance |
| docs/delegate-guide.md | Subagent delegate workflow, Chrome 136 CDP setup, --ui-mode/--web-model gates, --acceptance, --cross-review, batch queues, exit codes, and selectors.toml |
| docs/internal/cdp-findings.md | Internal developer reference: Chrome CDP contract and DOM selector baseline |
| examples/README.md | Multi-language allowlist variants, host-agent rules, and dispatch script templates |
| CHANGELOG.md | Release history and version-by-version changes |
License
MIT — see LICENSE.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found