cursor-rules-to-github-copilot
v0.1.0
Published
Convert Cursor .cursor/rules (*.mdc) to GitHub Copilot instruction files for VS Code
Maintainers
Readme
cursor-rules-to-github-copilot
CLI that reads Cursor rules from .cursor/rules (*.mdc / *.md) and generates GitHub Copilot instruction files for VS Code:
| Cursor | Generated |
|--------|-----------|
| alwaysApply: true | .github/copilot-instructions.md (sections per rule) |
| globs: ... | .github/instructions/*.instructions.md with applyTo |
| No globs, not always | .instructions.md without applyTo (attach manually in chat) |
Copilot does not read .cursor/rules directly; run this tool after you change Cursor rules.
Usage
npx cursor-rules-to-github-copilotFrom another directory:
npx cursor-rules-to-github-copilot --cwd /path/to/repoOptions:
--cwd <dir>— workspace root (default: current directory)--rules-dir <rel>— rules folder relative to cwd (default:.cursor/rules)--dry-run— show what would be written--no-banner— omit HTML comment banners in generated files
npm script (optional)
{
"scripts": {
"sync:copilot": "cursor-rules-to-github-copilot"
}
}Generated files under .github/instructions/ are not pruned automatically. If you delete or rename a Cursor rule, remove the old *.instructions.md files yourself (or delete the folder and run the CLI again).
Requirements
- Node.js 18+
License
MIT
