{"id":49698334,"url":"https://github.com/Kalmuraee/OpenMagic","last_synced_at":"2026-05-24T18:01:01.270Z","repository":{"id":347011848,"uuid":"1192517317","full_name":"Kalmuraee/OpenMagic","owner":"Kalmuraee","description":"AI-powered coding toolbar for any web application. Select elements, capture context, and let AI modify your codebase in real-time. Works with any framework.","archived":false,"fork":false,"pushed_at":"2026-05-02T02:04:16.000Z","size":8422,"stargazers_count":4,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-02T02:22:08.676Z","etag":null,"topics":["ai","anthropic","code-modification","developer-tools","gemini","llm","nextjs","npm-package","open-source","openai","react","reverse-proxy","toolbar","typescript","vibe-coding","vue","web-development"],"latest_commit_sha":null,"homepage":"https://kalmuraee.github.io/OpenMagic/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Kalmuraee.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-26T09:46:53.000Z","updated_at":"2026-05-02T02:04:18.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/Kalmuraee/OpenMagic","commit_stats":null,"previous_names":["kalmuraee/openmagic"],"tags_count":96,"template":false,"template_full_name":null,"purl":"pkg:github/Kalmuraee/OpenMagic","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalmuraee%2FOpenMagic","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalmuraee%2FOpenMagic/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalmuraee%2FOpenMagic/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalmuraee%2FOpenMagic/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Kalmuraee","download_url":"https://codeload.github.com/Kalmuraee/OpenMagic/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Kalmuraee%2FOpenMagic/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33444704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-24T13:13:05.286Z","status":"ssl_error","status_checked_at":"2026-05-24T13:13:03.728Z","response_time":57,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","anthropic","code-modification","developer-tools","gemini","llm","nextjs","npm-package","open-source","openai","react","reverse-proxy","toolbar","typescript","vibe-coding","vue","web-development"],"created_at":"2026-05-08T04:00:33.626Z","updated_at":"2026-05-24T18:01:01.263Z","avatar_url":"https://github.com/Kalmuraee.png","language":"TypeScript","funding_links":[],"categories":["📚 Tools"],"sub_categories":["🌟 What You'll Find Here:"],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"https://raw.githubusercontent.com/Kalmuraee/OpenMagic/main/docs/logo.png\" alt=\"OpenMagic\" width=\"200\" /\u003e\n\n# OpenMagic\n\n**Add an AI coding toolbar to any web app. One command. Zero code changes.**\n\n[![npm version](https://img.shields.io/npm/v/openmagic.svg?style=flat-square)](https://www.npmjs.com/package/openmagic)\n[![npm downloads](https://img.shields.io/npm/dw/openmagic?style=flat-square)](https://www.npmjs.com/package/openmagic)\n[![License: MIT](https://img.shields.io/badge/license-MIT-blue.svg?style=flat-square)](https://opensource.org/licenses/MIT)\n[![GitHub stars](https://img.shields.io/github/stars/Kalmuraee/OpenMagic?style=flat-square)](https://github.com/Kalmuraee/OpenMagic/stargazers)\n[![CI](https://img.shields.io/github/actions/workflow/status/Kalmuraee/OpenMagic/ci.yml?style=flat-square\u0026label=CI)](https://github.com/Kalmuraee/OpenMagic/actions)\n[![TypeScript](https://img.shields.io/badge/TypeScript-strict-blue?style=flat-square)](https://www.typescriptlang.org/)\n[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-brightgreen?style=flat-square)](https://github.com/Kalmuraee/OpenMagic/pulls)\n[![Node](https://img.shields.io/node/v/openmagic?style=flat-square)](https://nodejs.org/)\n[![Hits](https://hits.sh/github.com/Kalmuraee/OpenMagic.svg?style=flat-square\u0026label=views\u0026color=6c5ce7)](https://hits.sh/github.com/Kalmuraee/OpenMagic/)\n\nOpenMagic injects a floating AI toolbar into your running web app via reverse proxy.\nSelect any element, describe what you want, review the diff, approve — your code updates and HMR refreshes the page.\nNo framework plugin. No IDE extension. No account. Bring your own API key.\n\n[Website](https://kalmuraee.github.io/OpenMagic/) \u0026#183; [Quick Start](#quick-start) \u0026#183; [How It Works](#how-it-works) \u0026#183; [Providers](#supported-providers) \u0026#183; [GitHub](https://github.com/Kalmuraee/OpenMagic)\n\n\u003c/div\u003e\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n![OpenMagic Demo](https://raw.githubusercontent.com/Kalmuraee/OpenMagic/main/docs/demo.gif)\n\n\u003c/div\u003e\n\n---\n\n## Quick Start\n\n```bash\n# 1. Start your dev server as usual\nnpm run dev\n\n# 2. In your project folder, run OpenMagic (auto-detects your dev server)\nnpx openmagic@latest\n```\n\nRun this from your project folder so OpenMagic can find your source files and dev server. A proxied version of your app opens with the toolbar overlaid.\n\nRequires Node.js 20.19 or newer.\n\n---\n\n## Features\n\n| | Feature | Description |\n|---|---------|-------------|\n| **Select** | Element Selection | Click any element to capture its DOM, computed styles, parent layout, siblings, React props, and component name |\n| **Ground** | Smart File Grounding | Server-side route, component, import, and stylesheet matching sends the most relevant files first |\n| **Diff** | Atomic Patch Preview | Approve or reject each change. Patch groups apply server-side with rollback support |\n| **Retry** | Auto-Retry | If the LLM requests more files, OpenMagic reads them transparently and retries — no manual intervention |\n| **Chat** | Markdown Chat | Streaming responses, copy buttons, session persistence across HMR reloads |\n| **Net** | Network Profiling | Captures page load timing, TTFB, FCP, and flags slow resources |\n| **Img** | Image Attachments | Drag-drop, paste from clipboard, or use the file picker — vision models analyze screenshots |\n| **Keys** | Per-Provider Keys | Store a key for each provider. Switch models without re-entering credentials |\n| **Plan** | Plan Before Editing | Review an implementation plan before asking the model to generate patches |\n| **KB** | Keyboard Shortcuts | Toggle, send, close, minimize — all from the keyboard |\n| **Min** | Minimize to Icon | Collapse the toolbar to a small floating button when you do not need it |\n\n---\n\n## How It Works\n\nOpenMagic is a single-port reverse proxy. It sits between your browser and your dev server, injecting the toolbar script into HTML responses. Your project is never modified at install time.\n\n```\n                        +-----------------------+\n                        |      Your Browser     |\n                        |  localhost:4567        |\n                        +---+---------------+---+\n                            |               |\n                      HTTP proxy        WebSocket\n                            |               |\n  +----------------+    +---+---------------+---+\n  | Your Dev Server|    |   OpenMagic Server    |\n  | localhost:3000  |\u003c---|                       |\n  +----------------+    |  File Read/Write      |\n                        |  LLM API Proxy        |\n                        |  (your key, localhost) |\n                        +-----------------------+\n```\n\n1. **Proxy** -- All requests forward to your dev server. HTML responses get the toolbar `\u003cscript\u003e` tag appended automatically.\n2. **Toolbar** -- A Shadow DOM Web Component. Fully isolated from your app's styles.\n3. **Server** -- Local Node.js process handling file I/O and proxying LLM calls. API keys never leave your machine.\n4. **HMR** -- When the AI modifies source files, your dev server's hot module replacement picks up changes automatically.\n\nStop with `Ctrl+C`. Nothing stays behind.\n\n---\n\n## Supported Providers\n\n14 providers, 70+ models. Providers ship with a static fallback list, and OpenMagic fetches live model lists from the local server when the provider supports it. API keys stay server-side and are never sent to the toolbar.\n\n| Provider | Notable Models | Vision | Thinking / Reasoning |\n|----------|---------------|--------|---------------------|\n| **OpenAI** | GPT-5.5, GPT-5.4 Pro/Mini/Nano, o3, o4-mini, Codex Mini | Yes | reasoning_effort |\n| **Anthropic** | Claude Opus 4.6, Sonnet 4.6, Haiku 4.5 | Yes | Extended thinking (budget_tokens) |\n| **Google Gemini** | Gemini 3.1 Pro, 3 Flash, 2.5 Pro, 2.5 Flash | Yes | thinking_level |\n| **xAI (Grok)** | Grok 4.20, Grok 4.20 Reasoning, Grok 4.1 Fast | Yes | reasoning_effort |\n| **DeepSeek** | DeepSeek V4 Flash/Pro, DeepSeek V3.2, DeepSeek R1 | -- | V4 Pro/R1: reasoning_effort |\n| **Mistral** | Large 3, Small 4, Codestral, Devstral 2, Magistral | Yes | Magistral: reasoning_effort |\n| **MiniMax** | MiniMax models | Varies | -- |\n| **Kimi** | Kimi models | Varies | -- |\n| **Qwen** | Qwen models | Varies | -- |\n| **Zhipu** | Zhipu (GLM) models | Varies | -- |\n| **Doubao** | Doubao models | Varies | -- |\n| **Groq** | Llama 4 Scout, Llama 3.3 70B, Qwen 3 32B | Llama 4 | -- |\n| **Ollama** | Any local model (free, private) | Varies | -- |\n| **OpenRouter** | 200+ models from all providers | Varies | Varies |\n\nModel lists are labeled internally as live, cached, or static. Cloud provider live lists are cached for 12 hours; local providers such as Ollama use a short cache so newly pulled models appear quickly.\n\nUse **Test model** in Settings to verify a provider key/model combination before sending a real request. OpenMagic classifies common failures such as invalid keys, unavailable models, quota/rate limits, and provider errors.\n\nEnable **Plan before editing** when you want the model to produce an implementation plan first. After reviewing the plan, choose **Generate changes** to ask for patches.\n\n---\n\n## Keyboard Shortcuts\n\n| Shortcut | Action |\n|----------|--------|\n| `Ctrl+Shift+O` | Toggle toolbar open/close |\n| `Ctrl+Enter` | Send message |\n| `Escape` | Close toolbar |\n| Minimize button | Collapse to floating icon |\n\n---\n\n## Configuration\n\n### CLI Options\n\n| Option | Description | Default |\n|--------|-------------|---------|\n| `-p, --port \u003cport\u003e` | Dev server port to proxy | Auto-detect |\n| `-l, --listen \u003cport\u003e` | OpenMagic proxy port | `4567` |\n| `-r, --root \u003cpaths...\u003e` | Project root directories | Current directory |\n| `--host \u003chost\u003e` | Dev server host | `localhost` |\n| `--no-open` | Do not auto-open browser | `false` |\n\n### Multi-Repo Support\n\n```bash\nnpx openmagic --port 3000 --root ./frontend --root ./backend\n```\n\n### Config File\n\nSettings persist in `~/.openmagic/config.json` (your home directory, never in your project):\n\n```json\n{\n  \"provider\": \"anthropic\",\n  \"model\": \"claude-opus-4-6\",\n  \"apiKey\": \"sk-ant-...\"\n}\n```\n\n### Using Ollama (Free, Local)\n\n```bash\nollama pull llama3.3\nnpx openmagic --port 3000\n# Select \"Ollama (Local)\" as your provider\n```\n\n---\n\n## Security\n\n- **Localhost only** -- The proxy and WebSocket bind to `localhost`. Not accessible from the network.\n- **Session tokens** -- Each session generates a random token. The toolbar authenticates before accessing any API.\n- **Path sandboxing** -- File operations are restricted to configured root directories. Symlinks that escape the root are rejected.\n- **API keys stay local** -- Keys live in `~/.openmagic/config.json`. They are proxied through the local server, never exposed to the browser or any third party.\n- **Zero project modification** -- OpenMagic never touches your `package.json`, config files, or source code during installation. The toolbar exists only in the proxy layer.\n- **Diff preview** -- AI-proposed changes are shown as diffs with Approve/Reject buttons. Nothing is auto-applied without your consent.\n\n---\n\n## Known Limitations\n\n- **Origin change** -- Your app runs on `:3000` but you access it via `:4567`. This can break OAuth redirect URIs, `localStorage` isolation, and Service Worker scope. Most dev setups work fine, but if your app checks `window.location.origin`, you may need to adjust your dev config.\n- **CSP via meta tags** -- OpenMagic strips CSP response headers so the toolbar script can load, but `\u003cmeta\u003e` tag CSP can't be modified at the proxy level and may still block it.\n- **Same-page trust boundary** -- The toolbar runs inside your proxied development page so it can inspect selected DOM elements. Do not use OpenMagic with untrusted third-party scripts running in that page.\n- **Not for production** -- This is a dev tool. Don't deploy the proxy to production.\n\n---\n\n## Comparison\n\n| Feature | OpenMagic | Stagewise | Frontman | Agentation |\n|---------|-----------|-----------|----------|------------|\n| Install | `npx openmagic` | npm + Electron | Framework middleware | npm package |\n| Framework support | Any (reverse proxy) | React, Vue, Angular, Svelte | Next.js, Astro, Vite | React |\n| Code modification | Yes (diff + approve) | Yes (via IDE) | Yes | No (clipboard) |\n| BYOK | Yes | Paid tiers | Yes | N/A |\n| Prompt limits | None | 10 free/day | None | N/A |\n| Vision | Yes | Yes | No | No |\n| Network profiling | Yes | No | Server-side | No |\n| Multi-repo | Yes | No | No | No |\n| IDE required | No | VS Code extension | No | No |\n| License | MIT | Partial | Apache 2.0 | MIT |\n\n---\n\n## Framework Compatibility\n\nOpenMagic works via reverse proxy, so it supports any framework that serves HTML:\n\n**JavaScript/TypeScript** -- React, Next.js, Vue, Nuxt, Angular, Svelte, SvelteKit, Astro, Remix, Solid, Qwik, Ember\n\n**Server-rendered** -- Django, Flask, Rails, PHP (Laravel, WordPress)\n\n**Static** -- Plain HTML with any HTTP server\n\n---\n\n## Contributing\n\nPRs are welcome. Bug fixes, new providers, UI improvements, docs.\n\n```bash\ngit clone https://github.com/Kalmuraee/OpenMagic.git\ncd OpenMagic\nnpm install\nnpm run build\nnode dist/cli.js --port 3000   # Test with your dev server\n```\n\nSee **[CONTRIBUTING.md](./CONTRIBUTING.md)** for the architecture overview, how to add providers, and PR process.\n\n---\n\n## Changelog Highlights\n\n| Version | Milestone |\n|---------|-----------|\n| v0.1 - v0.3 | Core reverse proxy, dev server auto-detection, initial toolbar |\n| v0.4 - v0.7 | Robustness hardening, Chinese model providers, session auth |\n| v0.8 - v0.10 | Complete toolbar rewrite, professional UI, security audit (19 fixes) |\n| v0.11 - v0.14 | Single-port architecture, diff preview, per-provider keys, streaming |\n| v0.15 - v0.17 | Network profiling, image attachments, HMR WebSocket fixes |\n| v0.18 - v0.20 | Full element context (parents, siblings, React props), auto-retry grounding |\n| v0.21 - v0.22 | Fuzzy diff matching, import chain following |\n| v0.23 - v0.24 | Undo, keyboard shortcuts, minimize, markdown rendering, chat polish |\n\n---\n\n## Author\n\n**Khalid Almuraee** ([@kalmuraee](https://github.com/kalmuraee))\n\n## License\n\nMIT -- Copyright (c) 2026 Khalid Almuraee. See [LICENSE](./LICENSE) for details.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n\n**BYOK. Any framework. Zero lock-in.**\n\n[GitHub](https://github.com/Kalmuraee/OpenMagic) \u0026#183; [Website](https://kalmuraee.github.io/OpenMagic/) \u0026#183; [npm](https://www.npmjs.com/package/openmagic) \u0026#183; [Report a Bug](https://github.com/Kalmuraee/OpenMagic/issues) \u0026#183; [Request a Feature](https://github.com/Kalmuraee/OpenMagic/issues)\n\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKalmuraee%2FOpenMagic","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FKalmuraee%2FOpenMagic","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FKalmuraee%2FOpenMagic/lists"}