{"_id":"@bastienyoussfi/cbook","name":"@bastienyoussfi/cbook","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@bastienyoussfi/cbook","version":"1.0.0","description":"Predefined Cursor rules for AI-assisted coding","main":"dist/src/index.js","bin":{"cbook":"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":{"@bastienyoussfi/cursor-playbook":"^1.0.0","commander":"^13.1.0","fs-extra":"^11.3.0"},"_id":"@bastienyoussfi/cbook@1.0.0","gitHead":"132822c85cc92e20c84e868750f9980cd32bf069","_nodeVersion":"20.18.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-5OczxFOgVMj2IwVEi1PkFjNDAtrm5JY0eoNv7EHwos70AKmpSIj1GwaBTeA2sTK8+u548RkW/pAYDu5KeLtmIw==","shasum":"10e2d0514b503d938b87c4211aa447ff7c5bc142","tarball":"https://registry.npmjs.org/@bastienyoussfi/cbook/-/cbook-1.0.0.tgz","fileCount":13,"unpackedSize":42379,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDDleZO1qXe85ZkvByF4GyEib8RePtxOdF64F0GukjFbwIgNh82xhHIu8jm2W+tJBurmnQqFWhHi4r/+v80mg59qmU="}]},"_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/cbook_1.0.0_1743758802838_0.6722131081535496"},"_hasShrinkwrap":false}},"time":{"created":"2025-04-04T09:26:42.755Z","1.0.0":"2025-04-04T09:26:43.029Z","modified":"2025-04-04T09:26:43.295Z"},"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-d43ad941161d691a394e3d439808a99b"}