Scan a codebase to identify the worst-quality files before a code review or refactor.
Add a CI check that blocks merges if overall code quality drops below a threshold score.
Use the optional AI review to get written feedback on your most problematic files from Claude or OpenAI.
Integrate with Claude Code or Cursor as an MCP server to run code quality analysis inside your editor.
Optional AI review requires your own API key for OpenAI, Anthropic, DeepSeek, Gemini, or a local Ollama instance.
This is a command-line tool that analyzes the quality of code in a project and reports back how bad (or good) it is, using deliberately blunt language. You point it at a directory, and it scans your code files, scores each one, and tells you which files are the worst. The overall project gets a score from 0 to 100, with higher meaning better quality. Individual files get a "Shit-Gas Index" where higher means worse. The name and framing are intentionally irreverent, but the underlying analysis is real. The tool checks seven things: how complex the code is, how large individual files and functions are, whether there are comments, whether errors are handled properly, whether names are clear, whether code is duplicated across files, and whether the project structure makes sense. It uses a library called tree-sitter to parse the actual syntax of code rather than just counting lines, which makes the analysis more accurate than simple text scanning. It supports 14 programming languages including Python, JavaScript, TypeScript, Go, Java, Rust, and several others. Installing it takes one command via npm. Once installed, you run fuck-u-code analyze in a directory to get results. You can output the report as colored terminal text, Markdown, HTML, or JSON. You can target specific subdirectories, exclude test files, change how many worst files to show, and run it in multiple languages including Chinese and Russian. The analysis runs entirely on your machine without sending code anywhere. There is also an optional AI review feature that sends your worst-scoring files to an AI model for written feedback. It supports OpenAI-compatible APIs, Anthropic, DeepSeek, Gemini, and locally running models via Ollama. This feature is optional and requires you to supply your own API credentials. Additionally, the tool can act as an MCP server, which means AI coding assistants like Claude Code or Cursor can call its analysis functions directly from inside the editor. Setup for that involves a one-command configuration step. Configuration can live in a project-level file or a global file in your home directory.
← done-0 on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.