synth-ai serve launches a task app locally with uvicorn.
- Skipping
APP_IDopens an interactive picker sourced from registered apps, demos, and nearby modules. - Credentials come from
.envfiles supplied via--env-file, declared on the app entry, or discovered automatically. If none exist the command offers to create one and guides you through the required keys. - When an environment key is missing it prompts for
ENVIRONMENT_API_KEY(and optional vendor keys), writes them back to.env, and loads the values into the process. - Tracing (SFT JSONL, local Turso DB) is configurable at runtime—the CLI prompts for directories and paths when you omit the flags.
- Ports and reload options are managed for you.
--forcekills conflicting processes;--reloadenables uvicorn’s autoreload loop. - The environment is enriched before startup: keys are minted when supported, tracing variables are set, and demo directories created by
synth-ai setupare detected automatically.
Options
APP_ID— Task app identifier. Omit to open the interactive picker; provide one to bypass the prompt.--host VALUE— Listen address (0.0.0.0by default). Override when you only want to bind to localhost.--port VALUE— Port to bind. If omitted the CLI prompts you. Combine with--forcewhen you want the helper to terminate conflicting processes automatically.--env-file PATH— One or more.envfiles to load before startup. Repeat the flag to merge multiple files.--reload / --no-reload— Toggle uvicorn autoreload. Enable it while developing; leave it off in production for stability.--force / --no-force— Whether to kill processes already bound to the selected port. Set--forcewhen you want the CLI to free the port automatically.--trace DIR— Directory for traced rollout JSONL files. If omitted the CLI asks whether to enable tracing at all.--trace-db PATH— Override the default SQLite/Turso database path used for tracing metadata.
Notes
- When tracing is enabled the CLI sets
TASKAPP_TRACING_ENABLED,TASKAPP_SFT_OUTPUT_DIR, and the local Turso connection string so exporters and evaluators see consistent paths. - Inside the demo workspace the command prints a follow-up hint pointing to rollout scripts, so new users know how to collect traces immediately after starting the service.