v2.4.0 · MITLocal-first231 tests
better-ui scans your frontend projects for lint errors, accessibility gaps, performance issues, and code smells — then helps you fix them, one file at a time. No SaaS, no data exfiltration, no CI lock-in.
$ npm install -g better-ui-cli
$ npx better-ui-cli /menuFeatures
Scan, analyze, fix, and report — all from your terminal. Works with React, Next.js, Vue, Svelte, Angular, Astro, and vanilla TypeScript.
ESLint, TypeScript diagnostics, and 8 built-in frontend heuristics covering accessibility, performance, and maintainability.
12 LLM providers (OpenAI, Claude, Gemini, Groq, and more). Fix files with contextual rewrites, not regex.
SEO audits, technical debt detection, performance profiling, stack analysis, migration readiness, and a consolidated health score.
Discover oversized assets and generate WebP variants with configurable quality.
Dashboard, command palette, and hunk-level interactive fixing — all in your terminal.
Zero network calls in product code. Path-validated writes. No telemetry. No SaaS. Your code never leaves your machine.
Network calls in product code
Built-in heuristic rules
Adapter patterns for 12 AI providers
Install
npm install -g better-ui-cliThen run better-ui-cli /menu anywhere.
npx better-ui-cli /menuNo install required — run via npx.
Quick Start
# Open the interactive command center better-ui-cli /menu # Run a full scan better-ui-cli /scan # Check project health score better-ui-cli /health # Find dead dependencies better-ui-cli /deps # Scan for accessibility issues only better-ui-cli /a11y # Run an SEO audit better-ui-cli /seo # Show the top-10 most problematic files better-ui-cli /hotspots --top 10 # List all project images with sizes better-ui-cli /images # Convert heavy images to WebP (quality 1-100) better-ui-cli /images --generate --quality 75 # AI-powered fixes (scan → AI rewrite → re-scan) better-ui-cli /fix # Or run without installing npx better-ui-cli /menu
Why better-ui
No more juggling ESLint, Lighthouse, bundle analyzers, and SEO checkers. better-ui unifies them in a single terminal command.
Slash Commands
Every command starts with /. No flags to memorize for basic usage. Scope any scan with --changed or --staged.
/scancoreFull project scan (ESLint + heuristics + TS diagnostics)
/fixaiAI-powered fix or dry-run
/healthoverviewProject health score (0–100) with category breakdown
/hotspotsoverviewFiles ranked by issue density and severity
/a11ycoreAccessibility-only scan
/depsauditUnused and heavy dependency analysis
/imagesauditImage inventory and WebP generation
/seoauditSEO audit (meta, OG, Twitter Cards, structured data)
/tech-debtauditCode smell detection (TODOs, console.log, :any, etc.)
/performanceauditFrontend performance audit
/stack-auditauditTechnology stack and tooling analysis
/migrationauditLegacy pattern detection (CRA, Enzyme, class components)
/fe-scoreoverviewConsolidated frontend health score
/advancedoverviewPower-user cheat sheet
/menutuiInteractive TUI dashboard
/commandstuiFull command catalog
/aiaiConfigure AI provider, API key, and system prompt
/custom-s-paiView, edit, or reset the AI system prompt
/ui-colorsuiColor palette analysis (hex, rgb, hsl, inconsistencies)
/ui-standardsuiComponent standards analysis
/ui-typographyuiTypography audit
/ui-spacinguiSpacing consistency scan
Git-aware: /scan --changed, /scan --staged, /fix --changed
Configuration
Create better-ui.config.json in your project root. Or don't — sensible defaults apply.
{
"projectName": "my-app",
"preset": "next",
"aiProvider": "Groq",
"aiMaxFixLines": 400,
"defaults": {
"reportFile": "better-ui-report.json",
"extensions": [".js", ".jsx", ".ts", ".tsx"]
},
"plugins": ["my-custom-scanner"]
}Available presets: react, next, vite, landing-page, typescript-library
AI_API_KEY=gsk_your_key_here AI_PROVIDER=Groq AI_MODEL=llama-3.3-70b-versatile
Auto-created, git-ignored. See docs for full schema.
.js,.jsx,.ts,.tsx
.js,.jsx,.ts,.tsx
.js,.jsx,.ts,.tsx
.js,.jsx
.ts,.tsx
Use defaults.extensions
AI Providers
Pick your model. Bring your own key. No vendor lock-in — switch providers with a single command.
API keys stored in .env — auto-ignored by .gitignore. Never logged.
Built-in Heuristics
No configuration needed. These fire automatically on every /scan.
// better-ui-disable-next-line img-alt <img src="decorative.jpg" /> /* better-ui-disable large-file */ // ... long component /* better-ui-enable large-file */ // better-ui-disable // disables ALL rules for this line
Health Score
A single number (0–100) computed from every file in your project.
total = sum of (errorCount + floor(warningCount / 2)) score = max(0, 100 - min(100, total))
Reports save to .reports/<command>/<command>-<ISO>.<ext> by default. Override with --out <path> or skip writing with --no-save. Formats: json (default), markdown.
Works With
Scanners auto-detect frameworks and adapt analysis. No manual configuration needed.
Development
git clone https://github.com/davidalarcondev/better-ui.git cd better-ui pnpm install pnpm verify pnpm build
Documentation
No signup. No data collection. Just a single command in your terminal.