Create OV WebRTC App#

Create OV WebRTC App is a command-line generator for Omniverse Kit web-streaming clients. Use this tool to quickly scaffold ready-to-run samples that connect to applications built from kit-app-template.

In this guide, you learn how to install prerequisites, run the interactive setup wizard, and customize project generation using templates and command-line flags.

Prerequisites#

Node.js#

Install Node.js from https://nodejs.org/en/download. Ensure your environment meets these minimum engine requirements:

node >= 20.18.1
npm  >= 10.2.3

To verify your Node.js and npm installations, run these commands:

node -v
npm -v

Scope the NVIDIA Registry#

Configure your .npmrc file to include the NVIDIA registry before installing. You have two options:

  1. Manually update your existing .npmrc file by adding the following line:

@nvidia:registry=https://edge.urm.nvidia.com/artifactory/api/npm/omniverse-client-npm/
  1. Or, run the following command to create a user-level .npmrc file with the NVIDIA registry preconfigured:

npm config set "@nvidia:registry" "https://edge.urm.nvidia.com/artifactory/api/npm/omniverse-client-npm/" --location=user

Hello, World! Example#

If you run the CLI without any template arguments, it falls back to an interactive setup wizard. This is a lightweight way to explore the generator without supplying individual flags: the wizard walks you through each required input and produces a ready-to-run sample at the end.

Run the following command to access the setup wizard:

npx @nvidia/create-ov-web-rtc-app

The CLI prompts you for the following information:

  1. Project name — defaults to ov-web-sample. This becomes the output folder.

  2. Author — default is NVIDIA. Used to populate the generated package.json.

  3. Project description — default is Omniverse Web Streaming Sample. Copied into the generated README.

  4. Output directory — defaults to the current working directory. Determines where the project folder is created.

  5. Select UI framework — choose between None (TypeScript only) or React. Selecting React adds --framework=react to the sample-app template (TypeScript-only is implied when omitted).

  6. Select stream source — choose between Local (direct), OKAS (Omniverse Kit App Streaming), or NVCF (NVIDIA Cloud Functions). The wizard maps this to --streamSource=<local|okas|nvcf> in the sample-app template.

  7. NVCF API Endpoint — (only shown if NVCF is selected) Enter your NVCF API endpoint for cloud function invocation.

  8. NVCF API Key — (only shown if NVCF is selected) Enter your NVCF API key for cloud function authentication.

  9. NVCF Function ID — (only shown if NVCF is selected) Enter your NVCF function ID to invoke.

  10. WebRTC streaming library version — defaults to 5.17.0. This is the version pinned in package.json.

After the prompts, the generator creates a sample project in the specified output directory. Navigate into the generated sample:

cd ov-web-sample

Install dependencies:

npm install

Run the client:

npm run dev

Open http://localhost:5173/ in a Chromium-based browser to verify the sample is running.

Note

Reference the generated README: Every generated project includes a README.md that outlines how to run the sample and connect to the Omniverse Kit application configured by your selected templates and flags.

Running via Command Line#

You can invoke create-ov-web-rtc-app directly from the command line, combining the global flags with any template-specific options as needed.

Templates#

You can supply one or more templates after the CLI name to compose the generated project instead of using the setup wizard. Each template can be followed by optional flags:

npx @nvidia/create-ov-web-rtc-app --name my-project sample-app --streamSource=local web-rtc --version=5.17.0

In the example above, sample-app and web-rtc are templates, while --streamSource=local and --version are template-specific flags.

web-rtc#

Adds the NVIDIA Web Streaming Library and keeps your project pinned to a known-good version.

Example:

npx @nvidia/create-ov-web-rtc-app --name ts-webrtc web-rtc --version=5.17.0

sample-app#

Creates a fully working streaming application in src/main.ts (or src/main.tsx when --framework=react is supplied), wiring the streaming widgets. The template auto-installs the web-rtc dependency. Passing --framework=react copies the reusable OVAppStreamer React components and renders the viewport with React, while omitting the flag keeps the project TypeScript-only. Use --streamSource=<local|okas|nvcf> to pick the streaming backend.

