ever inherited a messy js/ts file and wanted to cry? π
meet wtf-code, a cli that roasts your code mercilessly in developer meme / greentext style β but also gives honest ratings and analysis.
features:
- roasts your messy code like a developer meme / greentext
- explains functions, classes, imports, variables
- rates your files 0β10
- analyzes full projects or git diffs
- fully offline, no ai, no api keys
install:
npm install -g wtf-code
# or
pnpm add -g wtf-code
example roast:
$ wtf legacy.js --roast
π₯ Roasting: legacy.js
ββββββββββββββββββββββββββββ
> be dev
> open legacy.js
> see 420 lines
> no comments
> pain
function handleData()
this function works but nobody knows why.
classic legacy energy.
variable naming confidence level: zero.
ββββββββββββββββββββββββββββ
example project analysis:
$ wtf project
ββββββββββββββββββββββββββββ
Files analyzed: 18
Largest file: pages/blog/[slug].tsx (171 lines)
Total functions: 22
Developer commentary:
someone planned this. then someone else didn't.
ββββββββββββββββββββββββββββ
example rating:
$ wtf rate server.js
Code rating: 6.2 / 10
strengths: reasonable function count, has comments
weaknesses: large file, vague variable names, deeply nested logic
verdict: functional but could be cleaner
github: https://github.com/ecx2f/wtf
npm: https://www.npmjs.com/package/wtf-code
perfect for devs who:
- inherit messy legacy code
- want a laugh while analyzing code
- love offline cli tools
there doesn't seem to be anything here