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

rulink

v0.7.1

Published

CLI tool for managing Cursor AI rules across projects

Downloads

10

Readme

rulink

Stop manually copying Cursor rules between projects. Automatically install and manage Cursor AI rules from GitHub repos, NPM packages, and local folders.

npm version License: MIT

📖 Table of Contents

🌟 Introduction

rulink is a powerful command-line tool that simplifies the management of Cursor AI rules across your projects. Instead of manually copying and pasting cursor rules between different projects, rulink allows you to:

  • Centralize rule management: Store rules in GitHub repositories, NPM packages, or local directories
  • Easy installation: Install rules with a single command across multiple projects
  • Version control: Keep your rules updated and synchronized
  • Project-specific: Manage different rule sets for different types of projects
  • Source flexibility: Support for local paths, GitHub repositories, and NPM packages

Whether you're working on TypeScript projects, React applications, or any other codebase that benefits from Cursor AI rules, rulink streamlines your workflow by automating rule management.

🚀 Quick Start

# Add a rule source (choose one)
npx rulink add /path/to/local/rules              # Local directory
npx rulink add https://github.com/user/repo     # GitHub repository
npx rulink add @your-org/cursor-rules            # NPM package

# List available rules
npx rulink list

# Install all rules to current project
npx rulink install

# Check installation status
npx rulink status

📦 Installation

Using with npx (Recommended)

No installation required! Use directly with npx:

npx rulink <command>

Global Installation

For frequent use, install globally:

npm install -g rulink
# Then use without npx prefix
rulink <command>

🔧 Commands

add - Add a Rule Source

Add a new rule source from various locations.

Usage:

rulink add <path|url|package> [options]

Options:

  • --verbose - Show detailed output during the add process

Examples:

# Add local directory
rulink add ./my-cursor-rules
rulink add /absolute/path/to/rules

# Add GitHub repository
rulink add https://github.com/PatrickJS/awesome-cursorrules
rulink add github:user/repo

# Add NPM package
rulink add @mallardbay/cursor-rules
rulink add my-cursor-rules-package

source - Manage Rule Sources

View and manage configured rule sources.

Usage:

rulink source [sourceName] [options]

Options:

  • -l, --list, --all - List all configured sources
  • --use <sourceName> - Set a source as active
  • --remove <sourceName> - Remove a specific source
  • --remove-all - Remove all sources
  • --rename <newName> - Rename a source
  • --verbose - Show detailed output

Examples:

# Show active source details
rulink source

# Show specific source details
rulink source my-source

# List all sources
rulink source --list

# Set active source
rulink source --use my-github-source

# Remove a source
rulink source --remove old-source

# Rename a source
rulink source --rename old-name new-name

# Remove all sources
rulink source --remove-all

list - List Available Rules

Display all available rules from the active or specified source.

Usage:

rulink list [options]

Options:

  • --source <name> - List rules from a specific source instead of active source

Examples:

# List rules from active source
rulink list

# List rules from specific source
rulink list --source my-typescript-rules

Sample Output:

Available Rules from typescript-rules:

typescript/
  - style.mdc
    Coding style guidelines for TypeScript
  - types.mdc
    TypeScript type definitions and patterns

react/
  - components.mdc
    React component patterns and best practices

general.mdc
  Basic development principles

install - Install Cursor Rules

Install cursor rules to your project's .cursor/rules directory.

Usage:

rulink install [...rulePaths] [options]

Options:

  • --to <path> - Specify target directory (default: auto-detect project root)
  • --source <name> - Use specific source instead of active source
  • --dry-run - Preview what would be installed without making changes
  • --verbose - Show detailed installation process

Examples:

# Install all available rules
rulink install

# Install specific rule files
rulink install style.mdc
rulink install typescript/style.mdc react/components.mdc

# Install all rules from a category
rulink install typescript

# Install to specific directory
rulink install --to /path/to/project

# Preview installation (dry run)
rulink install --dry-run

# Install from specific source
rulink install --source my-backup-rules

Rule Path Formats:

  • filename.mdc - Root level rule file
  • category/filename.mdc - Rule file in specific category
  • category - All rules in a category
  • Multiple paths supported: rulink install general typescript/style.mdc

status - Show Project Status

Display the status of installed rules in the current project.

Usage:

rulink status

Examples:

rulink status

Sample Output:

Cursor Rules Status for: /Users/dev/my-project (project rules)

Installed rules:
  ✓ style
  ✓ types
  ✓ components

Available but not installed:
  - testing
  - performance

update - Update Installed Rules

Update all installed rules to their latest versions from the source.

Usage:

rulink update

Examples:

# Update all installed rules
rulink update

Interactive Process: When multiple rules with the same filename exist in different categories, rulink will prompt you to choose which one to use:

Multiple rules found for style.mdc:
  1. typescript/style.mdc - TypeScript coding standards
  2. general/style.mdc - General style guidelines
  3. Skip this rule

Please select which rule to update (number): 1

remove - Remove Cursor Rules

Remove specific cursor rule files from your project.

Usage:

rulink remove [...ruleFiles]

Examples:

# Remove specific rule files
rulink remove style.mdc
rulink remove typescript/style.mdc components.mdc

# Remove multiple rules
rulink remove style types components

💡 Usage Examples

Setting Up a New Project

# Add your organization's rule source
npx rulink add @myorg/cursor-rules

# Install all rules for the project
npx rulink install

# Check what was installed
npx rulink status

Working with Multiple Sources

# Add multiple sources
npx rulink add @myorg/typescript-rules
npx rulink add @myorg/react-rules
npx rulink add ./local-custom-rules

# List all sources
npx rulink source --list

# Switch between sources
npx rulink source --use typescript-rules
npx rulink install typescript

npx rulink source --use react-rules  
npx rulink install react

Selective Rule Installation

# Install only specific rules
npx rulink install typescript/style.mdc general/principles.mdc

# Install all rules from a category
npx rulink install typescript

# Preview before installing
npx rulink install --dry-run

Keeping Rules Updated

# Update all installed rules
npx rulink update

# Check status after update
npx rulink status

📚 Source Types

Local Directory

Point to a local directory containing .mdc files:

rulink add ./my-rules
rulink add /absolute/path/to/rules

Directory Structure:

my-rules/
├── general.mdc
├── typescript/
│   ├── style.mdc
│   └── types.mdc
└── react/
    └── components.mdc

GitHub Repository

Add rules from GitHub repositories:

rulink add https://github.com/user/repo
rulink add https://github.com/user/repo/tree/main/rules
rulink add github:user/repo

NPM Package

Use published NPM packages:

rulink add @myorg/cursor-rules
rulink add cursor-rules-package

Package Structure: Your NPM package should contain .mdc files in the root or organized in subdirectories.

🤝 Contributing

We welcome contributions! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.

Development Setup

# Clone the repository
git clone https://github.com/necolo/cursor-rules.git

# Install dependencies
cd cursor-rules
pnpm install

# Run tests
pnpm test:run

# Build the project
pnpm build

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


⬆ Back to Top

Made with ❤️ by the Necolo Lv.C

GitHubNPMIssues