# Manifest and packaging

Source: [Packaging & Deployment](https://hub.evenrealities.com/docs/ship/packaging), [Versioning Policy](https://hub.evenrealities.com/docs/reference/versioning). Checked 2026-11-17 with CLI 0.2.0.

## app.json

`evenhub init` writes a starter manifest. Required fields and rules:

| Field | Rule |
| --- | --- |
| `package_id` | Reverse-domain, at least two segments, each starts with a lowercase letter, lowercase letters/numbers only, no hyphens. Globally unique |
| `edition` | `"202601"` (current edition) |
| `name` | 20 characters or fewer; must match the store listing and on-glasses name |
| `version` | `x.y.z` |
| `min_sdk_version` | Required; match your installed SDK (`npm list @evenrealities/even_hub_sdk`) |
| `entrypoint` | HTML file path inside the build folder, e.g. `index.html` |
| `permissions` | Array of objects `{ name, desc, whitelist? }`, can be `[]`. Not a key-value map |
| `supported_languages` | Any of `en, de, fr, es, it, zh, ja, ko` |

`min_app_version` is optional: the CLI derives the Even App floor from the SDK version at pack time (CLI 0.1.14+).

Permission names: `network` (with `whitelist` of full origins, no wildcards), `location`, `g2-microphone`, `phone-microphone`, `album`, `camera`. `desc` is 1-300 characters. Declare only what the code uses; unused permissions are flagged in review.

## Pack and upload

```sh
npm run build
evenhub pack app.json dist -o myapp.ehpk --sdk-ver <installed SDK version>
evenhub pack app.json dist -o myapp.ehpk -c   # also checks package_id availability
evenhub upload myapp.ehpk -m "What changed"    # CLI 0.2.0+, or upload in the portal
```

Without `--sdk-ver` the CLI reads the latest SDK on npm, which may differ from the one you bundled. `--enforce-manual-version` produces a local-only build that cannot be submitted.

## Secrets

Never bundle API keys or tokens into the `.ehpk`. Published packages can be extracted. Use a server-side proxy you control and whitelist that proxy's origin.

## Versioning

- SDK is pre-1.0; new features ship as patch bumps (0.0.x). Read the [Changelog](https://hub.evenrealities.com/docs/reference/changelog) before upgrading.
- Do not raise `min_sdk_version` pre-emptively; it blocks users on older firmware.
- Published versions are immutable: fix forward with a higher version.
