@zanzojs/cli
v0.3.8
Published
CLI for scaffolding ZanzoJS in your project
Maintainers
Readme
@zanzojs/cli
The official CLI for ZanzoJS. Scaffolds your project with the correct boilerplate in seconds.
Usage
No installation needed:
npx @zanzojs/cli@latest init # Scaffold a new project
npx @zanzojs/cli@latest check # Lint, validate schema AND verify AST complexityzanzo check — The Security Linter
Beyond basic syntax, check performs advanced static analysis on your schema:
- Circular Dependency Detection: Prevents infinite loops in permission paths.
- AST Complexity Validation: (New) Ensures no permission path generates more than 100 conditional branches. This is crucial for stability in Edge Runtimes (Cloudflare) where CPU limits are strict.
- Dead Code Detection: Identifies unreferenced entities or unused relations.
Or install globally:
pnpm add -g @zanzojs/cli
zanzojs init
zanzojs checkWhat it generates
zanzo.config.ts— Your ZanzoJS schema with the entities you specifiedzanzo-migration.sql— The Universal Tuple Table migration for your databasesrc/app/api/permissions/route.ts— Snapshot compilation endpointsrc/app/api/grant/route.ts— Permission grant endpoint with expandTuplessrc/app/api/revoke/route.ts— Permission revoke endpoint with collapseTuples.cursorrules/CLAUDE.md/.windsurfrules— Agent context rules for your IDE
