Skip to main content
Mentra Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.There is currently no way to distribute a miniapp built with the Miniapp SDK. In a future release, developers will upload miniapps through the Mentra Developer Console, and users will download them from the Mentra Miniapp Store. Neither service supports Miniapp SDK distribution in MentraOS 3.0.Only use the Miniapp SDK if you are comfortable with these limitations.Developing on Mentra Live? We recommend using the Mentra Bluetooth SDK.To enable miniapp development, open Settings in the Mentra App and tap the version number at the bottom ten times. Then open Debug Settings, turn on Miniapp Developer Settings, return to Settings, and open Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at help@mentra.glass.
session.led controls the indicator LED on supported glasses. You give it a color and a blink pattern, and it tells the LED to turn on or off.
src/background/index.ts
The LED needs glasses with a LIGHT hardware capability. Declare it in your manifest so the miniapp only installs on glasses that have an LED. There’s no runtime permission to request.

Methods

LedControlOptions is the shape turnOn accepts:

Colors

LedColor is a fixed set of names. The phone maps each name to the per-device LED index, so the same name can light different physical LEDs across glasses.
Every method returns a Promise that resolves once the command is dispatched to the glasses, not when the blink pattern finishes playing. A blink("red", 200, 200, 4) call resolves right after the command goes out, well before the LED has run all four cycles. Don’t await the call as a way to wait for the LED to go dark; if you need timing, track it yourself.