Expand description
Web server module for browser-based UI.
Provides a locally hosted HTTP server with REST API endpoints and a web UI that mirrors all CLI functionality. Supports foreground and daemon modes.
§Web Server Module
Provides a locally hosted HTTP server with REST API endpoints and a
single-page web UI that mirrors all CLI functionality. The server uses
the same Config and DefaultClientFactory as the CLI, ensuring
identical behavior.
§Usage
# Start in foreground (default port 8080)
scope web
# Custom port and bind address
scope web --port 3000 --bind 0.0.0.0
# Run as background daemon
scope web --daemon
# Stop a running daemon
scope web --stopModules§
Structs§
- AppState
- Shared application state passed to all handlers via Axum extractors.
Functions§
- build_
router - Builds the Axum router with all API routes and static file serving.
- is_
daemon_ child - Returns true if running as a daemon child process.
- log_
file_ path - Returns the path to the log file for the daemon.
- pid_
file_ path - Returns the path to the PID file for the daemon.
- start_
daemon - Starts the server as a background daemon (Unix only).
- start_
server - Starts the web server on the given address.
- stop_
daemon - Stops a running daemon by reading its PID file and sending SIGTERM.