Glassly Miniapp SDK betaThe SDK is in beta, so its APIs may change before general availability.Developing on Mentra Live? We recommend using the
Glassly Bluetooth SDK.The developer tools are available in the Glassly App under Settings →
Miniapp developer settings. To show that row, tap the version number at the
bottom of Settings 10 times.Share feedback with an in-app bug report, on
Discord, or by email at
help@glassly.ai.
glassly sim runs your miniapp on macOS, Linux, or Windows. The background
script runs in a worker, the glasses display is drawn in a browser window, and
the phone page loads in a phone frame beside it. Every input the glasses and
phone would produce can be sent from that window or from the command line, so a
script or a coding agent can change code, act, and check the result without a
person in the loop.
miniapp.json, builds both layers, opens the simulator window, and
rebuilds and reloads when you save a source file. Console output from both
layers prints in the terminal and in the window’s log.
The window
- Glasses: the display, drawn by the same scene pipeline the Glassly App
runs (clamping, element budgets, text wrapping, transitions). It simulates
the app’s Simulated Glasses, a 576×288 canvas with 16 gray levels that
previews what Glassly CFW glasses can show. Pass
--deviceto simulate a specific model instead (see Glasses models). - Controls: the touch bar (tap A and tap B, double tap, hold, swipes), look up and
down (gestures the simulated model does not send are greyed out), speech the glasses hear (typed, delivered as a transcription), phone
notifications, battery, location, and connecting or disconnecting the
glasses. Tap A and tap B are single taps with
index0 and 1, the two fingers a Neural Band tells apart (glassly sim tap/glassly sim tap --b). Button presses come fromglassly sim button. - Phone: your UI page with the same
glasslybridge, safe-area insets and capsule menu it gets inside the Glassly App. Switch it to a folded iPhone Duo (or runglassly sim phone duo) to check the page against the 84 pt status rail on the right, with the capsule and anyuseRailBackButtonback button drawn in the rail. The same page is at/ui/on the simulator’s address if you want it in its own tab. - Log, Scene, State: console output, the elements on the display, and what the miniapp is subscribed to.
Drive it from the terminal
While a simulator is running,glassly sim <command> from the project folder
talks to it:
screen prints the processed frame, which is usually the quickest check:
ui send and ui request act as the phone page, so background logic that
answers the page can be exercised without a browser. To drive the real page, open
http://localhost:<port>/ui/ in any browser or browser automation tool.
The full list is in the CLI reference.
Glasses models
glassly sim --device <id> simulates one model and firmware. Each device
reports the capabilities the Glassly App reports for it, including
display.textProfile, so textProfileFor(capabilities) from
@glassly/miniapp/display picks the profile it would on the glasses. Text is
wrapped with that profile, frames are cut to the model’s element budget and
shapes, and gesture commands accept only the gestures its driver sends: glassly sim tap on a Mentra Display, which only sends head up, fails and lists the
gestures it does send.
Custom firmware values are those current Glassly CFW reports.
To see a miniapp on every model at once:
What is simulated
The simulator handles every request a miniapp can send. Five are one-way and get no reply, as on the phone:open_url, apps_stop_self, action_result,
widget_update and widget_result. A clipboard copy without text or a
download without a file gets no reply either. Real means the simulator
does what the Glassly App does, with the app’s permission checks, argument
checks, error codes and messages. Stand-in means the app would need the
cloud, the phone’s OS or a camera, so the simulator answers in the app’s reply
shape and marks it (see Stand-ins and forced errors).
One request answers
NOT_IMPLEMENTED on both: dashboard content updates, which
the Glassly App has not built yet.
Several miniapps
glassly sim --with ../news,../notes installs other miniapps beside the one
you are working on, as installed apps on a phone: not running until something
starts them. Then session.widgets places and shows their widgets,
session.actions lists and invokes their actions (waking them), and
session.miniapps lists, starts and stops them, with the Glassly App’s
permission checks and errors. A miniapp whose hardwareRequirements the
simulated glasses lack is listed as incompatible and refused with
APP_NOT_COMPATIBLE, as on the phone. Gesture claims are shared: a claimed
gesture reaches only the miniapp that claimed it last, and an unclaimed one
reaches every miniapp listening. A miniapp started only to show a widget stops
when its last widget is removed. Their console output is in the log, tagged with
their name. The glasses display and the phone page stay your miniapp’s.
glassly sim action and glassly sim widget take --app <packageName> to
call one of those miniapps instead of yours.
Play a conversation
glassly sim play talk.txt plays a transcript as speech. Each line is one
utterance:
|. Each line’s words arrive as growing interims under one utteranceId at
the speaking rate (--rate, default 160 words per minute), then one final
half a second later, as the speech service sends them. Speakers become
speakerId "1", "2", … in order of appearance. A miniapp that subscribes
to translations into a language gets each line in it: the text after | <code>:,
a marked stand-in such as [es→en] Está a dos cuadras. when the line has
none, or the line itself when it is already in that language.
--frames <dir> saves a screenshot of every frame once it settles, to check
how a display builds up over a conversation. If a frame cannot be saved, the
command fails and says why.
Stand-ins and forced errors
A stand-in reply has the Glassly App’s shape and is marked withsimulated: true or “(glassly sim)” text where the shape allows.
glassly sim status lists each stand-in your miniapp has used, so you know
which answers to check on a phone.
To test an error path, glassly sim fail <type> <code> makes the next request
of that type fail, with the app’s message for that code when the simulator
knows it:
What the simulator cannot stand in for
Check these on a phone and glasses before you ship.- Bluetooth: latency, dropped or reordered packets, reconnects, throughput limits on large frames.
- Firmware: the glasses’ own fonts and glyph shapes, RayNeo’s character folding and line cutting, G2 custom firmware drawing at a 27 px pitch while the host wraps at 40, emoji and unsupported scripts rasterized on the phone, stock RayNeo and NIMO flattening frames into a subtitle page (approximated), gestures a model lists but its firmware never sends.
- Audio: microphone quality, voice activity detection, recognition errors, the real pace of interim results, speaker and phone audio routing.
- The lens: brightness, contrast, focus distance, field of view, how text reads in daylight. Screenshots use a generic font; the glasses use their own.
- The phone: OS share sheets, file pickers, QR scanning, in-app sign-in, permission prompts, background limits, battery.
- The camera: real photos, video, live streams and their upload.
- Cloud answers: AI, maps, sign-in tokens and speech synthesis.
Next steps
Quickstart
Run the same project on a phone and glasses.
AI IDE integration
Tell your coding agent how to use the simulator.

