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

init-cursor-rules

v1.0.1

Published

CLI tool to inject Cursor rules into projects

Downloads

5

Readme

init-cursor-rules

A CLI tool to inject Cursor rules into your projects.

Overview

init-cursor-rules is a command-line utility that allows you to easily import Cursor rules from GitHub repositories into your own projects. It fetches available rules from a specified GitHub repository and lets you select which ones you want to include in your project.

Features

  • Fetch Cursor rules from any GitHub repository
  • Interactive searchable multi-select interface with real-time filtering
  • Powerful fuzzy search to find rules by name or description
  • Type directly in the selection interface to filter options instantly
  • Select multiple rules with a streamlined interface
  • Supports both MDC format (recommended) and JSON format rules
  • Automatically creates the necessary directories in your project
  • Simple to use with npx or as a global installation

Installation

Using npx (recommended)

Run directly without installation using npx:

npx f3rland/init-cursor-rules <github-project-slug>

Global Installation

Alternatively, you can install the tool globally:

npm install -g f3rland/init-cursor-rules

Then use it anywhere:

init-cursor-rules <github-project-slug>

Usage

Basic Usage

init-cursor-rules <github-project-slug>

Where <github-project-slug> is in the format username/repository.

Examples

# Using npx
npx f3rland/init-cursor-rules Mawla/cursor_rules

# If installed globally
init-cursor-rules f3rland/init-cursor-rules

# Using a local path
init-cursor-rules -l /path/to/rules

Workflow

  1. Run the command with a GitHub repository that contains Cursor rules
  2. The tool will fetch all available rules from the repository
  3. Use the interactive searchable multi-select interface:
    • Type directly in the selection box to filter rules in real-time
    • Fuzzy search will find matches even with partial or inexact terms
    • Use arrow keys to navigate through the filtered list
    • Press space to select/deselect rules
    • Press enter when finished with your selection
  4. The selected rules will be downloaded to your project's .cursor/rules directory

Sample Rules

This repository includes sample Cursor rules that you can import:

  1. example.mdc - A basic rule that highlights console.log statements
  2. eslint-config.mdc - A rule that applies ESLint recommendations

You can test the tool by using this repository as the source:

npx f3rland/init-cursor-rules f3rland/init-cursor-rules

Cursor Rules Format

According to the Cursor documentation, rules should be stored in MDC format (.mdc files). These files use a markdown-like format with metadata:

---
description: Rule description
globs: "**/*.js,**/*.ts"
alwaysApply: false
---

Your rule content here in markdown format.

Rule types include:

  • Always - Always included in the model context
  • Auto Attached - Included when files matching a glob pattern are referenced
  • Agent Requested - Available to the AI, which decides whether to include it
  • Manual - Only included when explicitly mentioned

Requirements

  • Node.js 16.0.0 or higher
  • The target GitHub repository must have Cursor rules in the .cursor/rules directory

Development

This project uses a devcontainer for consistent development environments. To develop:

  1. Clone the repository
  2. Open with VS Code with the Remote - Containers extension
  3. VS Code will prompt to reopen in container - accept this
  4. Once inside the container, you're ready to develop

Building and Testing

# Install dependencies
npm install

# Run locally
node index.js <github-project-slug>

# Or link it to run as a CLI command
npm link
init-cursor-rules <github-project-slug>

License

MIT

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

Acknowledgements

  • The Cursor team for creating an amazing editor
  • The community for sharing their Cursor rules