workspace-cursorrules-symlink
v1.0.1
Published
A tool to symlink Cursor rules from multiple projects in a workspace to the root directory
Maintainers
Readme
Workspace Cursorrules Symlink
A simple tool to symlink Cursor rules from multiple projects in a workspace to the root directory.
Background
Cursor is an AI-powered code editor that enhances its AI capabilities through rule files located in the .cursor/rules directory. However, when multiple projects are placed in the same workspace, Cursor can only read rule files from the workspace root directory, not from individual projects.
This tool creates symbolic links from each project's rules to the workspace root, allowing Cursor to find and use all rules from all projects in the workspace.
Features
- Automatically scans all projects in the workspace folder
- Identifies
.cursor/rulesdirectories in each project - Creates organized symbolic links categorized by project name in the root directory
- Auto-configures VSCode settings for multi-project workspaces
- Provides detailed synchronization reports
Installation
Global Installation
npm install -g workspace-cursorrules-symlink
# Run in your workspace root directory:
workspace-cursorrules-symlinkUse Without Installation
npx workspace-cursorrules-symlinkCommand Line Options
workspace-cursorrules-symlink - Symlink Cursor rules from multiple projects in a workspace
Usage:
npx workspace-cursorrules-symlink [options]
Options:
-h, --help Show help information
-v, --version Show version information
-a, --ascii Use ASCII characters instead of emoji (Windows compatible)
-f, --force Force recreate existing symlinks
Examples:
npx workspace-cursorrules-symlink
npx workspace-cursorrules-symlink --asciiWhat It Does
1. Cursor Rules Symlinks
The tool creates a structure like this in the workspace root:
.cursor/rules/
├── project-A/
│ └── rule1.mdc (symlink)
├── project-B/
│ ├── rule2.mdc (symlink)
│ └── subfolder/
│ └── rule3.mdc (symlink)
└── project-C/
└── rule4.mdc (symlink)2. VSCode ESLint Configuration
Automatically creates or updates .vscode/settings.json with:
{
"eslint.workingDirectories": [{ "mode": "auto" }]
}This resolves ESLint errors in multi-project workspaces by automatically detecting the correct working directories for each project.
