@assemblcorp/tooling (1.0.3)
Installation
@assemblcorp:registry=npm install @assemblcorp/tooling@1.0.3"@assemblcorp/tooling": "1.0.3"About this package
@assemblcorp/tooling
Build-time CLI and linting rules for design system enforcement. Zero runtime dependencies.
Exports
CLI Framework:
import { defineCommand } from '@assemblcorp/tooling/cli'
// Use via: pnpm cli <command> [args]
Oxlint Plugin (v2 Rust-based):
import { oxlintPlugin } from '@assemblcorp/tooling'
// Configured in .oxlintrc.json (30+ rules)
Dependencies
{
"@assemblcorp/shared": "workspace:*",
"@assemblcorp/kernel": "workspace:*",
"@assemblcorp/themes": "workspace:*",
"citty": "latest", // CLI framework
"consola": "latest", // Structured logging
"oxlint": "^1.36+" // Rust-based linter
}
CLI Commands (23 Total)
Generate (6 commands):
pnpm cli generate tokens # OKLCH primitives
pnpm cli generate safelist # 763 Tailwind patterns
pnpm cli generate css-vars # Semantic token CSS vars
pnpm cli generate themes # 9 theme files
pnpm cli generate preset-index # Theme metadata
pnpm cli generate all # Full workflow
Validate (9 commands):
pnpm cli validate safelist | themes | tokens | elevation | props | wcag | css-variables | css | all
Lint (3 commands):
pnpm cli lint oxlint # 30+ design system rules
pnpm cli lint patterns # ESLint pattern checks
pnpm cli lint check # Full pipeline
Detect (2 commands):
pnpm cli detect breaking-changes # API changes
pnpm cli detect dead-tokens # Unused tokens
Build/Dev (3 commands):
pnpm cli build [--watch] # Compile TypeScript
pnpm cli dev # Dev server
pnpm cli info # System info
Linting Rules (30+)
Categories: Token usage, Accessibility, Dark mode, Typography, Motion, CSS variables, Semantic colors, Contrast validation, Pattern enforcement
See .oxlintrc.json and src/oxlint-plugin/rules/ for complete list.
Build
pnpm -C packages/tooling build
pnpm -C packages/tooling typecheck
Process: tsc → scripts/prepare-bin.js (make CLI executable)
Architecture
CLI System (Citty + Consola):
- 7 command groups, 23+ subcommands
- Wraps root npm scripts with structured execution
- Type-safe command definitions + output formatting
- Entry:
bin/jax-ui.mjs→ TSX loader →dist/cli/index.js
Oxlint Plugin (Rust-based linting):
- 30+ rules auto-generated from design tokens
- Rule categories: tokens, a11y, dark mode, typography, motion, contrast
- Configuration in
.oxlintrc.json - Migration from ESLint to Oxlint v2 in progress
File Structure:
src/
├── cli/ # ✅ 23/23 commands operational
│ ├── commands/ # 7 command groups
│ └── utils/ # Execution, logging, output
└── oxlint-plugin/ # 🚧 Rule migration ongoing
└── rules/ # Rule implementations
bin/ # jax-ui.mjs executable
scripts/ # Build automation
Adding a CLI Command
- Create command in
src/cli/commands/mycommand.ts:
import { defineCommand } from 'citty'
export default defineCommand({
meta: { name: 'mycommand', description: 'What this does' },
async run(ctx) { /* logic */ }
})
- Register in
src/cli/index.tssubCommands - Add mapping to
src/cli/utils/constants.ts - Run
pnpm build
Status
✅ CLI System: All 23/23 commands operational 🚧 Oxlint Migration: 5/30 rules complete (enforce-shared-patterns done)
License
MIT
Dependencies
Dependencies
| ID | Version |
|---|---|
| @ai-sdk/anthropic | ^3.0.34 |
| @ai-sdk/openai | ^3.0.34 |
| @assemblcorp/lint-config | 1.0.1 |
| @assemblcorp/lint-rules | 1.0.2 |
| @assemblcorp/terrazzo-plugins | 1.0.1 |
| @assemblcorp/themes | 1.0.9 |
| ai | ^6.0.101 |
| citty | ^0.2.1 |
| consola | ^3.4.2 |
| dpdm | ^3.15.1 |
| ts-morph | ^27.0.2 |
| tsx | ^4.21.0 |
| zod | ^4.3.6 |
Development Dependencies
| ID | Version |
|---|---|
| @typescript/native-preview | 7.0.0-dev.20260225.1 |
| glob | ^13.0.6 |
| tsdown | 0.20.3 |
| typescript | npm:@typescript/native-preview@7.0.0-dev.20260225.1 |
| vitest | ^4.0.18 |
Peer Dependencies
| ID | Version |
|---|---|
| @assemblcorp/kernel | 1.0.9 |
| @assemblcorp/shared | 1.0.9 |
| @assemblcorp/ui | 1.0.46 |