NUMU Docs
Contact
APIThemes
Partner Apps
APIThemes
Partner Apps
  1. CLI & Vite plugin
  • šŸ—‚ļø Themes overview
  • šŸš€ Start here
  • Glossary
  • Theme engine
    • Architecture
    • BYOT contract
    • Customizer
    • Federation runtime
    • Page data contract
    • Theme manifest
  • Theme SDK
    • Components
    • Federation helpers
    • Hooks
    • SDK overview
    • Type definitions
  • CLI & Vite plugin
    • CLI commands
    • CLI overview
    • Lint rules
    • Section library
    • Vite plugin
  • Storefront host
    • API proxies
    • Built-in fallbacks
    • BYOT fork
    • Routing
    • Storefront overview
  1. CLI & Vite plugin

CLI overview

The two repos that own a theme developer's local toolchain.

numu-theme (CLI)#

Repo: numu-theme-cli. Commands:
numu-theme init <name>             # scaffold a fresh theme
numu-theme dev [--watch]           # local dev server with HMR
numu-theme check                   # validate theme.json + schemas
numu-theme lint [--strict] [--json] [--rules id1,id2]
numu-theme build                   # produce dist/
numu-theme push                    # upload dist/ to your dev sandbox
numu-theme submit                  # submit dist/ to the marketplace for review
numu-theme install <theme-id>      # install a published theme into your test store
numu-theme login                   # marketplace auth
numu-theme status                  # current login + active theme + build status
numu-theme doctor                  # diagnose common setup issues
numu-theme add-section <name>      # scaffold a new section (+ optional --from-library)
numu-theme add-block <section> <name>
numu-theme pull <theme-id>         # download published theme source
numu-theme delete <theme-id>       # soft-delete a draft / unpublish
Detailed command reference: CLI Commands.

@numueg/theme-plugin (Vite plugin)#

Repo: numu-theme-plugin. Used in each theme's vite.config.ts:
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";
import numuTheme from "@numueg/theme-plugin";

export default defineConfig({
  plugins: [react(), numuTheme()],
});
What the plugin does:
1.
Contract validation — checks src/main.tsx exports mount; checks React/SDK are externalized
2.
Schema codegen — reads schemas/sections/*.json → writes typed declarations to src/__generated__/sections.d.ts
3.
Dev-server middleware — serves /theme.js, /theme.css, /sections.json so the customizer can load your local build
4.
Federation externals — auto-injects react, react-dom, @numueg/theme-sdk into rollupOptions.external
5.
Asset pipeline — content-hashes assets/* and emits a manifest
6.
Manifest emission — writes dist/manifest.json summarizing the bundle
Detailed plugin reference: Vite Plugin.

How they fit#

ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”
│ theme repo                                                  │
│                                                             │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”                                         │
│  │  CLI commands │  ← high-level UX                        │
│  │  init, dev,   │                                         │
│  │  build, lint, │                                         │
│  │  submit, …    │                                         │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜                                         │
│          │ spawns Vite with plugin                         │
│          ā–¼                                                  │
│  ā”Œā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”                                         │
│  │ Vite + plugin │  ← low-level build pipeline             │
│  │  contract,    │                                         │
│  │  codegen,     │                                         │
│  │  externals,   │                                         │
│  │  assets       │                                         │
│  ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”¬ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜                                         │
│          │                                                  │
│          ā–¼                                                  │
│       dist/                                                 │
│         theme.js, theme.css, manifest.json                  │
ā””ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”€ā”˜
You only directly invoke the CLI. The plugin is implicit — numu-theme init scaffolds a vite.config.ts with it pre-wired.

Installing the CLI#

Two options:

Global (recommended for daily use)#

Per-project via npx#

While the CLI is pre-publish, install from source:

Bundled section library#

numu-theme add-section --from-library <slug> clones a production-grade section into your theme. Current entries (15):
hero-with-cta              announcement-bar
featured-products          countdown-timer
image-with-text            featured-blog-posts
newsletter-signup          contact-map
multi-column               collection-list
testimonials               video-embed
faq-accordion              rich-text
logo-cloud
--list prints the catalog. Detailed reference: Section Library.

Lint rules#

numu-theme lint runs 10 static-analysis checks:
idWhat it catches
manifest-required-fieldsid/name/version/author on theme.json
schema-registry-syncpreset sections ↔ schema files
locale-paritymissing keys in non-default locales
preset-schema-conformancepreset settings only use schema-declared ids
unused-settingssettings_schema entries no theme reads
img-missing-alt<img> tags missing alt
hardcoded-text3+-word JSX text not behind t()
inline-color-literalhex/rgb literals in style props
forbidden-script-tag<script> in component sources
use-app-no-availability-checkuseApp() callers without .available branch
Flags: --strict (warnings → errors), --json (machine-readable), --rules id1,id2,... (subset).
Detailed reference: Lint Rules.
Modified atĀ 2026-09-24 13:03:12
Previous
CLI commands
Next
Lint rules
Built with