Skip to content

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.

What it gives you

  • Streaming markdown with Shiki syntax highlighting.
  • Slash command palette + custom command modal.
  • Permission and ask_user_question modals.
  • 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

Terminal window
cd web
npm install
npm 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

Terminal window
cd web
npm 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)

SettingValue
Framework presetNone / Vite
Root directoryweb
Build commandnpm install && npm run build
Build outputdist
Node version20 (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:

  1. Run lime remote pair --label "my-phone" to mint a one-time device token.
  2. Run lime remote start to bind the bridge and spin up a Cloudflare Quick Tunnel.
  3. 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.