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

get-rules

v1.12.1

Published

Downloads .mdc rule files for Cursor from johnlindquist/rules-for-tools repository.

Readme

get-rules

An npm utility to quickly download and install the latest .mdc rule files for AI-assisted coding tools (like Cursor) from John Lindquist's get-rules repository.

Installation

Install the tool globally using npm:

npm install -g get-rules

Or, if you prefer to use it on a per-project basis without global installation, you can use npx:

npx get-rules

Usage

Navigate to the root directory of your project where you want to install/update the rules, and then run:

get-rules

This will:

  1. Connect to the GitHub API to fetch the list of files in the johnlindquist/get-rules repository.
  2. Identify all .mdc (Markdown Custom) rule files across the organized directory structure.
  3. Create a .cursor/rules directory hierarchy in your current working directory (if it doesn't exist).
  4. Download each .mdc file into its proper location within .cursor/rules, skipping any that already exist locally. This ensures you always get the latest versions of new rules without overwriting local modifications.

Rules Structure

The rules are organized into categories for better maintainability:

.cursor/rules/
├── _/                      # Personal rules (gitignored)
├── _always/                # Always-applied global rules
│   ├── persona.mdc         # Core operating directives
│   ├── communication-style.mdc
│   ├── guiding-principles.mdc
│   └── ...
├── _globs/                 # Rules organized by file patterns
│   └── react/              # React-specific rules
├── cli/                    # Command-line tool usage
├── docs/                   # Documentation generation
├── git/                    # Git workflows
├── task/                   # Task planning and execution
└── ...                     # Other categories

Key Directories

  • _/ - Reserved for personal rules (not tracked by Git)
  • _always/ - Global rules that apply to all operations
  • _globs/ - Rules organized by file patterns they apply to
  • cli/ - Command-line tool configurations
  • docs/ - Documentation generation and maintenance
  • git/ - Git workflows and version control
  • task/ - Task planning and execution patterns

Customization

See PERSONALIZATION.md in your .cursor/rules directory for information on:

  • Creating personal rules in the _/ directory
  • Locally overriding team rules without affecting others
  • Customizing AI behavior for your workflow

How it Works

This tool is a self-contained Node.js script. It directly interacts with the GitHub API to list repository contents and then downloads the necessary .mdc files while preserving the directory structure. It does not rely on external shell scripts like curl, bash, or powershell.

Contributing

Issues and pull requests are welcome! Please feel free to contribute to the get-rules repository.

For the rules themselves, please contribute to the get-rules repository.

License

MIT License - Copyright (c) John Lindquist