npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@alexcodeui/ui-factory-cli

v1.0.5

Published

The Ultimate Next.js AI Agent Companion CLI - Save tokens, build faster.

Readme

🤖 UI FACTORY CLI (AST EDITION)

NPM Version License Twitter URL

The Ultimate Next.js Agent Companion CLI Save AI context tokens, automate the boilerplate, and build faster.


⚡ Stop Wasting AI Tokens

Are you building Next.js applications using AI assistants (Claude, ChatGPT, Cursor)? Stop wasting your context window and API tokens by making the AI manually scan for dead code, missing "use client" directives, or unused imports.

UI Factory CLI is a suite of hyper-fast local tools designed to do the "dirty work" locally in milliseconds, saving you massive amounts of tokens and preventing your AI from getting stuck in repetitive loops.

🔥 NEW IN v1.0.4+ (AST Edition): The CLI now uses @babel/parser and @babel/traverse to read your code natively as an Abstract Syntax Tree. 100% precision, no regex false positives!


🚀 Quick Start (No Installation Required)

You don't need to install anything. Just run the interactive CLI in the root of your Next.js project:

npx @alexcodeui/ui-factory-cli

🌎 Bilingual Support: The interactive menu automatically supports English and Spanish!

The Premium Interactive Menu

When you run the command, you will be greeted by our beautiful interactive menu where you can navigate with your arrow keys:

? What optimization do you want to apply to your project?
❯ ✨ Generate Component (Scaffold)
  🧹 Clean Unused Icons (Prune Icons)
  👻 Scan Dead Code (Dead Code)
  🔧 Inject 'use client' in Hooks (Fix Client)
  🔐 Sync Environment Variables (.env.example)
  🎨 Check Dark Mode Support (Theme Check)
  🖼️  Optimize Images (next/image)
  ⚖️  Split Check (Fat Components)

🛠️ Direct Commands (Pro Toolkit)

If you prefer to skip the interactive menu, you can run the commands directly:

1. generate <name>

Scaffold universal React components with the best practices instantly.

npx @alexcodeui/ui-factory-cli generate "Glitch Button"

2. prune-icons

AST-based scan to safely remove unused react-icons or lucide-react imports.

npx @alexcodeui/ui-factory-cli prune-icons

3. dead-code

The Ghost Hunter. AST parser resolves aliased imports (@/components) to find completely orphaned files in your src/ folder.

npx @alexcodeui/ui-factory-cli dead-code

4. fix-client

The Next.js Savior. Injects "use client"; safely below existing directives if it detects React hooks or framer-motion.

npx @alexcodeui/ui-factory-cli fix-client

5. sync-env

Scans your code for process.env.* usage and updates your .env.example.

npx @alexcodeui/ui-factory-cli sync-env

6. theme-check

Checks the coverage of the dark: tailwind class in your components.

npx @alexcodeui/ui-factory-cli theme-check

7. optimize-images

Finds raw HTML <img> tags and suggests migrating to <Image> from next/image for better performance.

npx @alexcodeui/ui-factory-cli optimize-images

8. split-check

Identifies "fat components" (>250 lines or >8 hooks) that consume too many AI context tokens and suggests splitting them.

npx @alexcodeui/ui-factory-cli split-check

🎁 Created by @alexcodeui

Coming soon: The UI Factory — Hyper-dynamic React components for the AI era.