Private Beta Badge
How the Private Beta badge works and how to enable it across desktop and web.
The Private Beta badge is a visual indicator shown in the Cosmo desktop titlebar and web marketing site. It is driven by a single server-side environment variable and fetched at runtime — no client rebuilds required to toggle it.
How it works
The server exposes a public endpoint (no auth required):
GET /api/v1/config/flags
→ { "showPrivateBeta": boolean }- Desktop: the main process calls
fetchFeatureFlagsfrom@cosmohq/corevia theconfig:feature-flagsIPC channel.HomePagereads the result with auseEffect. - Web: each server component calls
getFeatureFlags()from@/lib/features— a React-cache-wrapped call to the same core utility. Header, Footer, and the hero pill all share one fetch per request.
Configuration
Set one variable on the server:
SHOW_PRIVATE_BETA=trueBoth shells also need to point at the server:
| Package | Variable | Example |
|---|---|---|
| Desktop | MAIN_VITE_COSMO_SERVER_URL | https://api.getcosmo.app |
| Web | NEXT_PUBLIC_COSMO_SERVER_URL | https://api.getcosmo.app |
Removing the badge
Unset SHOW_PRIVATE_BETA on the server. No client deployments or rebuilds needed.