Skip to content

Add client-creep — CLI to trace why Next.js components are client components#1738

Open
DhruvilChauahan0210 wants to merge 1 commit into
enaqx:masterfrom
DhruvilChauahan0210:add-client-creep
Open

Add client-creep — CLI to trace why Next.js components are client components#1738
DhruvilChauahan0210 wants to merge 1 commit into
enaqx:masterfrom
DhruvilChauahan0210:add-client-creep

Conversation

@DhruvilChauahan0210

Copy link
Copy Markdown

What is client-creep?

client-creep is a zero-setup CLI that statically analyzes any Next.js App Router project and answers three questions no existing tool answers together:

  1. Why is this a client component? — full import chain trace to the "use client" boundary
  2. Did it need to be? — flags components with no hooks/browser APIs (accidental creep)
  3. What does it cost? — estimated KB per boundary + total recoverable

```bash
npx client-creep
```

Fits naturally alongside react-scan and why-did-you-render in the React Development Tools section — same audience, complementary problem (bundle size / RSC boundary analysis vs render performance).

  • Works on Next.js 13, 14, 15, and 16
  • Zero config, purely static — no app running required
  • Supports --html (interactive D3 graph), --watch, --ci, --budget, and monorepo workspaces

Tested on the dub.co codebase: 1,073 client components, 643 KB potentially recoverable.

npm: https://www.npmjs.com/package/client-creep

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

1 participant