Skip to content

Feature request: local web interface (like opencode web) #3301

Description

@AungMyoKyaw

Motivation

OpenCode (opencode.ai) recently shipped opencode web — a command that starts a local HTTP server and serves a browser-based UI for the AI coding agent. This is a killer feature that Copilot CLI currently lacks.

Copilot CLI is terminal-only (TUI), which limits the experience to one dimension.

What opencode web does

$ opencode web
                                   ▄
  █▀▀█ █▀▀█ █▀▀█ █▀▀▄ █▀▀▀ █▀▀█ █▀▀█ █▀▀█
  █  █ █  █ █▀▀▀ █  █ █    █  █ █  █ █▀▀▀
  ▀▀▀▀ █▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀ ▀▀▀▀

  Web interface:      http://127.0.0.1:4096/

Key capabilities:

  • Local HTTP server bound to 127.0.0.1 with a configurable port (--port)
  • Full browser UI — chat, file tree, diff viewer, session management
  • TUI attach — opencode attach http://localhost:4096 lets you connect a terminal session to the same server, sharing state/sessions
  • Auth — optional HTTP basic auth via OPENCODE_SERVER_PASSWORD
  • mDNS discovery — --mdns for LAN access
  • CORS support — --cors for custom domains

Proposed feature: copilot web

$ copilot web
# Starts a local HTTP server and opens the browser
# equivalent to: copilot --acp + web UI frontend

Benefits over terminal-only

Feature Terminal (TUI) Web interface
Syntax-highlighted diffs Basic Rich, side-by-side
File tree navigation Manual @ mentions Clickable tree
Multi-session management /resume Session tabs
Code review UX Scroll through text Inline comments, annotations
Mobile/tablet use Not practical Fully usable
Accessibility Screen-reader flag Native browser a11y
Sharing --share-gist URL sharing, screenshots

Implementation notes

  • Copilot CLI already has the --acp (Agent Client Protocol) server mode — the web UI could be a thin client on top of that
  • Could be implemented as a built-in plugin or separate package
  • The --remote flag already enables GitHub web control — but that is cloud-dependent; a local web server is simpler, faster, and works offline

References

