[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-3451":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":16,"stars7d":16,"stars30d":16,"stars90d":16,"forks30d":16,"starsTrendScore":16,"compositeScore":17,"rankGlobal":10,"rankLanguage":10,"license":18,"archived":19,"fork":19,"defaultBranch":20,"hasWiki":19,"hasPages":19,"topics":21,"createdAt":10,"pushedAt":10,"updatedAt":22,"readmeContent":23,"aiSummary":24,"trendingCount":16,"starSnapshotCount":16,"syncStatus":25,"lastSyncTime":26,"discoverSource":27},3451,"local.vibe","graiz\u002Flocal.vibe","graiz","Create local .vibe domains for your vibe coded projects","",null,"Go",102,5,116,4,0,2.33,"MIT License",false,"main",[],"2026-06-12 02:00:50","# local.vibe\n\n> `myapp.vibe` instead of `localhost:3000` — for every project on your Mac or Windows box.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdashboard-grid.jpg\" alt=\"local.vibe dashboard\" width=\"820\">\n\u003C\u002Fp>\n\nDev work drifts into a mess of `localhost:3000`, `localhost:5173`, `localhost:8080` tabs. Which port was the blog on again? **local.vibe** gives every local project a friendly `.vibe` hostname and puts start\u002Fstop controls in one dashboard at [https:\u002F\u002Flocal.vibe](https:\u002F\u002Flocal.vibe).\n\nmacOS and Windows. Single Go binary. No external services.\n\n## What you get\n\n- **Friendly hostnames** — `myapp.vibe` resolves to your local app over HTTP *and* HTTPS\n- **Auto-assigned ports** — drop `port` from `vibe.json`, vibe picks a free one and exposes it as `$PORT`\n- **Dashboard** — start\u002Fstop managed apps, add bookmarks, pick icons, switch list\u002Fgrid\n- **HTTPS built-in** — a local CA is trusted in your Keychain; per-route SANs hot-reload without restart\n- **Agent-friendly** — paste `curl http:\u002F\u002Flocalhost:7999\u002Fsetup.md` into Claude Code \u002F Cursor and it understands the setup\n- **Bookmark anything** — route `tailscale.vibe` → your Tailscale machine, `office.vibe` → Home Assistant\n- **Zero hidden deps** — single binary, Cobra + Go stdlib, no Node, no Docker\n\n## Install\n\n### macOS\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fgraiz\u002Flocal.vibe.git\ncd local.vibe\n.\u002Fsetup.sh\n```\n\nInstalls Homebrew (if missing), Go, dnsmasq, `\u002Fetc\u002Fresolver\u002Fvibe`, pf rules for port forwarding, and a local TLS CA trusted in your Keychain — then opens the dashboard.\n\n### Windows (preview)\n\nRun from an **elevated** terminal (right-click → \"Run as administrator\", or `sudo` on Win11 24H2+):\n\n```powershell\ngit clone https:\u002F\u002Fgithub.com\u002Fgraiz\u002Flocal.vibe.git\ncd local.vibe\n.\\setup.bat\n```\n\n`setup.bat` is a thin wrapper that invokes `setup.ps1` with the right ExecutionPolicy override, so you don't need to touch `Set-ExecutionPolicy` first. If you'd rather run the .ps1 directly, set the policy for the session and call it explicitly:\n\n```powershell\nSet-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -Force\n.\\setup.ps1\n```\n\nThe script installs Go via winget if missing, builds the binary, copies it to `%LOCALAPPDATA%\\Programs\\vibe\\vibe.exe`, then runs `vibe setup` which:\n\n- before any state change, checks UDP :53 is bindable; if it's held (Acrylic DNS, Internet Connection Sharing, NextDNS, Pi-hole are common), names the offender and offers a clean abort with no system modifications\n- generates the local TLS CA + leaf cert and trusts it via `certutil -addstore Root`\n- adds netsh portproxy rules so 80→7999 and 443→7443\n- snapshots each adapter's pre-vibe DNS to `~\u002F.vibe\u002Fdns-backup.json`, then repoints every connected adapter's primary DNS to 127.0.0.1 (the daemon embeds a tiny resolver that answers *.vibe locally and forwards everything else to whichever upstream answered first — your previous DNS server, falling back to 1.1.1.1 \u002F 8.8.8.8 \u002F 9.9.9.9)\n- registers a Scheduled Task `vibe` triggered on logon, running at your normal (medium) integrity level — the daemon's runtime needs are all unprivileged on Windows (binding low ports doesn't require admin, unlike POSIX), so dev servers and dashboard handlers don't inherit Administrator\n- when a managed route's port is held by another process, the dashboard shows the offender's PID + image name (via `tasklist`) and offers a one-click \"Kill PID and Retry\"\n\n`vibe uninstall` reverses every step and restores each adapter's DNS from the snapshot. Three safety layers ensure you never end up with a dead resolver: loopback (127.x.x.x) entries are stripped at snapshot time, again at restore time, and a final pass after restore force-resets to DHCP on any adapter still pointing at vibe's removed listener. Re-running `vibe setup` preserves the original backup rather than overwriting it with the post-setup state, so the very first pre-vibe configuration is what gets restored at uninstall.\n\nIf something does go wrong, manual recovery is one command per adapter:\n```powershell\nnetsh interface ipv4 set dnsservers name=\"Wi-Fi\" dhcp\n```\n\n**Firefox:** modern Firefox honors `security.enterprise_roots.enabled` and reads the Windows root store, so it picks up the local CA automatically. If you still see a cert warning on `https:\u002F\u002F*.vibe`, open `about:config`, search for `security.enterprise_roots.enabled`, and set it to `true`. Same setting applies on macOS (it reads Keychain).\n\n### Linux\n\nLinux support is documented but not yet automated. Run `.\u002Fsetup.sh` for now and follow the printed instructions, or wait for the dedicated Linux branch.\n\n## Your first app\n\nDrop this in any project root:\n\n```json\n{\n  \"name\": \"myapp\",\n  \"cmd\": \"npm run dev\"\n}\n```\n\n```bash\nvibe start\n# started: myapp → https:\u002F\u002Fmyapp.vibe (port 3000)\n```\n\nvibe picks a free port starting at 3000 and passes it to your app via `$PORT`. The daemon keeps it running; `vibe stop myapp` shuts it down. Visit `https:\u002F\u002Fmyapp.vibe` in any browser.\n\n## Dashboard\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdashboard-list.jpg\" alt=\"local.vibe list view\" width=\"820\">\n\u003C\u002Fp>\n\nSwitch between grid and list views (preference persists across restarts). Each row shows route type, port, uptime, and start\u002Fstop\u002Fedit controls. The modal editor supports custom emoji or auto-detected favicons; bookmark routes either redirect or reverse-proxy to any external URL — handy for Tailscale hosts or Home Assistant dashboards. Proxy mode keeps the `.vibe` name in the browser's URL bar, with an optional opt-in for self-signed upstream certs.\n\nWhen a managed route's process rebinds to a different port or exits, the daemon serves a \"Reconnecting…\" or \"Not running\" page instead of a dead proxy. It auto-discovers the new port via `lsof` (macOS) or `netstat -ano` filtered by Job Object membership (Windows) plus log-tail regex, and surfaces recovery hints (orphan PID, port-in-use) as one-click \"Kill PID X and Retry\" buttons.\n\n---\n\n## Reference\n\n### CLI\n\n```bash\nvibe --help                          # Show all commands\nvibe start                           # Start from vibe.json in the current dir\nvibe start myapp                     # Start an already-registered route\nvibe start myapp 3000 -- npm run dev # Register + start inline\nvibe stop myapp                      # Stop a managed app\nvibe restart myapp                   # Stop + start (picks up vibe.json edits)\nvibe register myapp 3000             # Static mapping (no process management)\nvibe deregister myapp                # Remove a route\nvibe list                            # List all routes\nvibe status                          # Show daemon health\nvibe open myapp                      # Open in browser\nvibe dev                             # Rebuild + restart daemon (for contributors)\n```\n\n### `vibe.json`\n\n| Field | Required | Description |\n|-------|----------|-------------|\n| `name` | yes | Subdomain: `name.vibe` |\n| `port` | no | Port your app listens on (omit or `0` for auto-assign) |\n| `cmd` | yes | Shell command to start the app |\n| `icon` | no | Emoji or image URL for the dashboard |\n| `idle_timeout` | no | Auto-stop after N minutes of no traffic (0 = never) |\n| `oauth_callback_port` | no | Fixed localhost port for OAuth callbacks |\n| `reserve_ports` | no | `{\"name\": port}` map of auxiliary ports the cmd binds; injected as `$PORT_\u003CUPPER_NAME>` (see [setup.md](internal\u002Fdaemon\u002Fsetup.md#apps-that-bind-more-than-one-port)) |\n\n**Tip:** use `python3` (not `python`) on macOS. For Python apps, prefer a venv: `\".venv\u002Fbin\u002Fpython app.py\"`.\n\n### Framework notes\n\n**Vite** (React, Vue, Svelte) — add `.vibe` to `vite.config.js`:\n```js\nexport default defineConfig({ server: { allowedHosts: ['.vibe'] } })\n```\n\n**Next.js** — in `next.config.js`:\n```js\nmodule.exports = { allowedDevOrigins: ['*.vibe'] }\n```\n\n**Flask** — disable the reloader (debug error pages still work):\n```python\napp.run(debug=True, use_reloader=False, host='0.0.0.0',\n        port=int(os.environ.get(\"PORT\", 5000)))\n```\nOr via CLI: `flask run --debug --no-reload --port $PORT`\n\n**Django**:\n```bash\npython3 manage.py runserver --noreload 0.0.0.0:$PORT\n```\n\n### Route types\n\n| Type | Created by | Lifecycle |\n|------|-----------|-----------|\n| **managed** | `vibe start` \u002F dashboard | Daemon manages the process; start\u002Fstop controls |\n| **sticky** | `vibe register` | Persists across daemon restarts |\n| **bookmark** | Dashboard | Redirects (307) or reverse-proxies to an external URL |\n\n### HTTP API\n\nAll endpoints live under `https:\u002F\u002Flocal.vibe\u002F_api\u002F` (or `http:\u002F\u002Flocalhost:7999\u002F_api\u002F`).\n\n```bash\ncurl \u002F_api\u002Fhealth                                # {\"status\":\"ok\",\"routes\":3,\"uptime\":120}\ncurl \u002F_api\u002Froutes                                # List all routes\ncurl -X POST \u002F_api\u002Froutes \\\n  -H 'Content-Type: application\u002Fjson' \\\n  -d '{\"name\":\"app\",\"cmd\":\"npm run dev\",\"dir\":\"\u002Fpath\u002Fto\u002Fproject\"}'\ncurl -X PUT    \u002F_api\u002Froutes\u002Fapp -d '{\"port\":3001,\"icon\":\"🚀\"}'\ncurl -X POST   \u002F_api\u002Froutes\u002Fapp\u002Fstart            # 409 if port occupied\ncurl -X POST   \u002F_api\u002Froutes\u002Fapp\u002Fstop\ncurl           \u002F_api\u002Froutes\u002Fapp\u002Fready            # {\"ready\":true,\"running\":true}\ncurl -X DELETE \u002F_api\u002Froutes\u002Fapp\ncurl -X PUT    \u002F_api\u002Fpreferences -d '{\"view\":\"grid\"}'\n```\n\nPort conflicts return `409` with the occupied port. Immediate process crashes include the last few lines of `~\u002F.vibe\u002F{name}.log` in the error response. Auto-assigned ports come back as `\"port\": \u003Cnumber>`.\n\n### Runtime files\n\n| Path | Purpose |\n|------|---------|\n| `~\u002F.vibe\u002Froutes.json` | Persisted routes (sticky, managed, bookmark) |\n| `~\u002F.vibe\u002Fconfig.json` | Daemon config (port, TLD, dashboard view) |\n| `~\u002F.vibe\u002Fcerts\u002F` | Local CA + leaf cert (trusted in Keychain on macOS, Windows Root store via certutil on Windows) |\n| `~\u002F.vibe\u002Fdns-backup.json` | Windows-only: pre-setup adapter DNS snapshot for clean uninstall |\n| `~\u002F.vibe\u002Fdaemon.log` | Daemon log |\n| `~\u002F.vibe\u002F{name}.log` | Per-route process logs (tailed on crash) |\n| `~\u002F.vibe\u002Fdaemon.pid` | Daemon PID |\n| `~\u002F.vibe\u002Fvibe.sock` | Unix socket for CLI ↔ daemon (macOS; Windows falls back to TCP) |\n\n### Agents & automation\n\nA per-project setup guide is served by the daemon — paste this into any agentic IDE (Claude Code, Cursor, etc.) and the agent will know how to register a `.vibe` name for the project:\n\n```bash\ncurl http:\u002F\u002Flocalhost:7999\u002Fsetup.md\n```\n\n### Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md). PRs welcome.\n\n### License\n\n[MIT](LICENSE)\n","local.vibe 是一个用于为本地开发项目创建友好域名的工具。它通过将项目映射到 `.vibe` 域名，如 `myapp.vibe`，替代传统的 `localhost:端口号` 访问方式，并提供了一个集中管理的仪表板来控制应用的启动和停止。该工具支持自动分配端口、内置 HTTPS 支持、代理友好配置以及书签功能等特性。适用于 macOS 和 Windows 平台，仅依赖 Go 语言编译的单一二进制文件运行，无需额外的服务或依赖。对于需要频繁切换多个本地开发环境的开发者来说，local.vibe 可以显著提高工作效率并简化开发流程。",2,"2026-06-11 02:54:31","CREATED_QUERY"]