Run the server
From a generated project with dependencies installed:
uv run --no-sync cayu serve --dev --host 127.0.0.1 --port 8000Open http://127.0.0.1:8000/cayu/. This is the explicit trusted-local access profile. Without --dev, the CLI requires an authentication target before constructing the application or binding a port.
Application ownership
Section titled “Application ownership”The configured factory is synchronous and takes no arguments. It returns one fresh, process-scoped CayuApp. Importing a project should not start a server, worker or model run. Store construction may perform bounded local setup; long-running services belong to explicit entrypoints.
[tool.cayu]factory = "app:build_app"
[tool.cayu.serve]auth = "cayu.server.environment_auth:OPERATOR_BASIC_AUTH"Provide CAYU_OPERATOR_USERNAME and CAYU_OPERATOR_PASSWORD through your deployment’s secret configuration. Missing or blank values fail closed. Use TLS for deployed HTTP access.
Embed the server
Section titled “Embed the server”Use create_server(app, config=...) with ServerConfig.protected(auth) for a configured application, or ServerConfig.local_development() for trusted local work. Authentication, CORS, docs exposure, dashboard configuration and lifecycle policy are explicit typed choices. Naming a deployment “development” does not relax its security settings.
The HTTP reference describes the default /api control plane. Optional transports and application-specific routes require their corresponding configuration. Read serve flags and server types.