open-index/open-npm huggingface dataset:
npm package: @lanternajs/android
Description: Android performance data collection via adb and perfetto for Lanterna
Latest version: 0.0.4

# @lanternajs/android

Android performance data collection via `adb` and Perfetto for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/android
```

## What's inside

- **Collectors**: Gather FPS, CPU, memory, and frame drop metrics from Android devices
- **Parsers**: Parse output from `dumpsys gfxinfo`, `dumpsys meminfo`, and `top`
- **Process management**: Find and monitor Android app processes via ADB

## Usage

This package is primarily used internally by `@lanternajs/cli`. If you're building custom Android profiling tooling:

```ts
import { collectAndroidMetrics } from "@lanternajs/android";
```

## Requirements

- `adb` available on PATH
- Android device or emulator connected

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/cli
Description: CLI entry point for Lanterna — Lighthouse for mobile apps
Latest version: 0.0.4

# @lanternajs/cli

CLI entry point for [Lanterna](https://github.com/rogerfuentes/lanterna) — Lighthouse for mobile apps. One command to capture, analyze, and report React Native performance metrics.

## Installation

```bash
npm install -g @lanternajs/cli
```

## Usage

```bash
# Measure a running app
lanterna measure com.example.app

# Measure with options
lanterna measure com.example.app --duration 15 --platform ios --output report.json

# Run a Maestro E2E flow with performance collection
lanterna test --maestro login-flow.yaml

# Compare against a baseline
lanterna measure com.example.app --baseline previous-report.json

# Start live monitoring dashboard
lanterna monitor
```

## Commands

| Command | Description |
|---------|-------------|
| `measure <package>` | Collect performance metrics for a running app |
| `test --maestro <flow>` | Run a Maestro E2E flow and collect metrics |
| `monitor` | Start live monitoring dashboard (WebSocket server) |

## Requirements

- **Android**: `adb` on PATH, device/emulator connected
- **iOS**: macOS with Xcode, simulator running or device connected
- **Maestro** (optional): For E2E test flows

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/core
Description: Scoring engine, types, and metric normalization for Lanterna
Latest version: 0.0.3

# @lanternajs/core

Scoring engine, types, and metric normalization for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/core
```

## What's inside

- **Types**: `MetricSample`, `Device`, `ScoreResult`, `Platform`, and all shared interfaces
- **Scoring**: Weighted 0-100 score across FPS, CPU, memory, frame drops, and TTI
- **Thresholds**: Configurable good/needs-work/poor boundaries per metric
- **Comparison**: Baseline diff with regression detection
- **Device detection**: Auto-detect connected iOS simulators and Android emulators
- **Heuristics**: React Native-specific metric analysis

## Usage

This package is primarily used internally by other `@lanternajs/*` packages. If you're building custom tooling on top of Lanterna's scoring engine:

```ts
import { calculateScore, detectDevices, MetricType } from "@lanternajs/core";
```

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/expo-devtools-plugin
Description: Expo DevTools plugin for Lanterna performance monitoring
Latest version: 0.0.3

# @lanternajs/expo-devtools-plugin

Expo DevTools plugin for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/expo-devtools-plugin
```

## Usage

This plugin is automatically activated when using `<LanternaProvider>` from `@lanternajs/react-native` in an Expo app. It streams live performance metrics to the Expo DevTools browser panel.

No additional configuration required — just wrap your app with `LanternaProvider` and open Expo DevTools.

## What's included

- **Live metrics dashboard**: FPS, memory, CPU in the Expo DevTools browser panel
- **Screen-level metrics**: Per-screen render times, TTID, time-on-screen
- **Network summary**: Active requests, total count, average duration
- **Bridge stats**: Calls per second, top modules

## Requirements

- Expo >= 50.0.0
- `@lanternajs/react-native` installed and configured

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/ios
Description: iOS performance data collection via xctrace for Lanterna
Latest version: 0.0.4

# @lanternajs/ios

iOS performance data collection via `xcrun xctrace` for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/ios
```

## What's inside

- **Collectors**: Gather FPS, CPU, memory, and frame drop metrics from iOS simulators and devices
- **Parsers**: Parse xctrace XML export output and memory diagnostics
- **Process management**: Find and monitor iOS app processes
- **Xcode version detection**: Handle differences across Xcode releases

## Usage

This package is primarily used internally by `@lanternajs/cli`. If you're building custom iOS profiling tooling:

```ts
import { collectIosMetrics } from "@lanternajs/ios";
```

## Requirements

- macOS with Xcode installed
- `xcrun xctrace` available on PATH
- iOS Simulator running or physical device connected

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/react-native
Description: React Native in-app performance module for Lanterna
Latest version: 0.0.4

# @lanternajs/react-native

React Native in-app performance module for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/react-native
```

## Usage

Wrap your app root with `<LanternaProvider>` for zero-config performance profiling:

```tsx
import { LanternaProvider } from "@lanternajs/react-native";

export default function App() {
  return (
    <LanternaProvider>
      <Stack />
    </LanternaProvider>
  );
}
```

## What's included

- **FPS tracking**: Real-time UI frame rate via native CADisplayLink (iOS) / Choreographer (Android)
- **Memory monitoring**: Periodic memory usage snapshots
- **Navigation tracking**: Auto-detects Expo Router, or pass your own `navigationRef`
- **Network interception**: Track request count, duration, and active connections
- **Bridge/JSI tracking**: Monitor native-JS bridge call frequency
- **Hermes profiling**: CPU profile sampling via Hermes runtime
- **WebSocket streaming**: Stream metrics to `lanterna monitor` CLI in real-time
- **Expo DevTools Plugin**: Integration with Expo DevTools browser panel

## Requirements

- React Native >= 0.73.0
- React >= 18.0.0

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)
npm package: @lanternajs/report
Description: Terminal and HTML report output for Lanterna
Latest version: 0.0.3

# @lanternajs/report

Terminal and HTML report output for [Lanterna](https://github.com/rogerfuentes/lanterna) — a CLI-first performance profiler for React Native and Expo apps.

## Installation

```bash
npm install @lanternajs/report
```

## What's inside

- **Terminal output**: Colored, formatted performance reports in the terminal
- **HTML reports**: Standalone HTML performance reports
- **JSON export**: Machine-readable JSON output
- **Markdown**: Markdown-formatted reports (for CI comments, PRs)
- **Comparison**: Side-by-side baseline diff reports
- **Perfetto export**: Export traces for Chrome's Perfetto UI
- **Speedscope export**: Export profiles for Speedscope viewer

## Usage

This package is primarily used internally by `@lanternajs/cli`. If you're building custom report formats:

```ts
import { renderTerminalReport, exportJson } from "@lanternajs/report";
```

## License

Apache-2.0 — see [LICENSE](https://github.com/rogerfuentes/lanterna/blob/main/LICENSE)