Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
F

fuck-u-code

> 编程语言
Open source

Legacy-Mess Detector – assess the “legacy-mess level” of your code and output a beautiful report

7.3K stars0 likes3 views
WebsiteGitHub

About

Legacy-Mess Detector – assess the “legacy-mess level” of your code and output a beautiful report

fuck-u-code

[!TIP] My new project Navis — A project-centric collaboration operating system for humans and AI agents, built around persistent Projects, shared state, and real-world delivery across domains.

In early development — discussions and contributions welcome · Star · Contact me

[!Important] Remember this command: fuck-u-code - let bad code have nowhere to hide!

A tool designed to expose shitty code quality with sharp but humorous feedback, showing you exactly how terrible your code is.

Features

  • Multi-language support: Go, JavaScript, TypeScript, Python, Java, C, C++, Rust, C#, Lua, PHP, Ruby, Swift, Shell (14 languages)
  • Overall Score: 0~100, higher = better code quality
  • Shit-Gas Index: Per-file score, higher = worse code
  • Seven quality checks: Complexity / Size / Comments / Error handling / Naming / Duplication / Structure
  • AST parsing: Accurate syntax analysis powered by tree-sitter
  • AI code review: Integrates OpenAI-compatible / Anthropic / DeepSeek / Gemini / Ollama
  • Multiple output formats: Colored terminal / Markdown / JSON / HTML
  • i18n: English / Chinese / Russian
  • Flexible config: .fuckucoderc.json and more, project-level and global support

[!Note] Code analysis runs fully offline — your code never leaves your machine. AI review requires an external API or local Ollama.

Installation

bash
npm install -g eff-u-code

Or build from source:

bash
git clone https://github.com/Done-0/fuck-u-code.git
cd fuck-u-code && npm install && npm run build

Usage

Code Analysis

…
Option Short Description
--verbose -v Verbose output
--top <n> -t Top N worst files (default 10)
--format <fmt> -f Format: console/markdown/json/html
--output <file> -o Write to file
--exclude <glob> -e Additional exclude patterns
--concurrency <n> -c Concurrent workers (default 8)
--locale <lang> -l Language: en/zh/ru/zh_TW

AI Code Review

Requires AI provider setup (see AI Configuration).

bash
fuck-u-code ai-review . -m gpt-4o                          # OpenAI-compatible
fuck-u-code ai-review . -p anthropic -m claude-sonnet-4-5-20250929  # Anthropic
fuck-u-code ai-review . -p ollama -m codellama              # Local Ollama
fuck-u-code ai-review . -m gpt-4o -t 3                     # Review top 3 worst
fuck-u-code ai-review . -m gpt-4o -f markdown -o review.md # Export Markdown
fuck-u-code ai-review . -b https://your-api.com/v1 -k sk-xxx -m model # Custom endpoint
Option Short Description
--model <model> -m Model name (required)
--provider <name> -p Provider: openai/anthropic/deepseek/gemini/ollama
--base-url <url> -b Custom API endpoint
--api-key <key> -k API key
--top <n> -t Review top N worst files (default 5)
--format <fmt> -f Format: console/markdown/html
--output <file> -o Write to file
--verbose -v Verbose output
--locale <lang> -l Language: en/zh/ru

Config Management

bash
fuck-u-code config init                    # Generate .fuckucoderc.json
fuck-u-code config show                    # Show current config
fuck-u-code config set i18n.locale zh      # Set default language
fuck-u-code config set ai.provider openai  # Set AI provider
fuck-u-code config set ai.model gpt-4o     # Set AI model
fuck-u-code config set ai.apiKey sk-xxx    # Set API key

Update

Update eff-u-code to the latest version:

bash
fuck-u-code update    # Update to latest version

This will:

  • Check current installed version
  • Check latest version on npm
  • Auto-install the latest version globally

Uninstall

Remove fuck-u-code and clean up all local files:

bash
fuck-u-code uninstall    # Remove global config, MCP entries, and npm package

This will remove:

  • Global config file (~/.fuckucoderc.json)
  • MCP server entries (Claude Code, Cursor)
  • Global npm package (eff-u-code)

Configuration File

Auto-discovered from project directory upward, then falls back to global ~/.fuckucoderc.json.

Supported formats: .fuckucoderc.json / .yaml / .js / fuckucode.config.js / "fuckucode" field in package.json.

