Skip to main content
Version: 1.x.x

Init

Use vsdk init to create a new VideoSDK application from a starter template.

Run the following command to start the interactive project setup:

vsdk init

The CLI guides you through the following steps:

  1. Authentication — Use the VIDEOSDK_TOKEN environment variable, an existing sign-in, or sign in when prompted. You can also provide a token or continue without authentication. See Authentication.
  2. Project configuration — Select the platform and the use case, which together pick the starter template, then the project directory.
  3. Project creation — Review your selections and create the project from the selected template.
  4. Dependencies and launch — Choose whether to install dependencies and launch the application. The CLI also displays any additional platform-specific setup steps.
tip

You can use . as the project directory to create the application in the current directory. The directory must be empty, except that an existing .git folder is allowed.

Example output

The following example creates a React application in a directory named my-app:

✓ Created ./my-app from videosdk-rtc-react-sdk-example
…
✓ Dependencies installed
…
✓ Running at http://localhost:3000, opened in your browser
› Create a meeting in the app, or join one by id. Ctrl-C stops the server.
info

If port 3000 is already in use, the React development server may use another available port.

Other templates may open the project in an IDE or display additional setup instructions instead of starting a development server.

Create a project from a template​

Each VideoSDK starter project has a unique Template ID. Use the templates command to view the available templates:

vsdk templates

Once you have a Template ID, pass it as the first argument to vsdk init, followed by the directory where you want to create the project.

React video calling​

vsdk init react my-app

Android video calling with Kotlin​

vsdk init android-kotlin my-android-app

For more information about a specific template, use:

vsdk templates <id>

See Templates for more information.

Non-interactive setup​

Use non-interactive mode to create projects from scripts, CI environments, or AI coding agents without going through the interactive prompts.

Provide the template, project directory, and --yes:

vsdk init react my-app --yes --json

Authentication​

Before running the command, make sure you have one of the following:

  • A valid VIDEOSDK_TOKEN environment variable
  • A valid saved VideoSDK sign-in

If both are available, the VIDEOSDK_TOKEN environment variable takes precedence. If the environment token is invalid or expired, the CLI returns an error instead of falling back to the saved sign-in.

note

The --yes flag automatically confirms prompts, but it does not select a template or provide authentication credentials.

JSON output​

Use --json when integrating the CLI with scripts or AI coding agents. It returns a structured result instead of interactive output.

When --json is used:

  • Prompts cannot be shown. Pass --yes to answer them; without it, a prompt the CLI needs to ask ends the command with an error (exit code 1, or 3 when the missing answer is the sign-in). See Errors and exit codes.
  • The development server is not started.
  • The browser or IDE is not opened.
  • Dependency installation is still attempted.

Use --no-install if you want to install dependencies separately.

Create a project without credentials​

Use --skip-token when you want to create a project without configuring a VideoSDK token.

vsdk init react my-app --yes --skip-token --no-install --json

This skips both the VIDEOSDK_TOKEN environment variable and any saved sign-in. The credential placeholder in the generated project is left unchanged.

JSON result

The result of the command above, abridged. The full object has more fields, such as path, repo, nextSteps and docs. skippedReasons says why each step was not done.

{
"template": "react",
"dir": "my-app",
"credentialFile": ".env",
"credentialKey": "REACT_APP_VIDEOSDK_TOKEN",
"tokenWritten": false,
"installed": false,
"ran": false,
"install": "npm install",
"dev": "npm start",
"skippedReasons": {
"sign-in": "flag",
"token": "flag",
"install": "flag",
"run": "no-token"
}
}

Before using the application, add a valid VideoSDK token and install the required dependencies.

Launch controls​

You can control how the CLI handles browser, IDE, dependency installation, and application startup.

OptionDescription
--no-browserDisplay the sign-in URL without automatically opening a browser
--no-installSkip dependency installation and display the installation command
--no-runSkip starting the development server
--no-openPrevent the application browser or IDE from opening
info

Browser-based authentication may still require user approval even when --no-browser is used.

When running without a terminal, the development server is skipped by default in text mode. Use --run to explicitly enable it when credentials and dependencies are available.

The same applies to templates that open in an IDE. Without a terminal, Android Studio or Xcode is not opened and the step is shown in the output instead. Use --open to open the IDE anyway.

When using --json, the development server is not started.

Command options​

OptionShortDescriptionDefault
--template <id>-tSpecify the starter template ID. Can also be provided as the first argument.Asked interactively
--dir <directory>-dSpecify the project directory. Can also be provided as the second argument.Asked interactively
--skip-token—Skip token configuration and leave the credential placeholder unchanged.Token setup enabled
--no-browser—Display the sign-in URL without opening the browser automatically.Browser opens automatically
--no-install—Skip dependency installation.Dependencies are installed
--no-run—Skip starting the development server.Application may start
--no-open—Prevent the browser or IDE from opening after project creation.Browser or IDE may open

vsdk init also accepts the options shared by every command, such as --yes, --json and --quiet. See Global options.

For automated project creation, see Non-interactive setup.

Get help​

To view all available options for vsdk init:

vsdk init --help

Got a Question? Ask us on discord