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 🙏

© 2025 – Pkg Stats / Ryan Hefner

cursor-autofix

v1.1.3

Published

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

Readme

cursor-autofix

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

Installation

npm install -g cursor-autofix

Setup

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

export CURSOR_API_KEY="your_key"

Usage

Wrap any dev command with autofix:

autofix npm run dev
autofix npx next dev
autofix "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                                                     │
│                                                              │
│  $ autofix npm run dev                                       │
│                                                              │
│  🔧 AutoFix                                                   │
│  Starting: npm run dev                                       │
│  Monitoring for errors...                                    │
│                                                              │
│  Demo server running at http://localhost:3000                │
│                                                              │
│  TypeError: Cannot read properties of undefined              │
│    (reading 'toUpperCase')                                   │
│    at server.js:35:43                                       │
│                                                              │
│  [autofix] 🔍 Error detected!                               │
│    Type: TypeError                                           │
│    Message: Cannot read properties of undefined             │
│      (reading 'toUpperCase')                                 │
│    File: server.js:35                                        │
│                                                              │
│  [autofix] 🔧 Fixing...                                      │
│  I'll help you fix this TypeError. Let me first examine     │
│  the server.js file to understand the context around         │
│  line 35.                                                    │
│                                                              │
│  [autofix] 🔧 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.                                                 │
│                                                              │
│  [autofix] 🔧 edit: Editing server.js                      │
│  [autofix] ✅ 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`.          │
│                                                              │
│  [autofix] ✅ 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 Cursor AI agent
  6. Hot reload picks up the changes automatically

Options

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

Requirements

  • Node.js 18+
  • CURSOR_API_KEY environment variable
  • Access to @cursor-ai/january SDK (currently in alpha)

Example

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

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

License

MIT