{"_id":"@bastienyoussfi/crules","name":"@bastienyoussfi/crules","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bastienyoussfi/crules","version":"1.0.0","description":"Predefined Cursor rules for AI-assisted coding","main":"dist/src/index.js","bin":{"crules":"dist/bin/cli.js"},"scripts":{"build":"tsc","postbuild":"cp -r src/*.mdc dist/src/","prepublishOnly":"npm run build"},"keywords":["cursor","ai","typescript","rules"],"author":{"name":"Bastien Youssfi"},"license":"MIT","devDependencies":{"@types/fs-extra":"^11.0.4","@types/node":"^22.13.17","typescript":"^5.8.2"},"dependencies":{"commander":"^13.1.0","fs-extra":"^11.3.0"},"_id":"@bastienyoussfi/crules@1.0.0","gitHead":"132822c85cc92e20c84e868750f9980cd32bf069","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-2/On2n1SNOagO6kf4xWrLbxGhoEhcwM+JlhdGjn2Y+a/cqMH/kBE7hlYbVkTJvcAxog+S7/9tgt33W4OE80O2w==","shasum":"b513d00015d346d977dec1927b69779d67027afb","tarball":"https://registry.npmjs.org/@bastienyoussfi/crules/-/crules-1.0.0.tgz","fileCount":13,"unpackedSize":42332,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDvb5sB4q/B8g1k0ygyKFevr/TUe+4kZyYXAAq2SkCsdQIhAMMyXihE0EnM5il7o556oBl7Q3ZPvxyNhv2mNLoAu9cm"}]},"_npmUser":{"name":"bastienyoussfi","email":"bastien.youssfi@gmail.com"},"directories":{},"maintainers":[{"name":"bastienyoussfi","email":"bastien.youssfi@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/crules_1.0.0_1743758894635_0.16746220801387568"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-04T09:28:14.559Z","1.0.0":"2025-04-04T09:28:14.794Z","modified":"2025-04-04T09:28:15.066Z"},"maintainers":[{"name":"bastienyoussfi","email":"bastien.youssfi@gmail.com"}],"description":"Predefined Cursor rules for AI-assisted coding","keywords":["cursor","ai","typescript","rules"],"author":{"name":"Bastien Youssfi"},"license":"MIT","readme":"# Cursor Playbook\n\nA package for managing reusable [Cursor](https://cursor.sh/) rules across projects. Cursor Playbook allows you to define, share, and reuse AI coding guidelines in different projects.\n\n## Installation\n\n```bash\nnpm install -g @bastienyoussfi/cursor-playbook\n```\n\n## Features\n\n- Add predefined rules to your project\n- Create rule groups for easy application\n- Export/import rules between projects\n- Save and apply rule profiles\n- Store user-specific rule configurations\n- Tab completion for all commands and arguments\n- JSON export/import for community sharing\n\n## Usage\n\n### Tab Completion\n\nEnable tab completion in your shell to easily navigate commands, rules, and profiles:\n\n```bash\n# Add this to your ~/.bashrc or ~/.zshrc\nsource <(cursor-playbook completion)\n```\n\nAfter sourcing the completion script, you can use tab completion for commands and arguments:\n\n```bash\ncursor-playbook add <TAB>       # Shows available rules\ncursor-playbook add-group <TAB> # Shows available rule groups\ncursor-playbook apply-profile <TAB> # Shows available profiles\n```\n\n### Basic Commands\n\nAdd a rule to your project:\n\n```bash\ncursor-playbook add typescript\n```\n\nList available rules:\n\n```bash\ncursor-playbook list\n```\n\nCreate a new rule template:\n\n```bash\ncursor-playbook create my-rule\n```\n\n### Rule Groups\n\nAdd a group of related rules at once:\n\n```bash\ncursor-playbook add-group typescript\n```\n\n### User Registry\n\nCreate a rule in your user registry (accessible across all projects):\n\n```bash\ncursor-playbook create my-custom-rule --global\n```\n\nExport a project rule to your user registry:\n\n```bash\ncursor-playbook export my-rule\n```\n\nImport a rule from your user registry to your current project:\n\n```bash\ncursor-playbook import my-custom-rule\n```\n\n### Profiles\n\nSave all your current project rules as a profile:\n\n```bash\ncursor-playbook save-profile my-typescript-project\n```\n\nApply a saved profile to a new project:\n\n```bash\ncursor-playbook apply-profile my-typescript-project\n```\n\nList all saved profiles:\n\n```bash\ncursor-playbook list-profiles\n```\n\n### Community Sharing\n\nExport your rules to a JSON file for sharing with the community:\n\n```bash\ncursor-playbook export-json my-awesome-rules.json\n```\n\nImport rules from a shared JSON file:\n\n```bash\ncursor-playbook import-json my-awesome-rules.json\n```\n\nUse the `--overwrite` flag to replace existing rules when importing:\n\n```bash\ncursor-playbook import-json my-awesome-rules.json --overwrite\n```\n\nThe exported JSON file includes metadata (project name, description, export date) and all rule contents, making it easy to share on GitHub, in blog posts, or other community platforms.\n\n### Repository Structure\n\nTo contribute rules to the community, you can structure your repository like this:\n\n```\nmy-cursor-rules/\n├── README.md                 # Description and usage instructions\n├── rules/                    # Directory containing individual rule files\n│   ├── typescript.mdc        # Individual rule file\n│   └── react.mdc             # Individual rule file\n└── packages/                 # Pre-configured rule packages for easy import \n    ├── typescript-basic.json # Package with basic TypeScript rules\n    └── react-best-practices.json # Package with React best practices\n```\n\n## Adding Your Own Rule Groups\n\nTo define custom rule groups, modify the `getRuleGroups` function in the `src/index.ts` file.\n\n## License\n\nMIT ","readmeFilename":"README.md","_rev":"1-b1c1a2c0cf1120f4f15d4de203a08def"}