Mentra Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.To put a miniapp in front of users, host it at an HTTPS URL and share the link, or get it listed in the Mentra Miniapp Store. See Publish your miniapp.Developing on Mentra Live? We recommend using the Mentra Bluetooth SDK.The developer tools are available in the Mentra App under Settings → Miniapp Developer Settings.Share feedback with an in-app bug report, on Discord, or by email at [email protected].
A miniapp is a bundle that runs on the user’s phone. This page covers putting builds on your own phones while you work. To share a miniapp with other people, see Publish your miniapp.
Looking for the @mentra/sdk cloud SDK? Apps used to be cloud-hosted servers built with @mentra/sdk. They’re now built on-device with the Mentra Miniapp SDK (@mentra/miniapp), which these docs cover. The older cloud SDK docs live at mentraglass.com/legacy.

Dev install (you, iterating)

While you’re building, mentra-miniapp dev serves your project over the LAN. Scan the QR from the Mentra App to install it; each change you save then installs on the phone and restarts the miniapp. This is the inner loop; see the Quickstart. A dev build is installed like any miniapp, from its local-network URL, and updates from that URL only: when you save, and when it opens. With your computer away it opens the build it has. There is one tile per package name, so you can scan and test several miniapps together; scan again only when the URL changes. Use a production build to try what users will get. On a phone signed in to a company workspace, the Miniapp Developer tools appear only if the workspace allows miniapp development. A dev build runs as the package named in its miniapp.json, so it can stand in for an installed copy of that package, until you uninstall it or install the release yourself: no update from another URL, workspace or Fleet assignment replaces it. It keeps its data apart from the installed copy’s. An unsigned dev build can’t replace a package installed from a bundle signed with a publisher key: uninstall the miniapp from the phone first, then scan again. session.auth works in a dev build the same way it does for the installed miniapp.

Production build (local testing over LAN)

To put the build users will get on one or more test phones on your local network, before you upload it, run:
This builds the production bundle, the one mentra-miniapp pack writes, and serves it from your computer at a local-network miniapp URL, behind the same plain-URL QR that dev prints. Anyone on the same network can scan it. The phone keeps the build it downloaded, so the miniapp runs offline, and persists across restarts: no laptop required once it’s installed. This is intended for local testing, demos, and dogfooding. To reach other people, publish your miniapp. The server stays up so multiple devices can install from the same QR. Nothing is watched, so a saved change doesn’t reach the phone. After a change, run mentra-miniapp dev --production again; the Mentra App takes the new build from the same URL the next time it opens the miniapp. While you develop, use mentra-miniapp dev instead: scan once, and every saved change installs on the phone. mentra-miniapp release is the former name of this command, and still runs for one more release of the CLI.

Publishing

To share a miniapp, host it at an HTTPS URL and let people install it from there; they can also find it in the Mentra Miniapp Store once Mentra staff list it. See Publish your miniapp. The CLI writes the folder to upload:
The folder is written to build/, with the ZIP named <packageName>-<version>-<hash>.zip. Make sure your miniapp.json is accurate before you pack: its hardwareRequirements will decide which glasses can see your miniapp, and its permissions will drive the OS prompts users see.
Camera, photo, and live-streaming features run through the on-glasses Bluetooth stack, not a cloud server. See the Bluetooth SDK docs for those workflows.

Versioning

version in miniapp.json is what people see; it must be a semantic version such as 1.2.0. The CLI names the artifact <packageName>-<version>-<hash>.zip, where <hash> is the first 8 hex digits of the ZIP’s SHA-256. The Mentra App never compares versions. It updates a miniapp when the ZIP its URL names has another SHA-256 than the installed one, so a new build reaches phones with or without a new version, and installs whether its version is higher than, the same as or lower than the installed one. To go back to an older build, publish it again: no new version is needed.

Signing

Signing is optional. mentra-miniapp pack --sign (or release --sign) embeds a publisher signature in the bundle; see Signing for keys and CI. The Mentra App follows the Android model: the installed signer decides which bundles may replace a miniapp. Uninstalling the miniapp clears its recorded key. The same rule applies to every way a miniapp reaches the phone; there is no exception for first-party miniapps.

Next steps

CLI reference

dev, dev --production, and pack in detail.

The manifest

Get permissions and hardware requirements right before you build a release.