nextvm validate
Static checks on the current NextVM project. Catches the common mistakes before they hit production.
Synopsis
bash
nextvm validateChecks performed
| Check | Severity | What it catches |
|---|---|---|
nextvm.config.ts exists | error | The CLI needs the project config to do anything |
Each module has src/index.ts | error | Module is malformed |
Each module has en.ts locale | warning | — i18n required |
Modules importing @nextvm/tebex ship MONETIZATION.md | error | — PLA compliance |
Each module uses the layered src/server/ structure | warning | MODULE_ARCHITECTURE.md convention |
Declared dependencies have a matching adapters/<dep>-adapter.ts | warning | — adapter pattern |
RPC mutations have .input(z.object(...)) | error | — Zod validation |
The PLA-compliance check looks for real import statements, not stray mentions in JSDoc comments — so a module that documents the policy without consuming @nextvm/tebex does NOT trigger the warning.
Exit codes
| Code | Meaning |
|---|---|
| 0 | All checks passed (warnings are non-fatal) |
| 1 | At least one check failed |
Example output
ℹ Validating NextVM project
✓ nextvm.config.ts found
✓ Found 6 module(s)
⚠ Module 'banking' is not using the layered structure (src/server/service.ts + router.ts). See https://docs.nextvm.dev/guide/module-authoring.
⚠ Module 'jobs' declares dependency 'banking' but has no adapters/banking-adapter.ts
✓ Validation passed (2 warnings)CI integration
Add it to your CI pipeline alongside pnpm test:
yaml
- run: pnpm install
- run: pnpm run build
- run: pnpm test
- run: pnpm exec nextvm validateThe non-zero exit on errors makes it fail the build cleanly.