[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73515":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":23,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":27,"readmeContent":28,"aiSummary":29,"trendingCount":16,"starSnapshotCount":16,"syncStatus":30,"lastSyncTime":31,"discoverSource":32},73515,"fuck-u-code","Done-0\u002Ffuck-u-code","Done-0","Legacy-Mess Detector – assess the “legacy-mess level” of your code and output a beautiful report","",null,"TypeScript",7150,331,22,23,0,61,130,245,183,38.56,"MIT License",false,"main",true,[],"2026-06-12 02:03:14","# fuck-u-code [![English](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-English-red?style=flat-square)](README.md) [![繁體中文](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F文檔-繁體中文-blue?style=flat-square)](README_ZH-TW.md) [![中文](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002F文档-简体中文-blue?style=flat-square)](README_ZH.md) [![Русский](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-Русский-blue?style=flat-square)](README_RU.md)\n\n\u003Ca href=\"https:\u002F\u002Ftrendshift.io\u002Frepositories\u002F14999\" target=\"_blank\">\u003Cimg src=\"https:\u002F\u002Ftrendshift.io\u002Fapi\u002Fbadge\u002Frepositories\u002F14999\" alt=\"Done-0%2Ffuck-u-code | Trendshift\" style=\"width: 250px; height: 55px;\" width=\"250\" height=\"55\"\u002F>\u003C\u002Fa>\n\n> [!Important]\n> 📢 Remember this command: `fuck-u-code` - let bad code have nowhere to hide!\n\nA tool designed to **expose shitty code quality** with sharp but humorous feedback, showing you exactly **how terrible your code is**.\n\n## Features\n\n* **Multi-language support**: Go, JavaScript, TypeScript, Python, Java, C, C++, Rust, C#, Lua, PHP, Ruby, Swift, Shell (14 languages)\n* **Overall Score**: 0~100, higher = better code quality\n* **Shit-Gas Index**: Per-file score, higher = worse code\n* **Seven quality checks**: Complexity \u002F Size \u002F Comments \u002F Error handling \u002F Naming \u002F Duplication \u002F Structure\n* **AST parsing**: Accurate syntax analysis powered by tree-sitter\n* **AI code review**: Integrates OpenAI-compatible \u002F Anthropic \u002F DeepSeek \u002F Gemini \u002F Ollama\n* **Multiple output formats**: Colored terminal \u002F Markdown \u002F JSON \u002F HTML\n* **i18n**: English \u002F Chinese \u002F Russian\n* **Flexible config**: `.fuckucoderc.json` and more, project-level and global support\n\n> [!Note]\n> Code analysis runs fully offline — your code never leaves your machine.\n> AI review requires an external API or local Ollama.\n\n## Installation\n\n```bash\nnpm install -g eff-u-code\n```\n\nOr build from source:\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FDone-0\u002Ffuck-u-code.git\ncd fuck-u-code && npm install && npm run build\n```\n\n## Usage\n\n### Code Analysis\n\n```bash\nfuck-u-code analyze              # Analyze current directory\nfuck-u-code analyze .\u002Fsrc        # Analyze specific directory\nfuck-u-code analyze . -v         # Verbose (project overview, language stats, function metrics)\nfuck-u-code analyze . -t 20      # Show top 20 worst files\nfuck-u-code analyze . -l zh      # Chinese output\nfuck-u-code analyze . -f markdown              # Markdown terminal rendering\nfuck-u-code analyze . -f markdown -o report.md # Export Markdown\nfuck-u-code analyze . -f html -o report.html   # Export HTML\nfuck-u-code analyze . -f json -o report.json   # Export JSON\nfuck-u-code analyze . -e \"**\u002F*.test.ts\"        # Exclude test files\n```\n\n| Option | Short | Description |\n| --- | --- | --- |\n| `--verbose` | `-v` | Verbose output |\n| `--top \u003Cn>` | `-t` | Top N worst files (default 10) |\n| `--format \u003Cfmt>` | `-f` | Format: console\u002Fmarkdown\u002Fjson\u002Fhtml |\n| `--output \u003Cfile>` | `-o` | Write to file |\n| `--exclude \u003Cglob>` | `-e` | Additional exclude patterns |\n| `--concurrency \u003Cn>` | `-c` | Concurrent workers (default 8) |\n| `--locale \u003Clang>` | `-l` | Language: en\u002Fzh\u002Fru\u002Fzh-tw |\n\n### AI Code Review\n\nRequires AI provider setup (see [AI Configuration](#ai-configuration)).\n\n```bash\nfuck-u-code ai-review . -m gpt-4o                          # OpenAI-compatible\nfuck-u-code ai-review . -p anthropic -m claude-sonnet-4-5-20250929  # Anthropic\nfuck-u-code ai-review . -p ollama -m codellama              # Local Ollama\nfuck-u-code ai-review . -m gpt-4o -t 3                     # Review top 3 worst\nfuck-u-code ai-review . -m gpt-4o -f markdown -o review.md # Export Markdown\nfuck-u-code ai-review . -b https:\u002F\u002Fyour-api.com\u002Fv1 -k sk-xxx -m model # Custom endpoint\n```\n\n| Option | Short | Description |\n| --- | --- | --- |\n| `--model \u003Cmodel>` | `-m` | Model name (required) |\n| `--provider \u003Cname>` | `-p` | Provider: openai\u002Fanthropic\u002Fdeepseek\u002Fgemini\u002Follama |\n| `--base-url \u003Curl>` | `-b` | Custom API endpoint |\n| `--api-key \u003Ckey>` | `-k` | API key |\n| `--top \u003Cn>` | `-t` | Review top N worst files (default 5) |\n| `--format \u003Cfmt>` | `-f` | Format: console\u002Fmarkdown\u002Fhtml |\n| `--output \u003Cfile>` | `-o` | Write to file |\n| `--verbose` | `-v` | Verbose output |\n| `--locale \u003Clang>` | `-l` | Language: en\u002Fzh\u002Fru |\n\n### Config Management\n\n```bash\nfuck-u-code config init                    # Generate .fuckucoderc.json\nfuck-u-code config show                    # Show current config\nfuck-u-code config set i18n.locale zh      # Set default language\nfuck-u-code config set ai.provider openai  # Set AI provider\nfuck-u-code config set ai.model gpt-4o     # Set AI model\nfuck-u-code config set ai.apiKey sk-xxx    # Set API key\n```\n\n### Update\n\nUpdate eff-u-code to the latest version:\n\n```bash\nfuck-u-code update    # Update to latest version\n```\n\nThis will:\n- Check current installed version\n- Check latest version on npm\n- Auto-install the latest version globally\n\n### Uninstall\n\nRemove fuck-u-code and clean up all local files:\n\n```bash\nfuck-u-code uninstall    # Remove global config, MCP entries, and npm package\n```\n\nThis will remove:\n- Global config file (`~\u002F.fuckucoderc.json`)\n- MCP server entries (Claude Code, Cursor)\n- Global npm package (`eff-u-code`)\n\n## Configuration File\n\nAuto-discovered from project directory upward, then falls back to global `~\u002F.fuckucoderc.json`.\n\nSupported formats: `.fuckucoderc.json` \u002F `.yaml` \u002F `.js` \u002F `fuckucode.config.js` \u002F `\"fuckucode\"` field in `package.json`.\n\nGlobal config path: macOS\u002FLinux `~\u002F.fuckucoderc.json`, Windows `C:\\Users\\\u003Cusername>\\.fuckucoderc.json`.\n\nFull example (`.fuckucoderc.json`):\n\n```json\n{\n  \"exclude\": [\"**\u002F*.test.ts\", \"docs\u002F**\"],\n  \"include\": [\"**\u002F*\"],\n  \"concurrency\": 8,\n  \"verbose\": false,\n  \"output\": {\n    \"format\": \"console\",\n    \"top\": 10,\n    \"maxIssues\": 5,\n    \"showDetails\": true\n  },\n  \"metrics\": {\n    \"weights\": {\n      \"complexity\": 0.32,\n      \"duplication\": 0.20,\n      \"size\": 0.18,\n      \"structure\": 0.12,\n      \"error\": 0.08,\n      \"documentation\": 0.05,\n      \"naming\": 0.05\n    }\n  },\n  \"ai\": {\n    \"enabled\": true,\n    \"provider\": \"openai\",\n    \"model\": \"gpt-4o\",\n    \"baseUrl\": \"https:\u002F\u002Fapi.openai.com\u002Fv1\",\n    \"apiKey\": \"sk-your-api-key\"\n  },\n  \"i18n\": {\n    \"locale\": \"en\"\n  }\n}\n```\n\n## AI Configuration\n\nSupports 5 providers. Priority: CLI flags > environment variables > config file.\n\n| Provider | Environment Variables | Example |\n| --- | --- | --- |\n| OpenAI-compatible | `OPENAI_API_KEY` `OPENAI_MODEL` `OPENAI_BASE_URL` | `ai-review . -m gpt-4o` |\n| Anthropic | `ANTHROPIC_API_KEY` | `ai-review . -p anthropic -m claude-sonnet-4-5-20250929` |\n| DeepSeek | `DEEPSEEK_API_KEY` | `ai-review . -p deepseek -m deepseek-chat` |\n| Gemini | `GEMINI_API_KEY` | `ai-review . -p gemini -m gemini-pro` |\n| Ollama | `OLLAMA_HOST` (optional) | `ai-review . -p ollama -m codellama` |\n\n```bash\n# OpenAI-compatible\nexport OPENAI_API_KEY=\"sk-your-key\"\nexport OPENAI_BASE_URL=\"https:\u002F\u002Fapi.openai.com\u002Fv1\"  # Optional\n\n# Or via config file\nfuck-u-code config set ai.provider openai\nfuck-u-code config set ai.model gpt-4o\nfuck-u-code config set ai.apiKey sk-your-key\nfuck-u-code config set ai.baseUrl https:\u002F\u002Fapi.openai.com\u002Fv1\n```\n\n## MCP Server\n\nfuck-u-code provides an MCP (Model Context Protocol) Server, allowing AI tools like Claude Code, Cursor, Windsurf, etc. to directly invoke code quality analysis and AI code review.\n\n### Setup\n\n```bash\n# Global install\nnpm install -g eff-u-code\n\n# Auto-configure (interactive)\nfuck-u-code mcp-install\n\n# Or specify target directly\nfuck-u-code mcp-install claude\nfuck-u-code mcp-install cursor\n```\n\n**Claude Code** (`~\u002F.claude.json` or project `.mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"fuck-u-code\": {\n      \"command\": \"fuck-u-code-mcp\"\n    }\n  }\n}\n```\n\n**Cursor** (`.cursor\u002Fmcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"fuck-u-code\": {\n      \"command\": \"fuck-u-code-mcp\"\n    }\n  }\n}\n```\n\n**Without global install (npx)**:\n\n```json\n{\n  \"mcpServers\": {\n    \"fuck-u-code\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"eff-u-code-mcp\"]\n    }\n  }\n}\n```\n\n### Available Tools\n\n- **analyze** — Analyze code quality and generate a score report\n- **ai-review** — Run AI-powered code review on the worst-scoring files\n\n## File Exclusion\n\nThe tool reads `.gitignore` files (including nested ones) and follows standard gitignore rules. For additional exclusions, use `--exclude` or the `exclude` config field.\n\n## Feedback\n\n> 💬 Share your thoughts\n> Discord: \u003Chttps:\u002F\u002Fdiscord.gg\u002F9ThNkAFGnT>\n\n## Contributing\n\nPRs welcome — let's improve **fuck-u-code** together 🚀\n\n## License\n\nMIT\n\n## Contact\n\n- fenderisfine@gmail.com\n- WeChat: l927171598\n\n## More Projects\n\n- [Value Realization](https:\u002F\u002Fgithub.com\u002FDone-0\u002Fvalue-realization) — AI skill for analyzing product value discovery (100K+ views in 24h, 100+ stars on day 1)\n- [FateSpiral](https:\u002F\u002Ffatespiral.com\u002F) — AI-driven multiplayer RPG, infinite worlds, evolving stories\n- [DestinyTeller](https:\u002F\u002Fdestinyteller.com\u002F) — AI-powered destiny reading website\n- [Jank](https:\u002F\u002Fgithub.com\u002FDone-0\u002FJank) — Open-source blog system in Go\n","fuck-u-code 是一个用于评估代码质量并生成美观报告的工具。它支持多种编程语言（包括 Go、JavaScript、TypeScript、Python 等 14 种），通过七个维度的质量检查（如复杂度、大小、注释等）来计算整体评分和每文件的“烂代码指数”。该工具使用 tree-sitter 进行准确的语法分析，并可集成 OpenAI 兼容的 AI 模型进行代码审查，支持多种输出格式（如终端彩色显示、Markdown、JSON 和 HTML）。此外，它还提供了多语言界面和灵活的配置选项。适用于需要定期审查代码质量和希望以直观方式了解项目健康状况的开发团队。",2,"2026-06-11 03:45:56","high_star"]