npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@goflagship/roast

v1.0.2

Published

Brutal terminal code analyzer and codebase roaster

Readme

@goflagship/roast

Brutal terminal code analyzer and codebase roaster powered by OpenTUI and TypeScript AST inspection.

Roast inspects your TypeScript, JavaScript, React, and JSX codebase, detects code smells, anti-patterns, and architectural bloat, and delivers an uncompromising health grade and roast verdict directly inside an interactive terminal UI or formatted CLI output.


Features

  • Deep AST Analysis: AST parsing powered by the TypeScript compiler API for accurate metrics.
  • Code Quality Metrics:
    • Source Lines of Code (SLOC)
    • Cognitive Complexity & Cyclomatic Complexity
    • Maximum Block Nesting Depth
    • Type Safety Audit (detects any keywords and unsafe type assertions)
  • React & JSX Anti-Pattern Detection:
    • JSX Hell: Flags deeply nested JSX element trees exceeding 6 levels.
    • Monolithic Components: Detects bloated components exceeding 150 lines.
    • Untyped Props: Identifies React components with missing interfaces or untyped props.
    • Unmemorized Inline Callbacks: Flags giant inline function expressions inside JSX attributes.
  • Interactive TUI & CLI Output: Rich full-screen terminal interface with expandable file dropdowns, or instant formatted CLI reports for CI/CD pipelines.
  • Roast Verdict: Brutally honest evaluations based on codebase health ranking.

Installation & Quick Start

Interactive Terminal UI (Recommended via Bun)

The interactive full-screen interface is powered by OpenTUI's native Zig core. Run directly using bunx:

bunx --bun @goflagship/roast

Or install globally with Bun:

bun add -g @goflagship/roast
roast

Universal Mode (Node.js & npx)

Run directly using npx across any Node.js environment (Node 18, 20, 22, 24):

npx @goflagship/roast

Or install globally with npm:

npm install -g @goflagship/roast
roast

Runtime Compatibility & Engines Note

OpenTUI and Native FFI

The interactive terminal UI uses OpenTUI, which requires native Foreign Function Interface (FFI) bindings provided by the Bun runtime (bun >= 1.3.0).

  • When executed with bunx --bun @goflagship/roast (or on a system where Bun is installed), Roast automatically launches the full interactive terminal application.
  • When executed in a pure Node.js environment where Bun is not present (such as CI/CD runners or headless Linux servers), Roast automatically falls back to Headless CLI Mode. The entire AST analysis runs in pure Node.js and prints the formatted roast report with ASCII gauges and deductions directly to stdout.

The npm EBADENGINE Warning

During npm install -g @goflagship/roast, npm may display an informational warning:

npm warn EBADENGINE Unsupported engine {
  package: '@opentui/[email protected]',
  required: { bun: '>=1.3.0', node: '>=26.4.0' }
}

This warning originates from the upstream @opentui/core dependency package, which targets Node 26 for future native Node FFI support while running natively on Bun today. This warning is non-blocking and does not affect package installation or code analysis.


Usage

Interactive Mode

Launch the interactive prompt to select or type a directory:

roast

Direct Target Analysis

Pass the target folder directly to analyze immediately:

roast ./src

Analyze the current directory:

roast .

Command Options

roast --help       # Display help information
roast --version    # Display version number

Keyboard Controls (Interactive TUI)

Input Screen

| Key | Action | |---|---| | [TAB] | Autocomplete path or cycle through directory matches | | [ENTER] | Start analysis | | [ESC] | Exit application |

Report Screen

| Key | Action | |---|---| | [UP] / [DOWN] | Select file in breakdown list | | [ENTER] / [SPACE] | Toggle file details dropdown | | [A] | Expand or collapse all file dropdowns | | [N] | Start a new roast (return to input screen) | | [ESC] / [Q] | Exit application |


Scoring System

Projects and files start at a perfect 100 points. Penalties are deducted based on detected issues:

| Category | Deduction Trigger | |---|---| | File Length | Deductions applied when SLOC exceeds 200 lines | | Cognitive Complexity | Deductions applied when cognitive complexity exceeds 10 | | Block Nesting Depth | Deductions applied when nesting depth exceeds level 3 | | Type Weakness | Penalties for any types and explicit type assertions | | JSX Nesting | Penalties for JSX nesting depth exceeding 6 levels | | Component Bloat | Penalties for React components exceeding 150 lines | | Missing Props Interface | Penalties for components missing typed Props interfaces | | Giant Inline Callbacks | Penalties for multi-line unmemorized callbacks in JSX attributes | | Directory Congestion | Deductions when a single folder contains more than 12 source files |

Rank Scale

  • Rank A (90 - 100): Clean, modular, and rock-solid code. Hard to find anything to roast.
  • Rank B (75 - 89): Passable code with noticeable flaws. A refactoring pass would help.
  • Rank C (60 - 74): Rapidly escalating complexity and technical debt accumulation.
  • Rank D (45 - 59): Maze-like nesting and weak typing throughout the codebase.
  • Rank F (0 - 44): Total disaster. Severe anti-patterns across multiple files.

Development

# Clone the repository
git clone https://github.com/GoFlagship/roast.git
cd roast

# Install dependencies
bun install

# Run in development mode
bun start

# Compile TypeScript
bun run build

# Run built distribution
bun dist/index.js

License

Apache-2.0 © flagship