laravel:bootstrap-check
Bootstrap Check (Laravel)
Quickly determine if the project should run with Sail or host tools, then list the correct commands for this session.
Detect Runner
Run this snippet in your project root:
if [ -f sail ] || [ -x vendor/bin/sail ]; then
echo "Sail detected. Use: sail artisan|composer|pnpm ...";
else
echo "Sail not found. Use host tools: php artisan, composer, pnpm ...";
fi
Optional portable alias:
alias sail='sh $([ -f sail ] && echo sail || echo vendor/bin/sail)'
Command Pairs
sail artisan about|php artisan aboutsail artisan test|php artisan testsail artisan migrate|php artisan migratesail composer install|composer installsail pnpm install|pnpm installsail pnpm run dev|pnpm run dev
Service Smoke Checks
- DB:
sail mysql -e 'select 1'ormysql -e 'select 1' - Cache:
sail redis pingorredis-cli ping
More from jpcaparas/superpowers-laravel
laravel:routes-best-practices
Keep routes clean and focused on mapping requests to controllers; avoid business logic, validation, or database operations in route files
88laravel:blade-components-and-layouts
Compose UIs with Blade components, slots, and layouts; keep templates pure and testable
88laravel:quality-checks
Unified quality gates for Laravel projects; Pint, static analysis (PHPStan/Psalm), Insights (optional), and JS linters; Sail and non-Sail pairs provided
79laravel:performance-caching
Use framework caches and value/query caching to reduce work; add tags, locks, and explicit invalidation strategies for correctness
76laravel:eloquent-relationships
Define clear relationships and load data efficiently; prevent N+1, use constraints, counts/sums, and pivot syncing safely
75laravel:queues-and-horizon
Operate and verify queues with or without Horizon; safe worker flags, failure handling, and test strategies
74