# Distribution

> Pack a release and get your miniapp onto users' glasses.

Source: https://docs.dev.glassly.ai/app-devs/getting-started/distribution/

A miniapp is a bundle that runs on the user's phone: there's no server to
host, no domain, no uptime to manage. Distribution means producing that bundle
and getting it installed. There are four ways to get a miniapp onto a device,
from quickest to widest reach.

Before any of them, you can run the miniapp on your own computer with
[`glassly sim`](https://docs.dev.glassly.ai/app-devs/getting-started/simulator.md). Nothing is installed
anywhere; it is for building and checking, not for sharing.

## 1. Dev install (you, iterating)

While you're building, [`glassly dev`](https://docs.dev.glassly.ai/app-devs/reference/cli.md#dev) serves
your project over the LAN with hot reload. Scan the QR from the Glassly App and
your changes reload on save. This is the inner loop; see the
[Quickstart](https://docs.dev.glassly.ai/app-devs/getting-started/quickstart.md).

Dev mode is not an installation: the computer and CLI must remain running to
serve each miniapp's runtime bundle. The Glassly App keeps a separate dev entry
for each manifest package name and caches its name and icon, so you can scan and
test multiple dev miniapps together. Rescanning the same package updates that
entry. Use a release install when you want the miniapp to run without the
computer.

## 2. Release install (sharing a build over LAN)

To put a real, installed build on one or more phones without going through the Glassly Miniapp Store, run:

```bash
glassly release
```

This builds, packs, and serves the bundle behind a `miniapp://release` QR. Anyone
on the same network can scan it to install. The miniapp installs on the device,
**runs offline, and persists across restarts**: no laptop required once it's
installed. Great for testers, demos, and dogfooding.

Each install is logged in your terminal, and the server stays up so multiple
devices can install from the same QR.

## 3. Share the file

To hand a build to someone who is not on your network, pack it and send the
file:

```bash
glassly pack
```

This writes `build/<packageName>-<version>.gls`, a zip under the Glassly
miniapp extension. Send it any way you like: AirDrop, chat, email, a shared
drive. On the receiving phone, save the file, then choose it from Settings ›
Miniapp Developer › Install Miniapp from File. The app opens a Store-style
page for it (icon, description, version, permissions and glasses hardware)
with an Install button. Like a release
install, it runs offline and persists across restarts.

A file installed this way is tagged "Installed from a file" on its settings
page. It is never auto-updated by the Store, though the Store still offers an
update when it has a newer version of the same package. Users are told the
file did not come through the Store, so share builds only with people who
know you.

## 4. Store submission (reaching everyone)

To reach users who aren't on your network, publish to the Glassly Miniapp Store.
Sign in to the [Developer Console](https://console.glassly.ai) once to create
your developer org. The org owns a package prefix such as `com.example`, and
every miniapp you publish must have a `packageName` under it (the scaffolder
asks for the prefix so a new project starts out right). Then, from the miniapp
folder:

```bash
glassly login      # once per machine; approve the sign-in in your browser
glassly publish    # build, pack, sign, upload, and submit for review
```

`glassly login` prints a one-time console.glassly.ai/device link and code, and opens Glassly's sign-in
page so you can approve this machine. Your org, package prefix, releases, and
API keys live in the [Developer Console](https://console.glassly.ai). For CI or
an AI coding agent that can't open a browser, an org owner or admin can create
an API key on the console's [API keys page](https://console.glassly.ai/tokens)
and export it as `CLI_TOKEN`.

`publish` reserves the package name for your org on first use and submits the
release for review; the console shows its status. Make sure your
[`miniapp.json`](https://docs.dev.glassly.ai/app-devs/core-concepts/miniapp-manifest.md) is accurate before
you publish: its `hardwareRequirements` decide which glasses can see your
miniapp, its `permissions` drive the OS prompts users see, and its `tagline` and
`tags` are the copy on your store card. If you only want the artifact,
`glassly pack` writes the same `build/<packageName>-<version>.zip` without
uploading it.

Once a release is published, the listing shows in the Glassly Miniapp Store
inside the Glassly App and on the web at
[store.glassly.ai](https://store.glassly.ai), at
`https://store.glassly.ai/<packageName>`. The web Store is browse-only: it
shows the same card and detail page and sends visitors to get the Glassly App
to install.

### Store listing media

The store icon is the `icon.png` from your bundle. To ship screenshots with a
release, add a `store/` folder next to `miniapp.json`:

```txt
store/
  icon.png            # optional: overrides the bundle icon in the store
  screenshots/
    01-captions.png   # PNG or JPEG, at most 2 MB each, up to 8, in name order
    02-settings.jpg
```

`glassly publish` uploads the folder with the release. After a release is
published, the Developer Console's miniapp page lets you replace the icon,
add or reorder screenshots, and override the tagline, description, and tags
without shipping a new version.

Camera, photo, and live-streaming features run through the on-glasses Bluetooth
stack, not a cloud server. See the [Bluetooth SDK docs](https://docs.dev.glassly.ai/bluetooth-sdk/overview.md)
for those workflows.

## Versioning

Bump `version` in `miniapp.json` for every release you distribute. The CLI names
the artifact `<packageName>-<version>.zip`, and installed miniapps are stored per
version (`lmas/<package>/<version>/`), so a new version installs cleanly alongside
or over the old one.

## Next steps

- [CLI reference](https://docs.dev.glassly.ai/app-devs/reference/cli.md)
`dev`, `release`, `pack`, and `publish` in detail.
- [The manifest](https://docs.dev.glassly.ai/app-devs/core-concepts/miniapp-manifest.md)
Get permissions and hardware requirements right before you ship.