Activity

  1. Yashhh999 commented on May 13, 2026

    @Yashhh999

    copilot web — Feature Proposal

    Refines github/copilot-cli#3301. Audience: GitHub Copilot CLI maintainers. Drop-in for the issue thread.

    Repo note: This working directory (github/copilot-cli) is the public release tracker — changelog, install script, issue templates only. The CLI itself is closed-source and shipped via @github/copilot on npm. So this plan is a design proposal, not an implementable diff. An "implement today" wrapper fallback appears at the end.


    Context

    OpenCode's opencode web ships a local HTTP server + browser UI for an AI coding agent — same workflow as the TUI but rendered in a browser, with rich diffs, clickable file trees, multi-session tabs, and optional LAN sharing. Copilot CLI is terminal-only today, which caps UX on three axes that matter to users:

    1. Diff and code-review density — a TUI cannot match a browser's side-by-side syntax-highlighted diff
    2. Navigation — @-mentions don't compete with a clickable file tree, especially on large repos
    3. Form factor — tablets, second monitors, screen readers, mobile-over-tailscale all become possible

    The infrastructure to support this already exists inside Copilot CLI; the missing piece is a first-party browser front-end and a copilot web entrypoint to start it.

    What exists that we can build on

    From the public changelog:

    Building block Changelog ref Why it matters
    --acp ACP server, localhost-bound line 309 ("ACP server binds to localhost only") Already speaks an agent protocol over a local socket; web UI would be another ACP client
    ACP feature parity lines 109, 115, 117, 126, 127, 139, 322, 471 Plans, skills, slash commands, custom agents, MCP, OAuth, allow-all toggle all flow through ACP
    --remote web control lines 334, 153, 305 GitHub-hosted browser UX already exists — but cloud-dependent, requires push, doesn't work offline
    /share html lines 332, 439 Self-contained interactive HTML renderer for sessions/reports already shipped; the rendering primitives exist
    HTTP hooks line 204 Codebase already has an HTTP client surface

    The architectural insight: copilot web is --acp + an embedded static web client + a tiny WebSocket/SSE bridge. It's a packaging and front-end project, not a new agent runtime.

    Proposal

    Command surface

    copilot web                          # bind 127.0.0.1, random port, open browser
    copilot web --port 4096              # fixed port
    copilot web --host 0.0.0.0           # LAN-accessible (warn + require auth)
    copilot web --no-open                # don't auto-launch browser
    copilot web --auth                   # require token; print URL with token in fragment
    copilot attach http://host:port      # connect TUI to same server (state-shared)
    

    Mirrors OpenCode's flag shape so users moving between tools have one mental model.

    Architecture

    ┌──────────────┐    HTTP/WS     ┌──────────────────────┐    ACP    ┌─────────────┐
    │ Browser UI   │ ─────────────► │ copilot web frontend │ ────────► │ ACP runtime │
    │ (static SPA) │ ◄───────────── │ (HTTP+WS bridge)     │ ◄──────── │ (existing)  │
    └──────────────┘                └──────────────────────┘           └─────────────┘
                                              ▲
                                              │ same process
                                    ┌─────────┴────────┐
                                    │ optional TUI     │
                                    │ via `attach`     │
                                    └──────────────────┘
    

    Single process, single port. The HTTP layer serves static assets + proxies ACP messages over WebSocket. State, permissions, MCP, LSP, and slash commands route through the existing ACP runtime — no second source of truth.

    UX scope (v1)

    In:

    • Session list / new / resume / delete
    • Chat with markdown, code blocks, plan rendering
    • Side-by-side diff view with accept/reject (same approval semantics as TUI)
    • File tree, click-to-mention, click-to-open
    • Permission prompts (TUI parity)
    • /share deep-links the current session

    Out (v1):

    • Inline code editing (browse + diff only — editing stays in the user's IDE)
    • Multi-user collaboration
    • Persistent server (process dies when last client disconnects, configurable)

    Security defaults

    • Bind 127.0.0.1 by default, never 0.0.0.0 without an explicit flag
    • Auto-generate a per-process token; URL is http://127.0.0.1:PORT/#token=...
    • --host 0.0.0.0 requires --auth (refuse to start otherwise)
    • Same allow-list / approval model as TUI; no implicit "trust browser" elevation
    • Reuse the localhost-only guard already in place for --acp (changelog line 309)

    Phasing

    1. Spike: minimal web client (chat only) over the existing --acp socket, run out-of-process. Validates the protocol surface.
    2. copilot web command: bundle the static client, embed the HTTP/WS bridge, ship as part of @github/copilot.
    3. Diff + file tree: port /share html rendering primitives into the live UI.
    4. copilot attach: TUI-as-second-client against the same server, sharing session state.
    5. LAN / auth hardening: --host, --auth, optional mDNS.

    Open questions for maintainers

    1. Is --acp considered a stable enough surface to layer a first-party UI on, or is it still evolving?
    2. Distribution: bundle the web assets into the npm tarball, or fetch on first copilot web run? (Bundle size vs. offline-first tradeoff.)
    3. Relationship to --remote: keep both (--remote = cloud-hosted, web = local) or eventually converge?
    4. Does the closed-source license permit a community wrapper to ship a UI against --acp in the interim?

    Appendix: wrapper fallback (build today, no maintainer cooperation)

    If GitHub doesn't prioritize this, the same UX can be assembled today as a third-party package:

    • Spawn copilot --acp as a child process
    • ACP client speaks to it over the documented socket (Zed already does this)
    • Serve a static SPA from a small Node/Bun HTTP server on the same process
    • Bridge browser ↔ ACP via WebSocket
    • Package as npx copilot-web or copilot-web brew formula

    Effort estimate: ~2–3 weeks for a single dev to reach chat + diff parity, given Zed's ACP client as a reference. Risk: ACP surface changes between CLI releases without a SemVer contract — wrapper will need a version compatibility matrix.

    This appendix is included so the proposal is concrete: even the worst case (GitHub declines) is buildable.

    Verification (if shipped first-party)

    • copilot web opens browser, can run a full task end-to-end (prompt → tool calls → diff → approve → commit)
    • copilot attach connects to the same server; messages typed in the TUI appear in the browser and vice versa
    • --host 0.0.0.0 without --auth exits with a clear error
    • Token in URL fragment is required; visiting / without one returns 401
    • All slash commands available in the TUI work in the web UI (parity test matrix)
    • Permission prompts surface in whichever client is focused; approval is single-source
    • copilot web works fully offline (no calls to github.com beyond what the agent itself makes)
  2. added
    area:non-interactive
    on May 13, 2026
  3. added theissue type on May 13, 2026
  4. bcgrillo commented on Oct 24, 2026

    @bcgrillo

    Hi! I’ve been working on something along these lines and just published it: https://github.com/bcgrillo/copilot-web

    It’s a small, self-hosted web UI for copilot --acp, pretty much following the wrapper approach discussed above. It already handles sessions, streaming chat, tool calls, slash commands, and permission prompts in the browser. Sessions and history stay with the CLI (no separate database).

    Still an early beta! File edit/diff rendering and authentication are on the roadmap, so for now keep it on localhost or behind an authenticated reverse proxy.

    Not meant to replace a first-party copilot web, just sharing in case it’s useful to anyone here. Would love to hear what works, what breaks, and what’s missing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:non-interactive

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions