Cosmo Docs

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 fetchFeatureFlags from @cosmohq/core via the config:feature-flags IPC channel. HomePage reads the result with a useEffect.
  • 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=true

Both shells also need to point at the server:

PackageVariableExample
DesktopMAIN_VITE_COSMO_SERVER_URLhttps://api.getcosmo.app
WebNEXT_PUBLIC_COSMO_SERVER_URLhttps://api.getcosmo.app

Removing the badge

Unset SHOW_PRIVATE_BETA on the server. No client deployments or rebuilds needed.