A CLI tool to synchronize AI code editor configurations (Cursor, GitHub Copilot, and Windsurf) from a single source of truth.
This tool supports the following AI code editors:
-
Cursor
-
Location:
.cursor/rules/cursor-rules.mdc -
Format: Markdown with YAML frontmatter
-
Example:
--- description: Project Guidelines globs: - "src/**/*.ts" - "src/**/*.tsx" alwaysApply: false --- # Cursor Rules - Follow TypeScript best practices - Use functional programming patterns - Write comprehensive tests
-
-
GitHub Copilot
-
Location:
.github/copilot-instructions.md -
Format: Markdown
-
Example:
# GitHub Copilot Instructions - Use TypeScript for JavaScript development - Follow React best practices - Implement proper error handling
-
-
Windsurf
-
Location:
.windsurfrules -
Format: Markdown
-
Example:
# Windsurf AI Rules - Follow functional programming patterns - Create thorough test coverage - Use project-specific architecture
-
npm install -g editor-config-synceditor-config-sync initThis will create:
- A template
ai-rules.mdfile with example rules - A
.editor-config-sync.jsonconfiguration file
editor-config-sync applyOptions:
-s, --source <path>: Path to the source markdown file (default:ai-rules.md)-e, --editors <editors>: Comma-separated list of editors to generate configs for-g, --gitignore <boolean>: Whether to manage gitignore entries (default: true)-n, --name <name>: Name for Cursor MDC file (default: "default")-d, --description <description>: Description for Cursor MDC file--globs <globs>: Comma-separated list of globs for Cursor MDC file--always-apply <boolean>: Whether to always apply the Cursor rule (default: false)
editor-config-sync list-editorsThe source markdown file (ai-rules.md) should follow this structure:
# AI Code Editor Rules
## General Rules
These rules apply to all AI code editors unless overridden.
- Follow project coding standards
- Use meaningful variable names
- Write comprehensive documentation
- Follow the DRY principle
- Implement proper error handling
## Editor-Specific Rules
### Cursor
- Create self-contained modules
- Add type hints for better code completion
- Optimize for readability over cleverness
### GitHub Copilot
- Use TypeScript for JavaScript development
- Follow React best practices
- Implement comprehensive error handling
### Windsurf
- Use functional programming patterns
- Create thorough test coverage
- Follow project architectureThe .editor-config-sync.json file allows you to customize the default behavior:
{
"sourcePath": "ai-rules.md",
"editors": ["cursor", "github-copilot", "windsurf"],
"gitignoreManagement": true
}Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - see LICENSE file for details