---
title: "CLI"
description: "Run Nyxel development, validation, inspection, generation, build, and smoke commands."
canonical_url: "https://nyxel.dev/docs/cli"
markdown_url: "https://nyxel.dev/docs/cli.md"
---

# CLI
URL: /docs/cli
LLM index: /llms.txt
Description: Run Nyxel development, validation, inspection, generation, build, and smoke commands.

# CLI

`@nyxel/cli` is the repository’s command-line entry point for theme development and validation. It is available through the monorepo after `pnpm install`.

```bash
pnpm nyxel help
pnpm nyxel dev
pnpm nyxel check
```

There is no global installation or project scaffolder yet. Run the binary through the root script or `pnpm exec nyxel`.

## Develop

From the repository root, `pnpm dev` builds the Node-consumed packages and starts the contract watchers, Astro storefront, and editor host. Add `--verbose` when you need the raw process output.

```bash
pnpm dev
pnpm dev -- --verbose
pnpm dev:site
```

For one application, use its package filter or run `nyxel dev --storefront` from `apps/storefront`.

## Validate a component

After changing a component contract or template, start with the storefront check:

```bash
pnpm nyxel check
```

It performs static extraction, manifest validation, template validation, component usage checks, and the Astro host typecheck. Add `--fast` for extraction and manifest validation only while iterating, or `--json` when another tool needs structured diagnostics.

Use inspection commands when the extracted result is unclear:

```bash
pnpm nyxel inspect component apps/storefront/src/lib/components/sections/collection-grid.svelte
pnpm nyxel explain NXY105
pnpm nyxel doctor
```

`inspect component` shows the source contract, renderer, normalized manifest, generated entry, and diagnostics. `doctor` checks the Node version, Astro integration, renderer adapters, Canvas and Preview endpoints, TypeScript setup, and required project paths.

## Cross-surface gates

The storefront check does not validate the editor library or every public package. Use the broader commands at a coherent handoff or release boundary:

```bash
pnpm check:handoff
pnpm smoke
pnpm build
pnpm check:packages
```

`check:handoff` covers component contracts, runtime, adapters, Astro integration, storefront, editor library, and editor host. `smoke` exercises the live HTTP contracts and therefore requires the storefront and editor services. `check:packages` inspects packed exports. `build` verifies every application and package in dependency order.

## Generate and build

The generator creates a typed section or block shell:

```bash
pnpm nyxel generate section featured-products
pnpm nyxel generate block badge
```

`nyxel build` validates the storefront registry before the production Astro build. Generated code is a starting point; choose settings and regions that express the component’s real behavior, then verify it in Canvas and Preview.

## Sitemap

See the full [sitemap](/sitemap.md) for all pages.
Docs-scoped sitemap: [/docs/sitemap.md](/docs/sitemap.md).
Well-known sitemap: [/.well-known/sitemap.md](/.well-known/sitemap.md).
