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

big-brocode

v0.2.1

Published

Your coding big brother: explains TypeScript, JavaScript, and ReactJS errors instantly

Readme

big-brocode

Explain and surface JavaScript/TypeScript/React errors fast, with optional TypeScript-powered scanning and SARIF/ESLint outputs.

Highlights

  • CLI that accepts raw error text, codes, or stack traces.
  • Project/file analyzer that runs lightweight heuristics plus real TypeScript diagnostics.
  • Multiple output formats: text, JSON, ESLint-compatible, SARIF.
  • Safe autofix hook (apply fixes where available).

Install

npm install -g big-brocode
# or per-project
npm install --save-dev big-brocode

Quick Start

Explain a single error string:

bigbro "TS2339: Property 'x' does not exist on type 'User'"

Explain with explicit options:

bigbro --message "TypeError: Cannot read properties of undefined" --language javascript
bigbro --code 2304 --language typescript
bigbro --stack "TypeError: Cannot read properties of undefined
    at src/app.js:10:5"

Analyze files or projects:

# Analyze all JS/TS files under a directory
bigbro analyze fixtures

# Specific glob(s)
bigbro analyze "src/**/*.ts" "app/**/*.tsx"

# JSON output (exit code 0 if findings, 2 if none)
bigbro analyze fixtures --format json

# ESLint-format output
bigbro analyze fixtures --format eslint

# SARIF output
bigbro analyze fixtures --format sarif

Autofix (experimental/safe):

bigbro analyze src --fix

Options (CLI)

  • -m, --message <text>: Error message to explain.
  • -l, --language <lang>: javascript, typescript, javascriptreact, typescriptreact.
  • -c, --code <num>: Numeric error code (e.g., 2339).
  • -s, --stack <string>: Stack trace string (auto-detects language).
  • --format text|json|eslint|sarif: Output format (default text unless --json).
  • --project, -p <path>: Path to tsconfig.json for diagnostics.
  • --no-typescript: Skip TypeScript diagnostics during analyze.
  • --fix: Apply safe autofixes where available.
  • --all: Return all matching explanations instead of best match.
  • --json: Shortcut for JSON output in explain mode.
  • --schema: Print JSON schema for explain output.
  • -h, --help: Show help.

Exit Codes

  • Explain mode: 0 on explanation found, 2 when none.
  • Analyze mode: 0 when findings exist, 2 when no findings.

Library Usage (ESM)

import {
  explainError,
  explainFromStackTrace,
  analyzeFile,
  analyzeFiles,
} from "big-brocode";

const entry = explainError({ message: "TS2339: Property 'x' does not exist" });
const stackEntry = explainFromStackTrace(stackString);
const single = analyzeFile("src/example.ts");
const many = analyzeFiles(["src/**/*.ts"]);

Dev Notes

  • Build: npm run build
  • Watch: npm run watch
  • Node: tested on Node 18+.
  • Source lives in src/, distributed ESM in dist/.

Sample Fixtures

Handy for smoke tests (already in the repo):

  • fixtures/ts-errors.ts — common TS errors (2339, 2322, 7006, 2304).
  • fixtures/react-hook.tsx — invalid hook placement warning.
  • fixtures/error-texts.js — raw error strings to trigger detectors.

Publishing

  • Ensure npm run build succeeds.
  • Confirm dist/cli.js starts with a shebang for global installs.
  • Publish: npm publish