Installation
Install the CLI
Install Lanterna globally using your preferred package manager:
# Bun (recommended)bun add -g @lanternajs/cli
# npmnpm install -g @lanternajs/cliPrerequisites
For iOS
- macOS — iOS profiling requires macOS (any version that supports Xcode).
- Xcode Command Line Tools — Lanterna uses
xcrun xctraceunder the hood. Install the tools if you haven’t already:Terminal window xcode-select --install - Simulator or physical device — Either an iOS Simulator or a connected physical device. Verify with:
Terminal window xcrun simctl list devices booted
For Android
- Android SDK — The Android SDK must be installed. Android Studio is not required, but the SDK platform tools must be available.
- ADB in PATH — Lanterna communicates with Android devices via
adb. Verify it is accessible:You should see at least one device or emulator listed.Terminal window adb devices - Emulator or physical device — Either a running Android emulator or a connected physical device with USB debugging enabled.
Runtime
- Bun v1.0+ — Lanterna is built on Bun. Install it from bun.sh if you don’t have it yet:
Terminal window curl -fsSL https://bun.sh/install | bash
Verify the Installation
Run the following command to confirm Lanterna is installed correctly:
lanterna --helpYou should see the full help output listing available commands and options.
Optional: In-App Module
For deeper performance insights beyond what platform CLIs can provide (Tier 2 and Tier 3 metrics), you can add the @lanternajs/react-native package to your app. This enables real-time FPS tracking, Hermes profiling, React Profiler integration, and more.
bun add @lanternajs/react-nativeSee the In-App Module overview for setup instructions and available features.