<APPNAME>, <COMPANY NAME.APPNAME>, and <projectroot> with your app name, company name, and project directory path. Don’t use amazon as your company name or package ID.
This page describes the Vega CLI commands and examples.
Help and version options
To print the installed Vega CLI version:vega -v. Include this version when you report an issue, and use it in a CI pipeline to confirm which CLI the build ran with. To check the SDK versions your project builds against instead, see Manage Your SDK Versions.
To explore options for all Vega commands:
vega build command:
Exit codes and error output
Vega CLI commands return exit code0 on success and a non-zero exit code on failure. Error messages are written to stderr.
Commonly used commands
npx react-native build-vega
Use thenpx react-native build-vega command to compile your app and produce the vpkg.
To build an app:
vega clean
To remove the artifacts generated in the<projectroot>/build folder:
vega project list-templates
To see the available JavaScript and Turbo module templates you can use to create a sample app:vega project generate
To create a Vega project, use thevega project generate command with the required parameters.
To create a new app:
-
vega project generate- Generates a Vega app. -
--template- Sets the Vega app or Turbo Module template, which you can find from thevega project list-templatescommand. In the example, it uses thehelloWorldtemplate. -
--name- Sets the name of your new app or Turbo Module. The name can’t contain whitespace or special characters. Replace<APPNAME>with the desired name for your new app. -
--packageId- Sets the package ID for manifest.toml required in React Native for Vega apps, not in Turbo Module. Replace<COMPANY NAME>with the name of your company and<APPNAME>with the name of your app. -
--outputDir (optional)- Sets the output directory for new app files. Replace<APPNAME>with the actual name of your app.
vega run-app
To install and run your app:vega device install-app and vega device launch-app.
For the VVD:
sampleapp on a Mac M-series machine, the command is:
Project compatibility commands
Thevega project compatibility commands manage the OS version your app supports. They resolve compatible package versions, re-align your project to an OS version target, validate your configuration, and regenerate manifest module entries. For the concepts behind these commands, see Target OS Versions.
vega project install
To resolve OS-version-compatible@amazon-devices/* package versions into package.json:
install nor install --fix downloads packages or changes the node_modules folder. Both resolve compatible versions and write them into package.json. The two forms differ in scope:
-
vega project install <packages..>- Adds the named@amazon-devices/*packages topackage.jsonas dependencies, if all compatibility checks pass. This is the only form that adds a new dependency. -
vega project install --fix- Re-aligns every existing@amazon-devices/*version inpackage.jsonto the compatibility profile. It doesn’t add new packages.
--os-version and --rn-version, the command reads them from your project’s manifest.toml and package.json. Both --fix and --dry-run default to off.
--os-min is the one option that writes manifest.toml rather than package.json, and it’s narrower than the other options:
-
It takes effect only together with
--fix. Neither a barevega project install --fixnor aninstall <package>run writesmin. -
Pass it with
--os-version. On a project that has no[os.version]section,installcan’t resolve a target, so it fails withMissing OS Versionand writes nothing. -
With both flags on a project that has no
[os.version]section,installcreates the section, setsmin, seedstarget, and confirms with📝 Set [os.version] min = "<v>" in manifest.toml. -
When
[os.version]already exists, this form writesminonly and leavestargetunchanged. A legacy[os]section counts as an existing section. To changetarget, use vega project update-manifest.
vega project doctor afterward is optional but recommended. install --fix resolves versions, and doctor validates the result and runs the source-level OS version lint. For details, see vega project doctor.
With --dry-run, the command previews what it resolves without writing changes, and the header becomes 🔍 Dry run — no changes will be made.
vega project update
To re-align your project’s npm packages and manifest to your OS version target:update re-aligns only the versions of packages your app already depends on. It bumps each one to the version compatible with your OS target and leaves the rest unchanged. To add a new dependency, use vega project install.
All options are optional. When you omit them, the command reads --os-version, --os-min, and --rn-version from your project’s manifest.toml, and --dry-run defaults to off.
Both
update and install --fix re-align existing @amazon-devices/* versions in package.json to the compatibility profile, and both accept --os-version and --os-min. Use install --fix for the normal setup and re-align flow, and for creating an [os.version] section that doesn’t exist yet. Use update when you want a reviewable change plan before anything is written, because --dry-run reports each package version transition.
For example, to preview a re-alignment against the target in your manifest.toml:
🔄 icon marks a changed package and the ✓ icon marks an unchanged one. When nothing needs to change, the command reports ✅ All packages are up to date.
vega project doctor
To validate your project’s OS version compatibility, including configuration, dependencies, and lint rules:doctor runs the following checks:
- The SDK compatibility manifest is present.
- Your project configuration resolves.
-
[os.version].minand[os.version].targetare both valid, minted OS versions. -
[os.version].minis less than or equal to[os.version].target. -
Your
@amazon-devices/*dependency versions match the SDK profile. -
The OS version module entries are present in
manifest.toml. -
The source-level OS version lint rule,
no-unguarded-os-api, passes.
no-unguarded-os-api rule flags each reference to an API introduced in an OS version newer than your [os.version].min. A reference passes when it sits inside an isPresentOnOS() guard or carries an // @os-version-ok comment on the line preceding its import. The rule reports the usage site, not the import line.
Example output:
min and target are both 1.2. The lint reports No OS version issues because nothing was introduced after min, so there’s nothing to guard. When a later OS version is minted and you set min below target, the lint flags every unguarded reference to an API introduced after your min. It reports each one as file:line:column rule-id with the message indented beneath, the summary becomes ❌ 1 check(s) failed., and doctor exits non-zero.
In the results, the ✅ icon marks a passing check, ⚠️ marks a warning, and ❌ marks a failure. vega project doctor exits non-zero when any check with fail severity fails, so you can use it as a gate in your CI pipeline. For more information, see Integrating the Vega SDK into CI Pipelines.
vega project update-manifest
To regenerate the OS version module entries inmanifest.toml from your [os.version] configuration:
@amazon-devices/* package entries, which the build regenerates for you. It writes the following entries:
-
One
[[needs.module]]entry for your[os.version].min, in the form/com.amazon.vega.os@IVega_<min>. Your app doesn’t install on a device older thanmin. -
One
[[wants.module]]entry for each OS version aboveminand up to[os.version].target, in the form/com.amazon.vega.os@IVega_<v>. Whenminandtargetare equal, there are no wants.
When you pass the OS version on the command line, pass both
--os-min and --os-version together. min defines which modules are needs and target defines the upper bound for wants, so the pair determines the generated module entries. When you omit both, the command reads them from your manifest.toml. Don’t pass only one.
For example, to generate the module entries for a project that targets OS 1.2:
--dry-run, the command prints the generated TOML instead of writing it. For the manifest field definitions, see Manifest [os.version] Section. For more information about needs and wants, see Manifest [needs] Section and Manifest [wants] Section.
Device commands
The Vega CLI device command interface provides a way for you to interact with physical devices and the VVD. You must install and make VDA available on the path for device commands to work. The general command format is:vega device copy-from
To copy device files to the host computer:vega device copy-logs
To retrieve the artifact files from a device:vega device copy-to
To copy host files to the device:vega device get-log-info
To retrieve log information from a device:vega device info
To retrieve device metadata in JSON format, including device type, OS version, hostname, architecture, profile, product name, build description, whether the device is simulated or physical, and Developer Mode status:vega device install-app
To install an app on a device or the VVD, add arguments for the path (-p) to your app’s package. The path follows this syntax: build/<ARCH>-<BUILD_TYPE>/<APP_NAME>_<ARCH>.vpkg.
For example, if sampleapp runs on a Mac x86 machine:
.vpkg in the directory and install it:
debug build type:
release build type:
vega device installed-apps
To list the apps installed on a device:vega device installed-packages
To list all packages installed on a device:vega device is-app-installed
To check for app installation using app name:vega device is-app-running
To check if an app runs on the device using app name:vega device is-connected
To check the connection status of a specific device:vega device launch-app
To launch the app on a device using app name:vega device list
To list connected devices (Fire TV Stick and VVD):VirtualDevice : tv - architecture - OS type - hostname
Example output with a connected Fire TV Stick (GXXXXXXXXXXXXXXX) and a running VVD:

