LinuxCommandLibrary
GitHubF-DroidGoogle Play Store

opencode-web

Start OpenCode with web interface

TLDR

Start OpenCode with web UI on a random local port
$ opencode web
copy
Bind to all interfaces on a fixed port (for remote access)
$ opencode web --hostname 0.0.0.0 --port [4096]
copy
Advertise the service over mDNS/Bonjour
$ opencode web --mdns
copy
Enable CORS for cross-origin browser clients
$ opencode web --cors
copy
Stream server logs to the terminal
$ opencode web --print-logs --log-level debug
copy

SYNOPSIS

opencode web [options]

DESCRIPTION

opencode web starts a headless OpenCode server that exposes a web-based interface instead of the terminal TUI. This allows interacting with OpenCode through a browser, which can be useful for remote access, sharing sessions, or when a graphical interface is preferred over the terminal. When --mdns is enabled the service is discoverable on the local network without needing to know its IP.

PARAMETERS

--hostname HOST

Interface to bind to (default 127.0.0.1).
--port PORT
TCP port (default 0 — pick an ephemeral port).
--mdns
Announce the server on the local network via mDNS.
--mdns-domain DOMAIN
Override the mDNS service domain (default .local).
--cors
Allow cross-origin requests from browsers.
--print-logs
Print server-side logs to the terminal.
--log-level LEVEL
Log verbosity: trace, debug, info, warn, error.
-h, --help, -v, --version
Display help or version information.

SEE ALSO

Copied to clipboard
Kai