Weave 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

Duster Laravel Package

tightenco/duster

Duster automatically applies Tighten's default Laravel code style by combining TLint, PHP_CodeSniffer, PHP CS Fixer, and Pint. Lint or fix everything at once, target only uncommitted files with --dirty, and customize includes/excludes via duster.json.

View on GitHub
Deep Wiki
Context7

Automatic configuration for Laravel apps to apply Tighten's standard linting & code standards.

Frequently asked questions about Duster
How do I install Duster in a Laravel project?
Install it as a dev dependency with composer require tightenco/duster --dev. Then run ./vendor/bin/duster lint to check your code or ./vendor/bin/duster fix to apply fixes. You can optionally publish a GitHub Actions workflow with ./vendor/bin/duster github-actions or Husky hooks with ./vendor/bin/duster husky-hooks.
What tools does Duster run under the hood?
Duster orchestrates four tools: TLint using the Tighten preset, PHP_CodeSniffer using the Tighten preset, PHP CS Fixer with Tighten's CustomOrderedClassElementsFixer, and Laravel Pint with the Laravel preset plus Tighten-specific customizations. This combines multiple linters and fixers into one unified workflow so you do not have to run each tool separately. The published style guide shows the compiled rules and examples of what each tool enforces.
Does Duster work with Laravel Sail?
Yes, Duster works with Sail. You can run ./vendor/bin/sail php ./vendor/bin/duster or use Sail's binary shortcut with ./vendor/bin/sail bin duster. For Husky hooks in a containerized environment, Duster also supports the --env option with values like sail, ddev, warden, and lando.
How can I lint or fix only files with uncommitted changes?
Use the --dirty flag to limit Duster to files that Git reports as changed. Run ./vendor/bin/duster lint --dirty to check only dirty files or ./vendor/bin/duster fix --dirty to fix them. This is useful in local development and CI pipelines where you want to avoid scanning the entire project on every run.
Can I customize which files or directories Duster includes and excludes?
Yes, create a duster.json config file in your project root with include and exclude arrays. You can list paths such as bin, scripts, src, and tests, and exclude folders like tests/fixtures or glob patterns such as **/folderToExclude/**. Duster also supports granular configuration so teams can extend or override defaults and add custom scripts like PHPStan.
Does Duster integrate with GitHub Actions and CI pipelines?
Yes, Duster can publish a ready-made GitHub Actions config using ./vendor/bin/duster github-actions. In CI you can run Duster to lint or fix code, and the --dirty flag can help optimize runs by skipping untouched files. This makes it straightforward to enforce Tighten's code style automatically on pull requests and other CI workflows.
How do I set up Duster with Husky pre-commit hooks?
Publish Husky hooks with ./vendor/bin/duster husky-hooks. If your project runs in a containerized environment without local PHP, add the --env option, for example ./vendor/bin/duster husky-hooks --env=ddev. Supported environments include ddev, warden, lando, and sail.
Will Duster conflict with my existing Pint or PHP_CodeSniffer configuration?
Duster is opinionated and enforces Tighten's presets, so it can conflict with existing team standards, custom PHPCS rulesets, or non-default Pint configurations. To reduce risk, pilot Duster in a staging environment and start gradually with dirty-file linting in CI before expanding to local auto-fixing. You can also validate specific tool compatibility with duster lint --using="phpcs,pint" and use duster.json to override includes and excludes.
What Laravel versions does Duster support?
Duster is built for Laravel applications and assumes Pint, which is available in Laravel 10 and newer, along with Sail integration. Older Laravel versions may require workarounds because the Pint-based portion is Laravel-specific. For non-Laravel PHP projects, TLint, PHP_CodeSniffer, and PHP CS Fixer can still be used independently, but Duster's full orchestration is most valuable in Laravel projects.
How do I run only specific tools with Duster?
Use the --using option to restrict Duster to selected tools, for example ./vendor/bin/duster lint --using="phpcs,pint". This is helpful for validating compatibility with your existing toolchain before adopting the full Duster workflow. It also lets you run a narrower check when you only want PHP_CodeSniffer or Pint results.
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator