Access GitHub Copilot CLI sessions from any device via a mobile-friendly web interface.
Phone/Browser ←→ DevTunnel ←→ Bridge Server ←→ Copilot SDK ←→ Copilot CLI
The bridge server uses the Copilot SDK to drive the real Copilot CLI agent — same model, same tools, same capabilities. No tool reimplementation needed.
- Node.js 18+
- Copilot CLI installed and authenticated:
npm install -g @github/copilot - Copilot subscription (Free, Pro, Business, or Enterprise)
- DevTunnel (optional, for phone access):
winget install Microsoft.devtunnel
# Install dependencies
npm install
# Start the bridge server
npm run dev
# Open http://localhost:3847 in your browser# Create a persistent tunnel (one-time)
devtunnel create copilot-sessions
devtunnel port create copilot-sessions -p 3847
# Start hosting (run alongside the server)
devtunnel host copilot-sessionsThe tunnel URL is stable — bookmark it on your phone.
The server uses Microsoft Entra ID (Azure AD) to authenticate users. Only a single specified user is allowed access.
- Go to Azure Portal → App registrations
- Click New registration
- Name:
Copilot Sessions(or anything you like) - Supported account types: Single tenant (or multi-tenant if using across personal/work)
- Redirect URI: Single-page application (SPA) →
http://localhost:3847/auth/callback- For devtunnel access, also add your tunnel URL:
https://<tunnel-id>.devtunnels.ms/auth/callback - Important: The redirect URI must be under the SPA platform, not Web (which requires a client secret)
- For devtunnel access, also add your tunnel URL:
- Click Register
- Copy the Application (client) ID and Directory (tenant) ID
Copy .env.example to .env and fill in your values:
cp .env.example .envAUTH_TENANT_ID=your-tenant-id
AUTH_CLIENT_ID=your-client-id
AUTH_ALLOWED_USER=you@example.comThe server will refuse to start if any of these are missing.
If you use this from both a personal and work Microsoft tenant, register an app in each tenant and switch the .env values as needed (or use a multi-tenant app registration).
Environment variables:
| Variable | Default | Description |
|---|---|---|
PORT |
3847 |
Server port |
COPILOT_MODEL |
claude-sonnet-4-5 |
Default LLM model |
COPILOT_CWD |
current directory | Default working directory |
COPILOT_SESSIONS_DIR |
~/.copilot-sessions |
Session storage path |
src/server.ts— Express + WebSocket bridge server, connects to Copilot SDKsrc/store.ts— File-based session persistence (JSONL message logs)src/types.ts— Shared TypeScript types for the WebSocket protocolpublic/— Mobile-first web frontend (vanilla JS, no build step)