Documentation
¶
Overview ¶
Package cli implements the wallfacer CLI subcommands.
Package cli implements all wallfacer CLI subcommands: run (start server), status (print board state), doctor (check prerequisites), and exec (attach to container).
The run subcommand wires together the HTTP server, workspace manager, task store, runner, and handler into a running system. Other subcommands provide operational tooling for inspecting and interacting with the running server or sandbox containers. Platform-specific signal handling and process execution are isolated in _unix.go and _windows.go files.
Connected packages ¶
This is the top-level orchestrator that depends on nearly every internal package: apicontract for route registration, handler for HTTP handlers, runner for task execution, store for persistence, workspace for workspace lifecycle, envconfig for configuration, logger for logging, metrics for instrumentation, constants for system parameters, and prompts for template management. Changes to any of these packages may require corresponding updates in cli.
Usage ¶
cli.RunServer(configDir, args, uiFS, docsFS) // start HTTP server cli.RunStatus(configDir, args) // print board state cli.RunDoctor(configDir) // check prerequisites cli.RunExec(configDir, args) // attach to container
Index ¶
- Variables
- func BuildMux(h *handler.Handler, reg *metrics.Registry, indexData IndexViewData, ...) *http.ServeMux
- func ConfigDir() string
- func PrintUsage()
- func RunDoctor(configDir string)
- func RunExec(configDir string, args []string)
- func RunServer(configDir string, args []string, uiFS, docsFS fs.FS)
- func RunStatus(_ string, args []string)
- type IndexViewData
Constants ¶
This section is empty.
Variables ¶
var Version = ""
Version is set at build time via -ldflags. When empty (dev build), the binary pulls the :latest sandbox image.
Functions ¶
func BuildMux ¶
func BuildMux(h *handler.Handler, reg *metrics.Registry, indexData IndexViewData, uiFS, docsFS fs.FS) *http.ServeMux
BuildMux constructs the HTTP request router.
All API routes are registered from apicontract.Routes (the single source of truth). The handlers map below pairs each route Name with its http.HandlerFunc, applying per-route middleware (e.g. UUID parsing via withID) at map construction time. A startup panic is triggered if a route in the contract has no corresponding handler entry, preventing silent drift.
func ConfigDir ¶
func ConfigDir() string
ConfigDir returns the default wallfacer configuration directory.
func RunDoctor ¶
func RunDoctor(configDir string)
RunDoctor implements the `wallfacer doctor` subcommand. It displays configuration paths, checks prerequisites, and reports whether credentials, container runtime, sandbox images, and git are ready. Items marked [!] need attention; [ ] are optional.
Types ¶
type IndexViewData ¶
type IndexViewData struct {
ServerAPIKey string
}
IndexViewData holds the data passed to the index.html template.