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.Share feedback with an in-app bug report, on
Discord, or by email at
[email protected].
@glassly/cli provides the glassly command. It’s installed as a dev
dependency in every scaffolded project, so your package.json scripts call it
directly ("dev": "glassly dev"). Install it globally to use it from anywhere:
The CLI is Bun-only: it ships as TypeScript and runs under Bun. Use
bun
(or bunx), not npx/Node.
Every project command takes
--cwd <path> to run against a directory other
than the current one.
dev
miniapp.json, builds both layers, serves them over your LAN, and
prints a QR (and a miniapp://dev?... URL). It also runs a dev sidecar
WebSocket on the next port up for live reload and console-log forwarding back to
your terminal (non-fatal if it can’t start). It watches for Wi-Fi/LAN-IP changes
every 2 seconds and reprints the QR.
If you are signed in with glassly login, dev also signs a dev identity for
the miniapp so session.auth works against your backend during development.
Pass --auth to fail instead of falling back when you are signed out.
The starting port comes from "port" in miniapp.json (default 3000); if it or
its sidecar neighbor is busy, the CLI scans upward for a free adjacent pair.
--qr / -q sets the terminal QR size (small/sm, medium/md, large/lg;
defaults to medium). --qr-output <path> writes the QR as a PNG to that path
instead of a temp file that gets cleaned up on exit.
On the phone, in the Glassly App, open Settings → Miniapp Developer Settings
→ Scan Miniapp QR Code. Phone and laptop must share Wi-Fi. Ctrl+C stops
everything.
release
build/<pkg>-<version>.zip when every source file is older
than the zip, otherwise rebuilds (auto-detecting your package manager from the
lockfile). It serves the bundle, manifest, and icon over HTTP on 0.0.0.0 and
prints a miniapp://release?... QR, then stays up so multiple devices can
install. Each install logs a line. Installed miniapps run offline and persist
across restarts; no laptop needed after install.
release takes the same --qr / -q and --qr-output <path> flags as dev.
build
bun run build, which executes your
build.ts) so dist/background/index.js and dist/ui/* are current. pack,
release, and publish all run this for you.
pack
release calls this internally). It
builds with NODE_ENV=production, verifies dist/, validates the manifest,
copies miniapp.json + icon.png into dist/, and zips to
build/<pkg>-<version>.zip. This ZIP is what publish uploads to the Glassly Miniapp Store.
pack requires the zip binary on PATH (preinstalled on macOS and most Linux;
on Windows use WSL). build/ self-ignores from git.manifest
miniapp.json: edit permissions and hardware
requirements, show the current manifest, or finish. It saves after each confirmed
change, so Ctrl+C never loses a saved edit.
permission and hardware
Object-verb edits that share the wizard’s validation:
TYPE: MICROPHONE, CAMERA, CALENDAR, LOCATION,
BACKGROUND_LOCATION, READ_NOTIFICATIONS, POST_NOTIFICATIONS, API_KEYS,
MEMORY, AI, SPEAKERS, DISPLAY_MIRROR, MANAGE_MINIAPPS,
PLATFORM_SETTINGS. Hardware
TYPE: CAMERA, DISPLAY, MICROPHONE, SPEAKER, IMU, BUTTON, LIGHT,
WIFI; LEVEL: REQUIRED, OPTIONAL. See the manifest
for what each means.
schema
miniapp.json JSON Schema to stdout: useful for CI
validation or IDE config. The same schema ships at
node_modules/@glassly/miniapp-cli/schema/miniapp.schema.json, which the $schema
line in a scaffolded miniapp.json references for editor autocomplete.
login and logout
login signs you in to the Glassly Developer Console and stores a session for
the other Store commands. Create your developer org in the console first; it
owns the package prefix every miniapp you publish must start with.
publish
glassly login. It reserves the package name
for your org if needed, builds and packs, signs the bundle, uploads it with any
store/ icon and screenshots, and submits the release for review. See
Distribution for what happens next.
miniapps and releases
publish creates the package record and submits the release for you; these
are for inspecting state or managing packages by hand.
listing and media
tagline, description, and tags from
miniapp.json on the Store card. Media uploads replace or extend the icon and
screenshots that publish took from the bundle and the store/ folder.
