Skip to content

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

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

Add client-creep — CLI to trace why Next.js components are client components#496
DhruvilChauahan0210 wants to merge 1 commit into
unicodeveloper: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
```

  • Works on Next.js 13, 14, 15, and 16 (unlike runtime alternatives that require Next 16+)
  • Zero config, no app running required — purely static analysis
  • 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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant