npm.io
0.1.0-alpha.1 • Published 3d agoCLI

ui-enforcer

Licence
MIT
Version
0.1.0-alpha.1
Deps
6
Size
119 kB
Vulns
0
Weekly
0
Stars
1

ui-enforcer

Keep human- and AI-generated UI inside your design system. ui-enforcer is a CLI, stdio MCP server, Git diff adapter, and Codex, Claude Code, and Cursor integration backed by one design-token graph.

Public Alpha (0.1.x) — suitable for evaluation, design-partner pilots, and non-critical CI. Pin the exact version because package APIs, configuration, and diagnostics may change before 1.0.

Requires Node.js 22 or newer. During the alpha, install from the next channel:

npx -y ui-enforcer@next init

The initializer detects the package manager and high-confidence token sources, installs the exact running version, safely merges project Agent configuration, and runs an initial static audit. Use --dry-run to preview, --agents codex,claude,cursor to select targets, and --force to replace only conflicting ui-enforcer-owned entries. Then audit locally or in CI:

pnpm exec ui-enforcer audit
pnpm exec ui-enforcer audit --staged
pnpm exec ui-enforcer audit --since origin/main --format json
pnpm exec ui-enforcer audit --fix
pnpm exec ui-enforcer audit --visual
pnpm exec ui-enforcer mcp

Exit code 0 is clean, 1 indicates blocking violations, and 2 indicates configuration, graph, or parser failure. Automatic fixes require an exact, unique, mode-safe semantic token with an explicit binding.

JavaScript/TypeScript configuration and configured Storybook commands execute with the current user's permissions. Audit only repositories you trust, and isolate untrusted code in a disposable container or CI worker.

See the full documentation for configuration, MCP tool contracts, agent integrations, visual evidence, the roadmap, support, and security policy.

Keywords