vega-sdk
Skill4 starsChanged 5 months agoMIT-0View on GitHub
Fire TV Vega OS (Kepler) build system: npx kepler build, Vega app structure, platform-specific components
In this repository26 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- 10ft-uiSkill
- amazon-devices-vega-app-performanceSkill
- amazon-devices-vega-best-practicesSkill
- amazon-devices-vega-setup-sdkSkill
- android-tv-testingSkill
- changelog-static-siteSkill
- creative-tv-uiSkill
- eas-buildSkill
- expo-tv-configSkill
- firetv-leanbackSkill
- kmp-build-commandsSkill
- kmp-compose-tvSkill
- kmp-data-layerSkill
- kmp-navigationSkill
- kmp-template-anatomySkill
- kmp-themingSkill
- kmp-verify-patternsSkill
- metaSkill
- rn-manifest-wiringSkill
- rn-shared-ui-catalogSkill
- rn-spatial-navigationSkill
- rn-template-anatomySkill
- rn-themingSkill
- video-playerSkill
The file
We split this skill into the rules it gives an agent
8 rules. About 0 are common, 4 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈4
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 15
Vega OS (newer): Not Android. Custom runtime called Kepler.
- Distinctive: line 19
If the AppSpec targets Fire TV in general, target both by default.
- Very specific: line 64
If you add a new dependency to packages/shared-ui (which both apps consume), check it works on Vega.
- Very specific: line 91
When customize_app_metadata runs, it must update both apps/expo-multi-tv/app.json and apps/vega/vega.json.
- Very specific: line 105
Add .kepler.ts only if:
- Distinctive: line 109
Don't add it for:
- Distinctive: line 132
Don't ship to a real device on first run.
- Distinctive: line 157
Skipping Vega in v1 "to ship faster": If the user wanted Fire TV reach, half is not the answer.
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Vega SDK
Vega OS is Amazon's new TV operating system (Fire TV's next-gen runtime, distinct from Fire OS which is Android-based). It uses the Kepler runtime and its own SDK. The template's
apps/vega/is a separate app that shares UI viapackages/shared-uibut builds on a different toolchain.
What Vega is (and isn't)
- Fire OS (legacy): Android-based. Apps built like Android TV apps. Uses
apps/expo-multi-tv/. - Vega OS (newer): Not Android. Custom runtime called Kepler. JavaScript-based. Uses
apps/vega/.
Both are "Fire TV" in the marketing. The difference is real. A Fire OS APK does not run on Vega. A Vega bundle does not run on Fire OS.
If the AppSpec targets Fire TV in general, target both by default. Drop one only if the user explicitly excludes it.
apps/vega/ layout
apps/vega/
├── src/
│ ├── App.tsx # Vega entry
│ ├── screens/ # Vega-specific screens (if any)
│ └── ...
├── package.json # Has @amazon-devices/* deps
├── vega.config.js # Vega bundler config
└── assets/ # Vega-specific assetsIt imports from @multi-tv/shared-ui like the Expo app does. The Metro .kepler.ts resolver picks Vega-specific files automatically.
Key @amazon-devices/* packages
These are the Vega-specific ones the agent will encounter:
@amazon-devices/kepler-app— runtime, lifecycle, system events@amazon-devices/kepler-ui-components— native Vega UI primitives (use these for Vega-only screens for best perf)@amazon-devices/kepler-media— media playback APIs (use instead ofreact-native-videoon Vega)@amazon-devices/kepler-pointer— input events, including remote@amazon-devices/kepler-navigation— system back, exit handling
The shared UI catalog's <Player> has a .kepler.ts override that swaps in @amazon-devices/kepler-media. Don't bypass it.
What ports cleanly from Expo app → Vega
- React + JSX. Same.
- React Navigation. Works.
- React TV Space Navigation. Works.
- Styling via the theme system. Works.
packages/shared-uicomponents. Mostly works;.kepler.tsoverrides exist where they don't.
What does NOT port
react-native-video→ use@amazon-devices/kepler-media.expo-font→ fonts are loaded via Vega manifest, not at runtime.expo-image→ use Vega's image primitive or plain<Image>.- Any package that depends on Android Native Modules or iOS Native Modules. These will install but fail at runtime. Audit
package.jsondeps before adding. - Background tasks / push notifications differ — out of scope for v1.
If you add a new dependency to packages/shared-ui (which both apps consume), check it works on Vega. The safe rule: pure-JS packages port; native-bridged packages probably don't.
Build commands
# From repo root
yarn workspace vega install
# Dev build (deploys to connected Vega device or sim)
yarn workspace vega dev
# Production bundle
yarn workspace vega build
# Bundle artifact ends up in apps/vega/dist/The vega_build tool wraps these. The agent should not invoke Vega builds in parallel with Expo builds — both compete for emulator/device handles and the failure modes are confusing.
Vega manifest essentials
apps/vega/vega.json (or equivalent — check current template) declares:
- App ID and version (mirror the Expo app's bundle ID for store consistency)
- Required capabilities (media playback, network)
- Entry point
- Icon and banner assets (Vega has its own size requirements — typically the same 400×240 banner works)
When customize_app_metadata runs, it must update both apps/expo-multi-tv/app.json and apps/vega/vega.json. Keeping them in sync is the agent's responsibility.
Common Vega failure modes
| Symptom | Cause | Fix |
| "Module not found: @amazon-devices/*" on a non-Vega build | Imported a Kepler module without .kepler.ts extension | Move the import to a .kepler.ts file; provide a stub for the other platforms |
| Player shows black screen on Vega only | Using react-native-video directly | Use the <Player> from shared-ui, which has the override |
| App launches but remote doesn't navigate | Missing <SpatialNavigationRoot> on the Vega entry screen | Wrap as usual |
| Build succeeds but app rejected by Vega validator | Missing capability declaration in vega.json | Add the capability |
| Fonts don't render | Custom font not declared in Vega manifest | Declare in vega.json fonts array |
Decision: should I add a Vega-specific override file?
Add .kepler.ts only if:
- The default file imports a non-portable package.
- The behavior must differ on Vega (UI guideline, system integration).
Don't add it for:
- Cosmetic tweaks. Use theme tokens with
.kepler.tsoverrides instead. - "Just in case." Each override doubles maintenance.
Testing on Vega
Virtual Device (VDA)
The Vega Virtual Device Agent is the primary testing target:
npx kepler device start # Start VDA
npx kepler device list # Verify it's running
npx kepler install # Deploy the built app
npx kepler launch # Start the app
npx kepler screenshot <path> # Capture screen
npx kepler key right # Send D-pad right
npx kepler key down # Send D-pad down
npx kepler key center # Send select/enter
npx kepler key back # Send back
npx kepler stop # Stop the appDon't ship to a real device on first run. VDA catches common issues faster.
MCP-based diagnostics
The @amazon-devices/amazon-devices-buildertools-mcp package provides additional diagnostic tools:
analyze_perfetto_tracesfor app launch time analysis (TTFF, TTFD)get_app_hot_functionsfor CPU profilingsymbolicate_acrfor crash report analysissearch_documentationfor Vega-specific guidance
Appium (for advanced automation)
Vega supports Appium via the Vega Appium Driver for more complex test scenarios. Use locator strategies specific to Vega. For the QA loop, the Kepler CLI commands above are sufficient.
Vega log access
npx kepler logs # Stream app logs (Vega equivalent of logcat)
npx kepler logs --filter=error # Filter for errors onlyAnti-patterns
- Forking
packages/shared-uifor Vega. Defeats the monorepo. Use.kepler.tsoverrides on specific files. - Conditional logic
if (Platform.OS === 'kepler')in shared files. Use platform extensions; the bundler is the routing layer. - Skipping Vega in v1 "to ship faster". If the user wanted Fire TV reach, half is not the answer. Either include Vega or drop Fire TV entirely.
- Treating
apps/vega/like a copy ofapps/expo-multi-tv/. It's a different runtime. Its entry, lifecycle, and APIs differ.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

