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

agentfix

v1.0.0

Published

Auto-fix errors in your dev server as they happen using AI

Readme

agentfix

Auto-fix errors in your dev server as they happen using AI (Cursor or Claude). Never stop to debug — the AI fixes bugs while you keep building.

Installation

npm install -g agentfix

Setup

You can use either Cursor or Claude as your AI provider.

Option 1: Cursor (Default)

Get a Cursor API key from the Cursor Dashboard, then:

export CURSOR_API_KEY="your_key"

Option 2: Claude

Get an Anthropic API key from the Anthropic Console, then:

export ANTHROPIC_API_KEY="your_key"

Usage

Wrap any dev command with agentfix:

agentfix npm run dev
agentfix npx next dev
agentfix "node --watch server.js"

Tip: Use node --watch (Node 18+) for automatic server restart when files change. Frameworks like Next.js and Vite have hot reload built-in.

How It Works

┌──────────────────────────────────────────────────────────────┐
│  Terminal                                                     │
│                                                              │
│  $ agentfix npm run dev                                       │
│                                                              │
│  🔧 AgentFix                                                  │
│  Starting: npm run dev                                       │
│  Using provider: Cursor                                      │
│  Monitoring for errors...                                    │
│                                                              │
│  Demo server running at http://localhost:3000                │
│                                                              │
│  TypeError: Cannot read properties of undefined              │
│    (reading 'toUpperCase')                                   │
│    at server.js:35:43                                       │
│                                                              │
│  [agentfix] 🔍 Error detected!                                │
│    Type: TypeError                                           │
│    Message: Cannot read properties of undefined             │
│      (reading 'toUpperCase')                                 │
│    File: server.js:35                                        │
│                                                              │
│  [agentfix] 🔧 Fixing...                                       │
│  I'll help you fix this TypeError. Let me first examine     │
│  the server.js file to understand the context around         │
│  line 35.                                                    │
│                                                              │
│  [agentfix] 🔧 read: Reading server.js                        │
│                                                              │
│  I can see the issue clearly. On line 35, there's a typo:    │
│  `u.nmee` should be `u.name`. The property `nmee` doesn't  │
│  exist on the user objects, so it returns `undefined`, and   │
│  calling `toUpperCase()` on `undefined` causes the          │
│  TypeError.                                                 │
│                                                              │
│  [agentfix] 🔧 edit: Editing server.js                       │
│  [agentfix] ✅ Modified: server.js                            │
│                                                              │
│  Restarting 'server.js'                                      │
│  Demo server running at http://localhost:3000                │
│                                                              │
│  The error has been fixed. The issue was a simple typo on   │
│  line 35 where `u.nmee` should have been `u.name`.          │
│                                                              │
│  [agentfix] ✅ Fixed server.js                                 │
│    Hot reload should kick in shortly...                      │
│                                                              │
│└──────────────────────────────────────────────────────────────┘
  1. Wraps your dev server as a child process
  2. Monitors stdout/stderr for error patterns
  3. Detects errors and extracts file/line info from stack traces
  4. Analyzes the code and explains the root cause
  5. Fixes the code using AI agent (Cursor or Claude)
  6. Hot reload picks up the changes automatically

Options

agentfix --help          # Show help
agentfix --dry-run ...   # Detect errors without fixing

Requirements

  • Node.js 18+
  • CURSOR_API_KEY or ANTHROPIC_API_KEY environment variable

Example

# Start a Next.js app with agentfix
agentfix npm run dev

# Navigate to a buggy page
# Watch the error appear and get fixed automatically!

Changelog

See CHANGELOG.md for release history.

License

MIT