[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-760":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":23,"hasPages":23,"topics":25,"createdAt":10,"pushedAt":10,"updatedAt":26,"readmeContent":27,"aiSummary":28,"trendingCount":16,"starSnapshotCount":16,"syncStatus":29,"lastSyncTime":30,"discoverSource":31},760,"gemma-chat","ammaarreshi\u002Fgemma-chat","ammaarreshi","Local AI chat + coding agent for Apple Silicon, powered by Gemma 4 via MLX \u002F Supports Ollama","",null,"TypeScript",1386,249,16,14,0,8,22,207,24,20.19,"MIT License",false,"main",[],"2026-06-12 02:00:18","\u003Cp align=\"center\">\n  \u003Cimg src=\"gemma-extruded-app.png\" alt=\"Gemma Chat\" width=\"180\" \u002F>\n\u003C\u002Fp>\n\n\u003Ch1 align=\"center\">Gemma Chat\u003C\u002Fh1>\n\n\u003Cp align=\"center\">\n  \u003Cstrong>Vibe code without the internet.\u003C\u002Fstrong>\u003Cbr\u002F>\n  A local coding agent powered by Google's Gemma 4 — runs entirely on your Mac via Apple's MLX framework.\u003Cbr\u002F>\n  No API keys. No cloud. No Wi-Fi required.\n\u003C\u002Fp>\n\n---\n\n\u003Cimg width=\"960\" height=\"593\" alt=\"Gemma4-Vibecoding\" src=\"https:\u002F\u002Fgithub.com\u002Fuser-attachments\u002Fassets\u002Fb4149e63-48df-456e-8007-c607b7d46f37\" \u002F>\n\n\n## The Idea\n\nWhat if you could vibe code from an airplane? Or a cabin with no cell signal? Or just... without sending your code to someone else's server?\n\n**Gemma Chat** is an open-source Electron app that runs Gemma 4 natively on Apple Silicon. You describe what you want to build, and it writes the code — HTML, CSS, JavaScript, multi-file projects — with a live preview that updates as the model types. No internet connection needed after the initial model download.\n\nIt's a proof-of-concept for **fully offline, local-first vibe coding** using a small open model. The model is ~3 GB. The whole thing runs on your laptop.\n\n## How It Works\n\n1. **Describe what you want to build** — \"A retro calculator app\" or \"A landing page for a coffee shop\"\n2. **Watch it code** — Gemma writes files character-by-character with a live preview\n3. **Iterate** — Ask for changes, it edits the files and the preview updates in real-time\n\nEverything happens locally. The model runs via [MLX-LM](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx-examples\u002Ftree\u002Fmain\u002Fllms\u002Fmlx_lm), Apple's framework for running LLMs on Apple Silicon. Your code, your prompts, your conversations — all on your machine.\n\n## Features\n\n- 🛠 **Build Mode** — Coding agent with a live preview canvas. Writes multi-file projects into a sandboxed workspace.\n- 💬 **Chat Mode** — Conversational AI with tool use (web search, URL fetch, calculator, bash).\n- 🔄 **Model Switching** — Hot-swap between 4 Gemma variants on the fly.\n- 🎤 **Voice Input** — Local speech-to-text via in-browser Whisper.\n- ✈️ **Works Offline** — After the one-time model download, everything runs without internet.\n- 💾 **Zero Config** — Python venv + MLX runtime auto-provisions on first launch.\n\n## Available Models\n\n| Model | Size | Best For |\n|---|---|---|\n| Gemma 4 E2B | ~1.5 GB | Fast Q&A, simple tasks |\n| **Gemma 4 E4B** | **~3 GB** | **Recommended.** Speed + capability balance |\n| Gemma 4 27B MoE | ~8 GB | Stronger reasoning (needs 16 GB+ RAM) |\n| Gemma 4 31B | ~18 GB | Maximum quality (needs 32 GB+ RAM) |\n\n## Getting Started\n\n**Requirements:** macOS on Apple Silicon, Python 3.10–3.13, Node 20+.\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fammaarreshi\u002Fgemma-chat-public.git\ncd gemma-chat-public\nnpm install\nnpm run dev\n```\n\nFirst launch will auto-detect Python → create a venv → install MLX-LM → download the model (~3 GB) → ready to vibe code.\n\n> **Tip:** Install Python via Homebrew if you don't have it: `brew install python@3.13`\n\n### Building a Distributable\n\n```bash\nnpm run dist\n```\n\nProduces a signed `.dmg` in `dist\u002F`. Share it directly — recipients just drag to Applications.\n\n## Tech Stack\n\n| Layer | Tech |\n|---|---|\n| App Shell | Electron + Vite + React 19 + TypeScript + Tailwind |\n| Model Runtime | MLX-LM (auto-installed into a local venv) |\n| Speech-to-Text | transformers.js (Whisper, runs in-browser via WASM) |\n| Workspace | Per-conversation sandboxed filesystem + local HTTP server |\n\n## Architecture\n\n```\nsrc\u002F\n├── main\u002F              Electron main process\n│   ├── index.ts       Window + IPC + agent loop\n│   ├── mlx.ts         MLX-LM venv install \u002F server lifecycle \u002F chat streaming\n│   ├── workspace.ts   Per-conversation workspace + static file server\n│   └── tools.ts       Tool definitions + system prompts + XML action parser\n├── preload\u002F           contextBridge API surface\n├── renderer\u002Fsrc\u002F\n│   ├── components\u002F\n│   │   ├── Setup.tsx      First-run onboarding + download progress\n│   │   ├── Chat.tsx       Main layout + model switcher\n│   │   ├── Canvas.tsx     Preview \u002F Code \u002F Files tabs (Build mode)\n│   │   ├── Message.tsx    Chat bubbles + tool cards + activity bar\n│   │   ├── Composer.tsx   Input + mic button\n│   │   └── Sidebar.tsx    Conversation list\n│   └── lib\u002Fwhisper.ts     Browser Whisper pipeline\n└── shared\u002Ftypes.ts    IPC types + model registry\n```\n\n### Under the Hood\n\n**Agent Loop** — In Build mode, each assistant turn streams tokens from the local MLX server. XML `\u003Caction>` blocks are parsed from the stream, executed (file writes, bash commands, etc.), and results are fed back for the next turn. Up to 40 rounds per user message.\n\n**Live Streaming** — As the model generates file content, partial writes are flushed to disk every ~450ms. The preview iframe reloads in real-time so you watch the page build itself.\n\n**Tool Protocol** — Small models handle XML more reliably than JSON function calling, so tools are invoked via an XML-based format:\n\n```xml\n\u003Caction name=\"write_file\">\n\u003Cpath>index.html\u003C\u002Fpath>\n\u003Ccontent>\n\u003C!doctype html>\n...\n\u003C\u002Fcontent>\n\u003C\u002Faction>\n```\n\n## Credits\n\n- [Gemma](https:\u002F\u002Fai.google.dev\u002Fgemma) by Google DeepMind\n- [MLX](https:\u002F\u002Fgithub.com\u002Fml-explore\u002Fmlx) by Apple Machine Learning Research\n- [transformers.js](https:\u002F\u002Fgithub.com\u002Fhuggingface\u002Ftransformers.js) by Hugging Face\n\nCreated by [@ammaar](https:\u002F\u002Fx.com\u002Fammaar) and AI :) \n\n## License\n\nMIT\n","Gemma Chat 是一个基于 Apple Silicon 的本地 AI 聊天和编码助手，通过 Gemma 4 和 MLX 框架支持离线使用。其核心功能包括在无网络环境下自动生成代码（支持 HTML、CSS、JavaScript 等）并提供实时预览，同时具备聊天模式下的工具使用能力（如网页搜索、URL 抓取等）。此外，Gemma Chat 支持语音输入以及多种模型之间的快速切换。适合于需要在没有互联网连接的环境中进行编程工作的场景，比如飞行途中或偏远地区，同时也适用于注重隐私安全、不希望将数据上传至云端的开发者。",2,"2026-06-11 02:39:08","CREATED_QUERY"]