anomalyco / anomalyco/opencode
feat(plugin): expose platform-safe external URL opener
Open
@kitlangton is already working on this.
Since Aug 13, 2026.
tui
- Dominant language
- TypeScript
- Stars
- 209k
- Forks
- 27.5k
- Avg merge
- 7h 2m
- Merged PRs (30d)
- 384
Description
Problem
V2 TUI plugins that open documentation, logs, pull requests, or other external URLs currently need to spawn platform-specific commands such as macOS open. This leaks host/platform concerns into plugins and does not work consistently on Linux or Windows.
Proposed Direction
Expose a small host-owned plugin API, for example:
context.app.openExternal(url)
The host should validate the URL and dispatch through the platform-appropriate mechanism.
Acceptance Criteria
- Available to V2 TUI plugins through
Plugin.Context. - Supports at least
http:andhttps:URLs. - Works on macOS, Linux, and Windows through host-owned behavior.
- Rejects unsupported or malformed schemes with a useful error.
- Has focused platform/validation tests.
Scope
This is a generic host capability. Plugins remain responsible for deciding which URL to open and when.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.