Download the PHP package pekral/cursor-rules without Composer
On this page you can find all versions of the php package pekral/cursor-rules. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download pekral/cursor-rules
More information about pekral/cursor-rules
Files in pekral/cursor-rules
Package cursor-rules
Short Description Cursor editor rules for PHP/Laravel projects
License MIT
Informations about the package cursor-rules
Cursor Rules
This repository contains custom rules for the Cursor editor.
The goal is to provide consistent, automated, and high-quality coding standards across PHP, Laravel, and testing workflows.
🚀 Installation
Quick Install
Install cursor rules using the provided binary script:
Installation Options
The installer will automatically:
- Create
.cursor/rules/
directory in your project root - Copy or symlink all rule files
- Handle both development and production installations
- Preserve existing rules (unless
--force
is used)
📂 Repository Structure
Each rule file (.mdc
) includes instructions that Cursor automatically attaches when writing, editing, or generating code.
📖 Rules Overview
Rule File | Description | Scope / Type |
---|---|---|
testing.mdc | Guidelines for writing and maintaining Pest tests. Analyze classes before writing tests, keep tests simple and readable, and follow existing patterns. | Always Apply |
spatie.mdc | Laravel & PHP coding standards derived from Spatie's guidelines. Follow Laravel conventions first, then PSR standards. | Always apply |
git.mdc | Enforce Conventional Commits. All commit messages must follow the specification with short, consistent messages. | Always Apply |
code-aquality.mdc | Code Quality guidelines: target the actual PHP version, verify information, avoid assumptions, no apologies, avoid commented-out code, and prefer file-by-file changes. | Always Apply |
clean-code.mdc | Clean Code rules: typed properties, constructor promotion, short nullable notation, explicit void return types, and consistent class structure. |
Always Apply |
🎯 How to Use
- Install rules using
vendor/bin/cursor-rules install
- Cursor automatically applies rules marked with
alwaysApply: true
. - To invoke manual rules, call them in the Cursor chat using
@rule-name
. - When editing code, these rules act as guardrails to enforce standards, improve readability, and ensure test coverage.
✨ Benefits
- Consistent Laravel & PHP coding style across projects.
- High-quality, maintainable code with Clean Code principles.
- Automated enforcement of Conventional Commits.
- Smarter, Pest-based test generation.
- Better readability and reduced cognitive complexity.
📝 License
MIT – free to use, modify, and distribute.
📌 This setup ensures that every piece of generated code, commit, and test in Cursor follows best practices while remaining clean, maintainable, and production-ready.
See .github/README.md
for detailed workflow documentation.