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.
Creating a project
Section titled “Creating a project”Run the CLI in the directory where you want to create your project:
npx typegpu@latestpnpm dlx typegpu@latestyarn dlx typegpu@latestbunx typegpu@latestThe 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.
Non-interactive creation
Section titled “Non-interactive creation”Use --yes to skip prompts and use defaults:
npx typegpu@latest my-app --yesYou can still select the important setup choices explicitly:
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.
Enhancing an existing project
Section titled “Enhancing an existing project”Run the CLI with --enhance from the root of an existing project:
npx typegpu@latest --enhancepnpm dlx typegpu@latest --enhanceyarn dlx typegpu@latest --enhancebunx typegpu@latest --enhanceYou can also pass the project directory explicitly:
npx typegpu@latest my-app --enhanceNon-interactive enhancement
Section titled “Non-interactive enhancement”Use --yes to apply the standard Vite-oriented TypeGPU setup without prompts:
npx typegpu@latest --enhance --yesYou can also add ecosystem packages in the same pass:
npx typegpu@latest --enhance --yes --addons @typegpu/sdfIf the CLI cannot detect a package manager, pass --package-manager npm, pnpm, pnpm@6, yarn, yarn@berry, or bun.
Options
Section titled “Options”-y,--yes: skip prompts and use defaults.--template <name>: choosevite-bare,vite-complex,vite-react, orexpo-bare.--addons <name1>,<name2>: add TypeGPU ecosystem packages.--package-manager <pm>: choose the package manager for dependency and skill commands.
Related tools
Section titled “Related tools”If you want to convert existing WGSL shader files into TypeGPU definitions, use tgpu-gen instead.