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

error-trace-debugger

v0.1.4

Published

CLI agent that analyzes logs, investigates a repo, suggests fixes, and outputs a patch.

Readme

error-trace-debugger

CLI agent that ingests logs/stack traces, investigates a codebase, and outputs a report with a suggested fix and (when possible) a unified patch.

Keywords

cli, logs, stack-trace, error-analysis, debugging, nodejs, javascript, jest, typescript, patch, diff, git, testing, langchain, langgraph, openai, llm, developer-tools, static-analysis, code-search

Install

npm install -g error-trace-debugger

Or run without installing:

npx error-trace-debugger analyze --help

Usage

Analyze a logs file

error-trace-debugger analyze --logs ./error.log

Analyze an inline stack trace

error-trace-debugger analyze --stack "TypeError: boom\n    at run (/repo/src/index.js:10:5)"

Pipe logs over stdin

cat ./error.log | error-trace-debugger analyze --stdin

Target a specific repo

error-trace-debugger analyze --logs ./error.log --repo ../my-repo

Scope (single repo)

error-trace-debugger analyzes one repo/workspace at a time. By default it uses the current working directory; you can override with --repo <path>.

Output formats

error-trace-debugger analyze --logs ./error.log --format md
error-trace-debugger analyze --logs ./error.log --format text
error-trace-debugger analyze --logs ./error.log --format json

If you keep the default --format md and do not pass --out, the CLI writes the full Markdown report to error-trace-debugger-report.md in the target repo root, and the terminal shows only a short “check out the file” message.

Write report + patch to files

error-trace-debugger analyze --logs ./error.log --out ./report.md --patch-out ./fix.diff
git apply ./fix.diff

Run tests (optional)

error-trace-debugger analyze --logs ./error.log --run-tests
error-trace-debugger analyze --logs ./error.log --run-tests --test-command "npm test"

Engine: v1 (default) vs v2 (LangGraph)

  • v1 (default): heuristic loop (parse → search → diff → optional tests). No LLM.
  • v2: LangGraph state machine with LLM-backed patch proposal.

For v2, run these in order:

  1. Set your OpenAI API key in the shell:
export OPENAI_API_KEY="your_openai_api_key"
  1. Run the v2 command:
error-trace-debugger analyze --engine v2 --logs ./error.log --repo .

Optional v2 flags: --provider openai, --model <name>, --api-key-env <ENV_VAR>, --max-tool-calls, --max-files-read, --max-bytes-read.

What it does (v1)

  • Log analyzer: parses common Node/Jest stack traces into structured frames.
  • Code search: uses ripgrep if available (otherwise scans within safe budgets).
  • Diff generator: emits a unified patch when it has concrete edits to apply. If no edits are produced, the Patch section may be empty.
  • Test runner: runs tests (optional) and summarizes failing output.

The orchestrator iteratively: logs → hypothesis → code search → patch proposal → (optional) tests.

Notes

  • v1 focuses on investigation + reporting. Patch generation is supported when concrete edits are produced.
  • PR creation is intentionally out of scope for v1.