Installation

Install and run the Lattice UI CLI in global and monorepo-local workflows.

On this page

Prerequisites

  • Node.js 20+
  • One package manager: npm, pnpm, or yarn
  • A Roblox TS project using @rbxts/react and @rbxts/react-roblox

Execution Mode Matrix

ModeBest forFirst setupCommand style
Global CLIApp repositories outside this monoreponpm i -g lattice-uilattice <command>
Monorepo Local ScriptWorking inside this repositoryNo global install requiredpnpm lattice <command>

If you do not want a global install, you can also run one-off commands with npx lattice-ui <command>.

Verify CLI Access

Global CLI

npm i -g ${latticeSnapshot.cli.packageName}
lattice --help

Monorepo Local Script

Monorepo local script

Run local lattice commands through your package manager wrapper.

pnpm lattice --help

Bootstrap a Project

Use create for a new repo and init for an existing repo that already has a package.json.

Create a New Project

lattice create

Create via local script

Use local package-manager wrappers when the CLI is not globally installed.

pnpm lattice create

Initialize an Existing Project

lattice init

Initialize via local script

Run init with the package manager command wrapper for your workspace.

pnpm lattice init

create is interactive by default. init is also interactive unless you pass --yes, and it supports --dry-run so you can inspect the merge plan first.

After create, generated projects include lattice-ui in devDependencies, so local command execution is immediately available:

Run local command after create

Generated projects include lattice-ui in devDependencies, so local wrappers are ready.

pnpm lattice --help

Install Component Packages

Global CLI

lattice add core,style,system
lattice add dialog,toast --preset overlay

Monorepo Local Script

Add packages via local script

Install and preset commands through your selected package manager.

pnpm lattice add core,style,system\npnpm lattice add dialog,toast --preset overlay

Validate and Upgrade

Global CLI

lattice doctor
lattice upgrade --preset form

Monorepo Local Script

Validate and upgrade via local script

pnpm lattice doctor\npnpm lattice upgrade --preset form

Peer Dependencies

Ensure compatible peers are installed:

Install peer dependencies

Use your package manager to install required react peers.

pnpm add @rbxts/react @rbxts/react-roblox

Next: Quick Start.