Elements CLI
Install CLI
Install the Elements CLI to your system. This creates a canonical executable path and adds the nve command to your path when possible.
macOS / Linux
Windows PowerShell
NodeJS curl -fsSL https://nvidia.github.io/elements/install.sh | bash
curl -fsSL https://nvidia.github.io/elements/install.sh | bash
irm https://nvidia.github.io/elements/install.ps1 | iex
irm https://nvidia.github.io/elements/install.ps1 | iex
# install the CLI
npm install -g @nvidia-elements/cli
# install the CLI
npm install -g @nvidia-elements/cli
Usage
Project Creation
Use the CLI to quickly bootstrap frontend UIs pre-configured with Elements.
# generate a vite/typescript project and start dev server once created
nve project.create --type=typescript --start
# generate a vite/typescript project and start dev server once created
nve project.create --type=typescript --start
API Search
The CLI also can provide API search results withing the terminal.
nve api.search "badge"
nve api.search "badge"
API Validation
Check paths or glob patterns, or pass one typed document through standard input. Supplied content defaults to HTML; use --lang json with --filename for JSON.
nve api.validate 'src/**/*.html' package.json --format json
printf '%s' '<nve-button></nve-button>' | nve api.validate --stdin --format json
printf '%s' '{}' | nve api.validate --stdin --lang json --filename package.json
nve api.validate 'src/**/*.html' package.json --format json
printf '%s' '<nve-button></nve-button>' | nve api.validate --stdin --format json
printf '%s' '{}' | nve api.validate --stdin --lang json --filename package.json
Markdown is the default format. JSON returns ok, complete summary counts, and diagnostics with locations, severity, rule, suggestion, and whether a fix is available. Errors produce a nonzero exit code; warnings do not. The command always uses the recommended Elements rules. Use --max-diagnostics to limit returned findings, and use --fix only with path inputs. It respects .gitignore, skips node_modules, and by default reads at most 200 files, 5 MiB total, and returns 100 diagnostics. It also refuses paths outside the current directory.
Search result output:
## nve-badge
A visual indicator that communicates a status description of an associated component. Status badges use short text, color, and icons for quick recognition .
### Example
<nve-badge>badge</nve-badge>
### Import
import '@nvidia-elements/core/badge/define.js';
### Slots
┌─────────────┬──────────────────────────┐
│ name │ description │
├─────────────┼──────────────────────────┤
│ │ default slot for content │
├─────────────┼──────────────────────────┤
│ prefix-icon │ slot for prefix icon │
├─────────────┼──────────────────────────┤
│ suffix-icon │ slot for suffix icon │
└─────────────┴──────────────────────────┘
...
## nve-badge
A visual indicator that communicates a status description of an associated component. Status badges use short text, color, and icons for quick recognition .
### Example
<nve-badge>badge</nve-badge>
### Import
import '@nvidia-elements/core/badge/define.js';
### Slots
┌─────────────┬──────────────────────────┐
│ name │ description │
├─────────────┼──────────────────────────┤
│ │ default slot for content │
├─────────────┼──────────────────────────┤
│ prefix-icon │ slot for prefix icon │
├─────────────┼──────────────────────────┤
│ suffix-icon │ slot for suffix icon │
└─────────────┴──────────────────────────┘
...
Skills
Use the Elements skill to give AI agents persistent workflow context. Install its complete directory in the current project, or install it for the current user:
nve skills.install
nve skills.install --global
nve skills.install
nve skills.install --global
Commands
Command Description nve --upgrade Upgrade to the latest CLI release. nve api.list [format] Get list of all available Elements (nve-*) APIs and components. nve api.search <query> [format] Search and retrieve a list of Elements (nve-*) components and APIs using keywords or natural language. nve api.get <names..> [--format <format>] Get documentation for one to five known components or attributes (nve-*). nve api.validate [paths..] Check HTML and JSON files using Elements lint rules. nve api.imports.get <template> Get esm imports for a given HTML template using Elements APIs (nve-*). nve api.tokens.list [format] Get available semantic CSS custom properties / design tokens for theming. nve packages.list Get latest published versions of all Elements packages. nve packages.get <name> Get details for a specific Elements package. nve packages.changelogs.get <name> [format] Retrieve changelog details by package name. nve examples.list [format] Get list of available Elements (nve-*) patterns and examples. nve skills.install [--global] Install the Elements agent skill in the project or for the current user. nve playground.validate <template> Validates HTML templates specifically for playground examples. nve playground.create <template> [type] [name] [author] Create a shareable playground URL from an HTML template. nve project.create <type> [cwd] [start] Create a new starter project. nve project.validate <type> [cwd] Check project for configuration issues and dependencies. nve project.setup [cwd] Setup or update a project to use Elements. Troubleshooting
403 Forbidden
A 403 Forbidden error means your token has expired. Re-authenticate to resolve it.
npm config set registry https://registry.npmjs.org && npm login --auth-type=legacy
npm config set registry https://registry.npmjs.org && npm login --auth-type=legacy
Unsupported Engine
An Unsupported engine warning means your Node.js version is out of date. The CLI requires Node.js v20 or later. Update Node.js and try again.