sophireak / laracheck
A smart pre-push helper script for Laravel teams. Checks setup, fixes safe issues, and explains problems with AI.
v1.0.9
2026-04-01 14:46 UTC
Requires
- php: ^8.0
- illuminate/console: ^9.0|^10.0|^11.0|^12.0
- illuminate/support: ^9.0|^10.0|^11.0|^12.0
README
A smart pre-push helper for Laravel teams. Checks your project, fixes safe issues silently, and explains problems with AI.
Install
composer require sophireak/laracheck php artisan laracheck:install
Done. It runs automatically before every git push.
Commands
# Run manually php artisan laracheck # Run without auto-fix php artisan laracheck --no-fix # Run without AI explanations (faster, offline) php artisan laracheck --no-ai # Block push if issues remain php artisan laracheck --strict # One-time setup php artisan laracheck:install # Emergency bypass git push --no-verify
What it checks
| Check | Auto-fix |
|---|---|
.env exists |
✅ |
APP_KEY set |
✅ |
Missing .env keys |
⚠ warn |
| Pending migrations | ⚠ warn only |
node_modules |
✅ |
| Assets (only if frontend changed) | ✅ |
| Storage symlink & permissions | ✅ |
vendor/ |
✅ |
| Uncommitted files | ⚠ warn |
| Push to main/master | ⚠ warn |
Auto-fix is safe only — setup, installs, permissions. Never touches source code or git history.
Config
php artisan vendor:publish --tag=laracheck-config
Edit config/laracheck.php:
'mode' => 'soft', // soft | strict 'protected_branches' => ['main', 'master'], 'anthropic_api_key' => env('ANTHROPIC_API_KEY'),
.env
ANTHROPIC_API_KEY=sk-ant-your-key-here LARACHECK_MODE=soft
License
MIT — Sophireak