Examples:

# Local streaming only
npx @nvidia/create-ov-web-rtc-app --name local_only sample-app --streamSource=local

# Omniverse Kit App Streaming (OKAS) only. Set an appId, appProfile and appVersion
npx @nvidia/create-ov-web-rtc-app --name okas_only sample-app --streamSource=okas --appId=my-usd-viewer --appProfile=my-app-profile --appVersion=107.1.0

# NVIDIA Cloud Functions (NVCF) only. Set an nvcfEndpoint, nvcfApiKey and nvcfFunctionId
npx @nvidia/create-ov-web-rtc-app --name nvcf_only sample-app --streamSource=nvcf --nvcfEndpoint=https://your-host.com --nvcfApiKey=nvapi-**** --nvcfFunctionId=**-**-**-**-**

Predefined Sample Configurations#

Use the --sample <name> flag to scaffold one of the curated configurations shipped in config.json. The generator applies the listed templates and options automatically.

You can also generate every sample at once with --generate-samples (optionally pair it with --outputDir to pick the destination folder).

local-sample#

  • Description: Simple viewport sample that streams a local Kit application.

  • Definition:

    {
        "local-sample": {
            "description": "Simple viewport sample that supports local streaming.",
            "templates": {
                "sample-app": {
                    "streamSource": "local"
                }
            }
        }
    }
    
  • Command:

    npx @nvidia/create-ov-web-rtc-app --name local --sample local-sample
    

okas-sample#

  • Description: Simple viewport sample that streams from a remote Kit application using Omniverse Kit App Streaming.

  • Definition:

    {
        "okas-sample": {
            "description": "Simple viewport sample that streams from a remote Kit application using Omniverse Kit App Streaming.",
            "templates": {
                "sample-app": {
                    "streamSource": "okas"
                }
            }
        }
    }
    
  • Command:

    npx @nvidia/create-ov-web-rtc-app --name okas --sample okas-sample
    

nvcf-sample#

  • Description: Cloud-based streaming sample configured for NVIDIA Cloud Functions.

  • Definition:

    {
        "nvcf-sample": {
            "description": "Sample that supports nvcf streaming.",
            "templates": {
                "sample-app": {
                    "streamSource": "nvcf",
                    "nvcfEndpoint": "https://your-host.com",
                    "nvcfApiKey": "your-api-key-here",
                    "nvcfFunctionId": "your-function-id-here"
                }
            }
        }
    }
    
  • Command:

    npx @nvidia/create-ov-web-rtc-app --name nvcf --sample nvcf-sample
    
  • Note: Provide your own NVCF API key and function ID. You can override these values with command-line flags.

To generate every sample to a single directory:

npx @nvidia/create-ov-web-rtc-app --generate-samples --outputDir ./generated-samples

Define Your Own Configuration File#

You can point the CLI at a custom config.json to capture reusable sample templates.

  1. Create a JSON file that mirrors the structure below. Each top-level key is the sample name, with a description and a templates object describing the templates and flags to apply.

    {
        "local-react": {
            "description": "React sample that supports local streaming.",
            "templates": {
                "web-rtc": {
                    "version": "5.17.0"
                },
                "sample-app": {
                    "streamSource": "local",
                    "framework": "react"
                }
            }
        }
    }
    
  2. Run the generator with --config <path> whenever you reference this file:

    npx @nvidia/create-ov-web-rtc-app --config ./config.json --name local-react --sample local-react
    
  3. To generate every sample in your custom file, combine --config with --generate-samples:

    npx @nvidia/create-ov-web-rtc-app --config ./config.json --generate-samples --outputDir ./all-samples
    

Command-line template flags still take precedence over entries in the custom file, so you can start from a sample and override specific settings inline.

Next Steps#

You now have the tools to generate Omniverse Kit web-streaming clients. For details on the streaming library API, see WebRTC Streaming Library.