Skip to content
Expo LynxExpo Lynx

Mini-app CLI

Build and publish one Lynx mini app from its own repository.

A mini-app repository has no Expo host checkout, native fingerprint, signing private key, or feature map. It declares only its allow-listed identity:

lynx-miniapp.config.ts
import { defineMiniApp } from 'expo-lynx-bundle-cli';
export default defineMiniApp({
appId: 'bs-one',
feature: 'merchant-home'
});

Use the fixed paths src/index.tsx and lynx.config.ts. The Console operator must create bs-one / merchant-home before an upload can start.

Terminal window
pnpm lynx release

The CLI builds release.zip, reserves its immutable ID with the Worker, and uploads it (via the Wrangler CLI by default, or directly to R2 if the operator chose that mode). The release is platform-neutral and contains no native runtime identity. After verification, the operator can select the same release for any compatible platform/runtime scope registered by the host team.

Use pnpm lynx release --draft to produce only dist/lynx-releases/<releaseId>/release.json and release.zip; use pnpm lynx release upload <directory> to resume it. Uploading never enables a bundle—the operator selects and enables it in the Console.

Mini-app CI needs LYNX_DELIVERY_SERVER, LYNX_DELIVERY_API_KEY, CLOUDFLARE_ACCOUNT_ID, and LYNX_DELIVERY_R2_BUCKET, plus whichever upload credential matches the operator’s chosen LYNX_DELIVERY_UPLOAD_MODE: CLOUDFLARE_API_TOKEN for the default Wrangler-CLI mode, or R2_ACCESS_KEY_ID/R2_SECRET_ACCESS_KEY for direct-to-R2. Keep them in the ignored .env.lynx; the CLI loads the nearest file automatically without replacing values already set by CI.