Global config path: macOS/Linux ~/.fuckucoderc.json, Windows C:\Users\<username>\.fuckucoderc.json.

Full example (.fuckucoderc.json):

…

AI Configuration

Supports 5 providers. Priority: CLI flags > environment variables > config file.

Provider Environment Variables Example
OpenAI-compatible OPENAI_API_KEY OPENAI_MODEL OPENAI_BASE_URL ai-review . -m gpt-4o
Anthropic ANTHROPIC_API_KEY ai-review . -p anthropic -m claude-sonnet-4-5-20250929
DeepSeek DEEPSEEK_API_KEY ai-review . -p deepseek -m deepseek-chat
Gemini GEMINI_API_KEY ai-review . -p gemini -m gemini-pro
Ollama OLLAMA_HOST (optional) ai-review . -p ollama -m codellama
bash
# OpenAI-compatible
export OPENAI_API_KEY="sk-your-key"
export OPENAI_BASE_URL="https://api.openai.com/v1"  # Optional

# Or via config file
fuck-u-code config set ai.provider openai
fuck-u-code config set ai.model gpt-4o
fuck-u-code config set ai.apiKey sk-your-key
fuck-u-code config set ai.baseUrl https://api.openai.com/v1

MCP Server

fuck-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.

Setup

bash
# Global install
npm install -g eff-u-code

# Auto-configure (interactive)
fuck-u-code mcp-install

# Or specify target directly
fuck-u-code mcp-install claude
fuck-u-code mcp-install cursor

Claude Code (~/.claude.json or project .mcp.json):

json
{
  "mcpServers": {
    "fuck-u-code": {
      "command": "fuck-u-code-mcp"
    }
  }
}

Cursor (.cursor/mcp.json):

json
{
  "mcpServers": {
    "fuck-u-code": {
      "command": "fuck-u-code-mcp"
    }
  }
}

Without global install (npx):

json
{
  "mcpServers": {
    "fuck-u-code": {
      "command": "npx",
      "args": ["-y", "eff-u-code-mcp"]
    }
  }
}

Available Tools

  • analyze — Analyze code quality and generate a score report
  • ai-review — Run AI-powered code review on the worst-scoring files

Agent Skill

This repo ships an agent skill, fuck-u-code-analysis, that teaches AI agents (Claude Code, Cursor, opencode, etc.) to interpret the analysis output and produce a structured review. It's not shipped via npm — pull it into your agent's skills directory with npx degit (no clone, nothing left behind; requires npm install -g eff-u-code):

bash
# macOS / Linux
npx degit Done-0/fuck-u-code/skills/fuck-u-code-analysis ~/.claude/skills/fuck-u-code-analysis
# Windows (PowerShell)
npx degit Done-0/fuck-u-code/skills/fuck-u-code-analysis "$HOME\.claude\skills\fuck-u-code-analysis"

Above is for Claude Code; for opencode swap .claude for .config/opencode. Add --force if the target exists.

File Exclusion

The tool reads .gitignore files (including nested ones) and follows standard gitignore rules. For additional exclusions, use --exclude or the exclude config field.

Feedback

Share your thoughts Discord: https://discord.gg/9ThNkAFGnT

Contributing

PRs welcome — let's improve fuck-u-code together

License

MIT

Contact

  • [email protected]
  • WeChat: l927171598

Issues· 24 open

View all issuesOpen on GitHub
  • #2

    屎山代码天梯榜

    help wantedUpdated Aug 14, 2026
  • #160

    What, it said "the bad file is excellent, the good file is terrible"

    Updated Jun 20, 2026
  • #159

    [Feature Request] 添加对 dart 语言的支持

    Updated Jun 5, 2026
  • #157

    这是我用ai写的代码,纯小白,没想到ai能写的这么好

    Updated Jun 1, 2026
  • #89

    【feature request】希望支持鸿蒙 ArkTS(后缀名 ets)

    enhancementUpdated Apr 8, 2026
  • #93

    添加对汇编的支持

    enhancementUpdated Feb 23, 2026
  • #119

    可以添加action自动化fuck吗

    Updated Feb 15, 2026
  • #128

    希望可以增加自定义规则和从读取配置文件开始执行。

    Updated Feb 15, 2026
  • #44

    对代码使用的依赖没有进行评判

    Updated Feb 15, 2026
  • #139

    支持qml

    Updated Dec 26, 2025

> Tags

TypeScript

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedOct 2, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言