github / github/copilot-cli

Feature request: local web interface (like `opencode web`)

未關閉
#3,301 1 則留言 3 個 reaction 已指派 0 人 在 GitHub 檢視
area:non-interactive
主要語言
Shell
星號
11.2k
分支
1.9k
平均合併
14 小時 16 分鐘
30 天內合併 PR
6

描述

## Motivation

OpenCode ([opencode.ai](https://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`

```bash
$ 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

- OpenCode web docs: https://opencode.ai/docs/cli#web
- OpenCode repo: https://github.com/anomalyco/opencode

貢獻指南

開啟貢獻指南

研究方向

Start by reading the existing --acp server mode and --remote entry points, then determine how a local web server and browser UI would fit the CLI. Done would mean a documented copilot web command that serves the proposed local interface with the described session and terminal integration.

由索引模型根據 Issue 內容生成。

評估

技術堆疊
shell
領域
backend, cli, web-dev
Issue 類型
功能
難度
5/5
預估耗時
一週以上
活躍度
冷清
描述清晰度
基本清楚
新手友好度
35/100

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。