@glassly/cli

中文文档
2.0.14发布于 2026/11/16ES Module近 30 天下载 3659

The glassly command: develop, pack, release, and publish Glassly miniapps. Bun-only.

原始使用文档
文档目录6 节
  1. Install
  2. Run without hardware
  3. Develop and test on a phone
  4. Publish to the Glassly Miniapp Store
  5. Report a gap or bug
  6. Backend selection

@glassly/cli

The glassly command: the one CLI for developing, releasing, and publishing Glassly miniapps. Install it globally (bun add -g @glassly/cli). Scaffolded projects also carry it as a dev dependency, and inside a project the global glassly hands off to that copy, so each project runs the version it pins. glassly update updates both the project's Glassly packages and the global command, and the CLI prints a notice once a day when either is behind (GLASSLY_NO_UPDATE_CHECK=1 turns that off).

The project-side commands (dev, build, pack, release, manifest, permission, hardware, schema) are implemented in @glassly/miniapp-cli, which this package wraps. The account and Store commands (login, org, miniapps, releases, listing, media, publish) talk to the Glassly Developer Console.

Bun-only. This CLI ships as TypeScript and runs under Bun (#!/usr/bin/env bun). Use bun / bunx, not npx/Node.

Install

bun add -g @glassly/cli
glassly --help

Or run without installing:

bunx @glassly/cli --help

Run without hardware

glassly sim                  # desktop simulator: glasses display, input controls, phone page
glassly sim --detach         # start it in the background and return once ready
glassly sim screen           # what is on the glasses, one element per line
glassly sim screenshot a.png # the display as a PNG
glassly sim tap              # also double-tap, hold, swipe-up, swipe-down, look-up, button
glassly sim say "hello"      # speech, delivered as a transcription
glassly sim logs             # console output from both layers
glassly sim stop

The subcommands talk to the simulator running for the current project, so a script or a coding agent can drive a miniapp end to end. glassly sim --help lists all of them.

Develop and test on a phone

glassly dev                  # hot-reload dev server + QR; signed dev identity when logged in
glassly release              # build, pack, and serve a QR that installs on phones over LAN
glassly build                # build both layers into dist/
glassly pack                 # production-build and zip into build/<pkg>-<version>.zip
glassly manifest             # interactive miniapp.json wizard
glassly permission add MICROPHONE
glassly hardware add DISPLAY REQUIRED
glassly schema print         # the miniapp.json JSON Schema

dev and release take --qr sm|md|lg and --qr-output <path>; dev --no-iroh prints a LAN-only QR. Every project command takes --cwd <path> to run against another directory.

Publish to the Glassly Miniapp Store

glassly login                # sign in to your Glassly developer account (opens a browser)
glassly publish              # build, pack, sign, upload, and submit for review
glassly miniapps list        # miniapps owned by your org
glassly releases list <packageName>
glassly listing set <packageName> --tagline "..."
glassly media add <packageName> ./store/screenshots/01.png

Run glassly <command> --help for the full option set.

Report a gap or bug

glassly feedback "No simulator for the R1 ring"

Sends your text to the Glassly team with the CLI, SDK, and runtime versions and the miniapp package name attached. No login needed; when signed in, the report carries your account. Coding agents: use it when you hit a missing feature or a docs/source mismatch. See https://docs.glasslyos.com/app-devs/reference/feedback.

Backend selection

The CLI talks to the production Glassly backend and Developer Console by default; nothing needs configuring. To point it at another deployment, set CLOUD_CORE_URL, CLOUD_CONSOLE_URL, and that backend's public WorkOS AuthKit client id in WORKOS_CLIENT_ID. Logins and the bundle signing key are stored per backend URL in ~/.glassly/cli/, readable only by your user; glassly logout removes the login.

Your org, releases, and API keys are managed in the Developer Console at https://console.glassly.ai. For CI or a coding agent without a browser, create an API key on its API keys page and set it as CLI_TOKEN instead of running glassly login.

版本与发布记录

@glassly/cli 共发布 51 个版本,首次发布于 2026/08/24;过去 12 个月发布了 51 个版本。

版本发布日期距今
2.0.14latest2026/11/16今天
2.0.14-beta.0beta2026/11/16今天
2.0.14-dev.0dev2026/11/16今天
2.0.132026/11/16今天
2.0.13-beta.02026/11/16今天
2.0.13-dev.02026/11/16今天

关于 @glassly/cli 的常见问题

@glassly/cli 是什么?

The glassly command: develop, pack, release, and publish Glassly miniapps. Bun-only.

如何安装 @glassly/cli?

在项目目录运行 npm install @glassly/cli,或使用 pnpm add / yarn add / bun add。它还提供命令行工具 glassly,可以用 npx glassly 直接运行。

@glassly/cli 支持 TypeScript 吗?

该包的 package.json 没有声明类型入口。需要类型提示时,可以在 npm 上查找社区维护的 @types/glassly__cli 是否存在。

@glassly/cli 支持 ESM 还是 CommonJS?

以 ES Module 形式发布,推荐使用 import 引入。在 CommonJS 项目中,Node.js 20.19+ / 22.12+ 可以直接 require() 不含顶层 await 的 ES Module,更早的版本需要改用动态 import()。

@glassly/cli 可以商用吗?

@glassly/cli 使用 未声明 许可。package.json 没有声明许可证。没有许可证的代码默认保留全部权利,商用前请联系作者或查看仓库中的 LICENSE 文件。以上为概括,不构成法律意见,请以许可原文为准。

@glassly/cli 的下载量有多少?

根据 npm 官方下载统计,@glassly/cli 在 2026/10/17 – 2026/11/15 这 30 天内被下载 3,659 次,日均约 122 次。下载量会把 CI 构建、镜像同步和作为其他包依赖的安装一并计入,适合横向比较热度,不能直接等同于使用人数。

@glassly/cli 还在维护吗?

最新版本 2.0.14 发布于 2026/11/16(今天);至今共发布 51 个版本,其中过去 12 个月发布了 51 个;首次发布于 2026/08/24。发布频率只是参考信号:功能稳定的工具可能很少需要更新,建议结合源码仓库的 issue 和提交记录判断。