cursor-directory

1.0.5 • Public • Published

Cursor Directory CLI

A command-line tool to download and install Cursor Directory rules directly to your local Cursor editor.

Installation

There are two ways to use this tool:

Option 1: Use with npx (recommended)

Run directly without installing using npx:

npx cursor-directory rules add <slug|url>

Option 2: Install globally

npm install -g cursor-directory

Then run with:

cursor-directory rules add <slug|url>

Usage

# Using npx (without installation)
npx cursor-directory rules add <slug|url>

# Or if globally installed
cursor-directory rules add <slug|url>

Examples

# Using npx with a slug
npx cursor-directory rules add al-buisnesscentral-development-cursor-rules

# Using npx with a URL
npx cursor-directory rules add https://cursor.directory/front-end-cursor-rules

# Or if installed globally
cursor-directory rules add al-buisnesscentral-development-cursor-rules

How It Works

This CLI tool:

  1. Fetches the rule directly from cursor.directory/api/[slug]
  2. If a URL is provided, extracts the slug from it
  3. Saves the rule to .cursor/rules/<slug>.mdc with the proper frontmatter format
  4. Sets up the proper metadata including title, empty globs, and alwaysApply: false

Available Rules

Visit cursor.directory to browse all available rules.

Features

  • Fetches cursor rules directly from the specific API endpoint
  • Supports both direct slugs and full URLs
  • Saves rules in the proper MDC format
  • Creates the necessary directory structure if it doesn't exist
  • Validates the existence of rules before attempting to save

Contributing

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

License

MIT

Package Sidebar

Install

npm i cursor-directory

Weekly Downloads

420

Version

1.0.5

License

MIT

Unpacked Size

5.69 kB

Total Files

3

Last publish

Collaborators

  • ericzakariasson