webui

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 30 Imported by: 0

Documentation

Overview

Package webui serves cct's local desktop GUI: a small single-page app served over a loopback-only HTTP server, backed by the same core packages as the CLI. It is pure standard library (no third-party web framework, no build step), so it cross-compiles to every target like the rest of the binary.

Safety model: the server binds to 127.0.0.1 only (never a routable address), requires a per-launch random token on every /api call (so other local processes and malicious web pages cannot drive it), and checks the Host header to mitigate DNS-rebinding. It never uploads anything; it is just a local face over the existing export/import/inspect operations.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(opts Options, stdout, stderr io.Writer) int

Run starts the desktop UI: it binds a loopback listener, prints (and opens) the URL, and serves until the process is interrupted. It blocks.

Types

type Options

type Options struct {
	CodexHome  string // optional --codex-home override
	ClaudeHome string // optional --claude-home override
	Port       int    // 0 = pick a free port
	NoBrowser  bool   // do not auto-open the browser
}

Options configures the desktop server.

type Server

type Server struct {
	// contains filtered or unexported fields
}

Server holds the running desktop UI state. It serves both agents (Codex and Claude Code); each request selects one via a ?tool= parameter, and import follows the bundle's recorded tool.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL