| name | sync-miniapp |
| description | Prepare an external Mentra miniapp for bundling into mobile/assets/miniapps (version bump, pack, zip install, regenerate bundledMiniapps). Use when the user asks to sync a miniapp, bundle livestreamer/notes/etc into the Mentra App, or update mobile/assets/miniapps from an external miniapp repo. Never commits or pushes. |
Sync miniapp (prepare only — no git commits)
Command
From the MentraOS repo root:
bun scripts/sync-miniapp.mjs <name> [--bump patch|minor|major] [--no-bump] [--dry-run]
bun scripts/sync-miniapp.mjs --repo /path/to/external-miniapp [--bump patch] [--dry-run]
Named repos live in scripts/miniapp-repos.json.
What it does
- Reads
miniapp.json (packageName + version are canonical).
- Bumps strict
MAJOR.MINOR.PATCH (rejects prerelease/build unless --no-bump).
- Runs the external repo's
bun run pack (or vendored mentra-miniapp pack).
- Verifies the zip's embedded
miniapp.json.
- Copies into
mobile/assets/miniapps/, prunes older same-package zips.
- Regenerates
mobile/src/generated/bundledMiniapps.ts.
Critical: no commits
This skill must not run git add, git commit, or git push in either the external miniapp repo or MentraOS.
After a successful run, tell the user:
No commits made. Remaining manual steps: commit+push in <repoPath>, then commit the MentraOS changes.
Agent workflow
- Prefer
--dry-run first if the user wants a preview.
- Run the script; do not reimplement pack/copy by hand.
- Report old → new version and destination zip path.
- Never commit unless the user explicitly asks in a separate request.