OpenCode Web Usage (Browser Interface)
Besides the terminal (TUI), OpenCode also provides a Web interface, allowing direct use of AI programming capabilities through a browser.
Web mode is suitable for: remote access, team collaboration, visual operations.
OpenCode Web is the graphical version of TUI, upgrading AI programming from a terminal tool to a visual collaboration platform.
I. What is OpenCode Web?
OpenCode Web is a graphical interface version based on HTTP services; essentially:
- Backend: OpenCode service (started via CLI)
- Frontend: browser interface
Can be understood as:Visual version of TUI

II. Start Web service
1. Basic start
opencode web
By default, it will:
- Start a local HTTP service
- Automatically open the browser
2. Custom port
opencode web --port 4096
3. Allow external access (important)
opencode web --hostname 0.0.0.0 --port 4096
Can be accessed on LAN or remotely
III. Access method
After starting, access in the browser:
http://localhost:4096
Or:
http://你的IP:4096
IV. Interface description
The OpenCode Web interface usually includes:
- **Input area:** enter prompts (similar to ChatGPT)
- **Conversation area:** display AI output results
- **File context:** automatically read project code
- **Operation log:** command execution and modification logs
Essentially consistent with TUI, just more intuitive
V. Basic usage
1. Ask questions
帮我分析这个项目的结构
2. Reference files
这个函数是做什么的?@src/index.js
3. Execute modifications
把这个函数拆成三个函数,并增加错误处理
Explanation:
- Web and TUI commands are completely consistent
- Also supports context understanding
4. Sessions
View and manage your sessions on the homepage. You can view active sessions or create new ones.

5. Server status
Click See Servers to view connected servers and their status.

VI. Authentication (security settings)
If you use it on a public network or in a team environment, it is recommended to enable authentication:
export OPENCODE_SERVER_PASSWORD=123456
opencode web
Explanation:
- Username default: opencode
- Password: the value you set
VII. Common usage scenarios
1. Remote development
- Server runs OpenCode
- Remote access via browser
2. Team sharing
- Multiple people view AI modification results
- Share conversation context
3. Demonstration / teaching
- More intuitive than the terminal
- Suitable for screen recording and demonstration
VIII. Web vs TUI
| Dimension | TUI (terminal) | Web (browser) |
|---|---|---|
| Usage | Command line | Graphical interface |
| Operation efficiency | High (many shortcuts) | Medium |
| Visualization | Weaker | More intuitive |
| Remote access | Relatively complex | Simple |
| Suitable for | Developers | Beginners / teams |
IX. Frequently Asked Questions
1. Cannot access the page
Check:
- Whether the port is open
- Whether the correct address is used (localhost / IP)
2. Cannot access remotely
Make sure to use:
--hostname 0.0.0.0
3. Port is occupied
Change the port:
opencode web --port 5000