Skip to content

TypeGPU CLI

The TypeGPU CLI is the project starter for TypeGPU. Use it to scaffold a new TypeGPU project or enhance an existing project with TypeGPU dependencies and setup.

Run the CLI in the directory where you want to create your project:

npx typegpu@latest

The CLI lets you choose a project name and one of the available templates:

  • Vite
  • Vite + React
  • Expo React Native
  • … and more

It can also install dependencies and download the official TypeGPU AI skill during setup.

Use --yes to skip prompts and use defaults:

Terminal window
npx typegpu@latest my-app --yes

You can still select the important setup choices explicitly:

Terminal window
npx typegpu@latest my-app --yes --template vite-react --addons @typegpu/sdf,@typegpu/noise

--yes skips dependency installation and installs the TypeGPU AI skill automatically.

Run the CLI with --enhance from the root of an existing project:

npx typegpu@latest --enhance

You can also pass the project directory explicitly:

Terminal window
npx typegpu@latest my-app --enhance

Use --yes to apply the standard Vite-oriented TypeGPU setup without prompts:

Terminal window
npx typegpu@latest --enhance --yes

You can also add ecosystem packages in the same pass:

Terminal window
npx typegpu@latest --enhance --yes --addons @typegpu/sdf

If the CLI cannot detect a package manager, pass --package-manager npm, pnpm, pnpm@6, yarn, yarn@berry, or bun.

  • -y, --yes: skip prompts and use defaults.
  • --template <name>: choose vite-bare, vite-complex, vite-react, or expo-bare.
  • --addons <name1>,<name2>: add TypeGPU ecosystem packages.
  • --package-manager <pm>: choose the package manager for dependency and skill commands.

If you want to convert existing WGSL shader files into TypeGPU definitions, use tgpu-gen instead.