Web companion (PWA)
web/ is a standalone React + Vite + Tailwind v4 progressive web app
that connects to a running lime bridge. It is installable as an app
on iOS, Android, and desktop browsers, and it speaks the same JSON-RPC
bridge protocol as the VS Code extension.
Hosted instance
A ready-to-use build is hosted at
lime-web.pages.dev. Open it in any
browser, point it at a running lime bridge --ws … (local LAN, or a
remote-control Cloudflare tunnel), and
“Install app” from the browser menu to add it to your home screen. No
build step required for casual use — see the local-dev and self-host
recipes below if you want to run your own copy.
What it gives you
- Streaming markdown with Shiki syntax highlighting.
- Slash command palette + custom command modal.
- Permission and
ask_user_questionmodals. - Plan, MCP, and config overlays.
- Image paste & history.
- Installable as an app (PWA) with manifest + service worker.
- Light/dark theming matching the Lime brand.
Run locally
cd webnpm installnpm run dev# → vite dev server; point it at a running `lime bridge --ws ...`Connect the dev server to your local bridge:
1. Run the bridge: lime bridge --ws --ws-port 9111 --ws-token "$(openssl rand -hex 32)"
2. Open http://localhost:5173 in your browser.
3. In the connection dialog: - URL: ws://127.0.0.1:9111 - Token: <the token from step 1>Build for deployment
cd webnpm run build# → web/dist/ (static, ready for Cloudflare Pages / Netlify / S3 / nginx)The build produces a fully static site. _headers and _redirects for
Cloudflare Pages are included.
Deployment recipe (Cloudflare Pages)
| Setting | Value |
|---|---|
| Framework preset | None / Vite |
| Root directory | web |
| Build command | npm install && npm run build |
| Build output | dist |
| Node version | 20 (set NODE_VERSION=20) |
For remote drives over the internet, serve the PWA from a stable hostname and pair it with Lime remote control.
Why it’s a PWA
The PWA model gives us:
- Installability — your phone treats Lime as an app.
- Offline shell — the UI shell loads without a network.
- Background syncing — the bridge connection survives a screen lock.
- Browser-native, no app store.
Pairing with remote control
The PWA pairs naturally with lime remote start:
- Run
lime remote pair --label "my-phone"to mint a one-time device token. - Run
lime remote startto bind the bridge and spin up a Cloudflare Quick Tunnel. - The CLI prints a one-shot pairing URL — open it on your phone in the PWA, and the device token is exchanged for a long-lived credential.
After pairing, the phone can rejoin without re-prompting. See Remote control.