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

explain-my-error

v1.0.12

Published

AI-powered CLI to explain programming errors with fixes and ELI5 output.

Downloads

740

Readme

explain-my-error CLI screenshot

explain-my-error

Turn confusing programming errors into clear fixes directly in your terminal.

explain-my-error returns:

  • A plain-English explanation
  • Common root causes
  • Likely root cause based on context
  • 2-3 alternative hypotheses with confidence
  • Ranked fix plans (fast patch / proper fix / long-term fix)
  • Framework-specific recipes (React/Next.js/Node/Express/TypeScript)
  • Copy-paste remediation commands
  • Verify checklist
  • A practical fix
  • A code example
  • An ELI5 summary

Alias included: eme

Install

Install in a project:

npm i explain-my-error

Install globally (recommended for CLI usage from anywhere):

npm i -g explain-my-error

Then run:

explain-my-error --help
# or
eme --help

Set your API key

Required: GROQ_API_KEY

If the key is missing, the CLI will prompt for it interactively and can save it to a local .env file.

macOS/Linux (zsh/bash):

export GROQ_API_KEY="your_groq_api_key"

Windows PowerShell:

$env:GROQ_API_KEY="your_groq_api_key"

Global install note

If you installed globally with npm i -g explain-my-error:

  • Interactive key setup saves .env in your current working directory.
  • For using the CLI from any folder, set GROQ_API_KEY in your shell profile.

Persist on macOS/Linux:

echo 'export GROQ_API_KEY="your_groq_api_key"' >> ~/.zshrc
source ~/.zshrc

Usage

Interactive mode

explain-my-error
eme

Inline message

explain-my-error explain "TypeError: Cannot read property 'map' of undefined"
eme explain "ReferenceError: x is not defined"

Context-aware input

eme explain "TypeError: Cannot read property 'map' of undefined" \
  --framework react \
  --runtime "node 20" \
  --stack "at App (src/App.tsx:12:5)" \
  --code "items.map(item => item.id)"
eme explain --stack-file ./error.log --code-file ./src/App.tsx --framework nextjs

JSON mode

eme explain "ReferenceError: x is not defined" --json

Piped input

cat error.txt | explain-my-error
npm run build 2>&1 | eme

Command reference

explain-my-error [command]

Commands:

  • explain [error...] Explain a programming error
  • --json Return structured JSON output
  • --stack, --stack-file Add stack trace context
  • --code, --code-file Add code snippet context
  • --runtime Add runtime context
  • --framework Add framework context
  • --help Show CLI help
  • --version Show CLI version

Example output

========================================================================
| EXPLAIN MY ERROR                                                     |
| AI powered debugging for humans                                      |
========================================================================

ERROR: TypeError: Cannot read property 'map' of undefined

------------------------------------------------------------------------
EXPLANATION
This happens when .map() is called on a variable that is undefined.
------------------------------------------------------------------------

------------------------------------------------------------------------
COMMON CAUSES
1. API data not loaded
2. State not initialized
3. Incorrect variable reference
------------------------------------------------------------------------

FIX
Ensure the array exists before calling map.

------------------------------------------------------------------------
CODE EXAMPLE
const items = data?.items ?? [];
items.map(...)
------------------------------------------------------------------------

------------------------------------------------------------------------
ELI5
Your code expected a box of toys (an array), but the toy box was empty.
------------------------------------------------------------------------

Open Agent Skill

  • Skill spec: skills/SKILL.md
  • Skill function: runExplainErrorSkill(input)