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

persistence-cli

v1.0.1

Published

Stop AI hallucinations. One scan gives your AI tools ground truth about your project.

Downloads

73

Readme

Persistence

Stop AI from hallucinating about your codebase.

Persistence scans your project and generates a ground truth document that AI coding tools actually read. No more wrong imports, phantom functions, or made-up API routes.

Quick Start

npx persistence-cli scan

That's it. Your AI tools now know the truth about your project.

What It Does

Persistence scans your project and extracts:

| What | Where | |------|-------| | Tech Stack | package.json — frameworks, ORMs, key libraries | | Database Schema | Prisma schemas, Drizzle definitions, or SQL migrations | | Environment Variables | .env.example / .env — variable names only, never values | | TypeScript Config | tsconfig.json — path aliases, strict mode, target | | Project Structure | src/ or app/ directory tree, 3 levels deep | | Scripts | package.json scripts — dev, build, test, deploy |

What It Generates

| File | Purpose | |------|---------| | PERSISTENCE.md | Standalone ground truth document | | .cursorrules | Injected into Cursor AI rules | | CLAUDE.md | Injected into Claude Code context | | .github/copilot-instructions.md | Injected into GitHub Copilot instructions | | .windsurfrules | Injected into Windsurf AI rules |

Existing content in these files is preserved — Persistence prepends the ground truth above your existing rules with a clear separator.

Supported AI Tools

  • Cursor.cursorrules
  • Claude CodeCLAUDE.md
  • GitHub Copilot.github/copilot-instructions.md
  • Windsurf.windsurfrules
  • Aider — Use PERSISTENCE.md directly with /read PERSISTENCE.md

CLI Reference

persistence scan

Scan the project and inject ground truth into AI config files.

persistence scan                              # Default: cursor + claude
persistence scan --targets cursor,claude,copilot,windsurf  # All targets
persistence scan --dry-run                    # Preview without writing
persistence scan --verbose                    # Show detailed parser output

| Flag | Description | |------|-------------| | --targets <list> | Comma-separated targets: cursor, claude, copilot, windsurf. Default: cursor,claude | | --dry-run | Print output without writing any files | | --verbose | Show what each parser found or skipped |

persistence init

First-time setup: runs scan and configures .gitignore.

persistence init
persistence init --targets cursor,claude,copilot,windsurf

Before & After

Without Persistence

You: "Add a new API route for orders"

AI: import { db } from '@/lib/database'        ← wrong path
    import { OrderModel } from '@/models'       ← doesn't exist
    export default function handler(req, res) {  ← wrong pattern (you use App Router)

With Persistence

You: "Add a new API route for orders"

AI: import { db } from '@/db/client'            ← correct path
    import { Order } from '@prisma/client'       ← real type from your schema
    export async function GET(request: Request) { ← correct App Router pattern

The AI reads your PERSISTENCE.md and knows:

  • Your actual path aliases (@/db/*./src/db/*)
  • Your real database schema (Order table with its actual columns)
  • Your project structure (App Router in src/app/)

How It Works

  1. Scan — Reads your config files and source structure
  2. Generate — Produces a compact markdown summary
  3. Inject — Prepends into AI tool config files
  4. Preserve — Your existing rules stay intact below a separator

Re-run persistence scan whenever your project changes significantly (new tables, new dependencies, restructured folders).

Contributing

Contributions welcome! Areas that could use help:

  • New parsers — Django, Rails, Go modules, Rust Cargo
  • New targets — Additional AI tools
  • Smarter detection — Better framework/library identification
  • Testing — Unit tests for parsers
git clone https://github.com/nitishsm/persistence-cli.git
cd persistence-cli
npm install
npm run build
npm link  # Test locally with `persistence scan`

License

MIT