Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Peck Laravel Package

peckphp/peck

Peck is a fast PHP CLI spell-checker for your codebase. It flags wording and spelling mistakes in filenames, classes, methods, properties, and docs, powered by GNU Aspell. Installs via Composer and fits neatly into CI and dev workflows.

View on GitHub
Deep Wiki
Context7

Peck is a powerful CLI tool designed to identify pure wording or spelling (grammar) mistakes in your codebase.

Frequently asked questions about Peck
Can Peck be used in Laravel projects to enforce consistent naming conventions?
Yes, Peck is ideal for Laravel projects. It checks filenames, class/method names, and docblocks—critical areas where typos or inconsistencies can harm readability. Use the built-in `laravel` preset to ignore framework-specific terms like `Illuminate` or `Eloquent` while catching developer-specific errors.
How do I install Peck in a Laravel project?
Run `composer require peckphp/peck --dev` to install Peck as a dev dependency. Then initialize it with `./vendor/bin/peck --init`. Ensure GNU Aspell is installed system-wide (e.g., `sudo apt-get install aspell aspell-en` on Ubuntu or `brew install aspell` on macOS).
Will Peck slow down my Laravel application in production?
No, Peck is a CLI tool and has zero runtime impact on your Laravel app. It’s designed for development and CI workflows, not production. Install it as a dev dependency to avoid bloating your production environment.
Does Peck support custom dictionaries for domain-specific terms?
Yes, Peck allows custom dictionaries via `peck.json` configuration. Add domain-specific terms (e.g., `UserModel` instead of `user_model`) to avoid false positives. The `laravel` preset already handles framework terms, but you can extend it further for your project’s needs.
How can I integrate Peck into GitHub Actions for Laravel?
Add a step to your CI workflow to install Aspell (e.g., `sudo apt-get install aspell aspell-en`) followed by `composer test:typos` or `./vendor/bin/peck run`. Fail the build if Peck finds issues, ensuring spelling consistency before merging. Example: Use a custom script to run Peck after tests.
What Laravel versions does Peck support?
Peck is a standalone tool and doesn’t depend on Laravel versions. It works with any Laravel project (5.8+) as long as PHP 8.2+ is installed. Test it locally before enforcing it in CI, as it’s still under active development.
How do I ignore false positives like `Illuminate` or `eloquent` in Peck?
Use the `laravel` preset (`peck --preset laravel`) to ignore framework terms. For additional terms, edit `peck.json` and add them to the `ignore` array. Start with the preset, then refine the config based on your team’s feedback to minimize manual overrides.
Can Peck replace PHPStan or Pest for code quality?
No, Peck focuses on spelling/grammar (e.g., typos in `UserController` vs. `UserContoller`), while PHPStan and Pest handle static analysis and unit tests. Use Peck as a complementary tool—run it alongside PHPStan in CI for a full developer experience (DX) check.
What are the alternatives to Peck for Laravel spell-checking?
Alternatives include `php-cs-fixer` (for coding standards) or `roave/security-advisories` (for security), but neither handles spelling. For pure spell-checking, consider `cspell` (JavaScript/TypeScript) or `aspell` directly, though Peck is the most Laravel-integrated option with presets and CLI ease.
How do I handle Windows compatibility for Peck in CI?
Peck requires GNU Aspell, which isn’t natively available on Windows. Use WSL (Windows Subsystem for Linux) or install Aspell via Scoop (`scoop install main/aspell`). For CI, document the setup in your workflow or use Docker images with Aspell pre-installed to avoid flaky builds.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
codraw/framework-extra-bundle
codraw/messenger
codraw/security
codraw/mailer
codraw/contracts
codraw/profiling
codraw/dependency-injection
codraw/tester
codraw/core
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony