spatie/scotty
Scotty is a beautiful SSH task runner for executing scripted tasks on remote servers. Define tasks in a Scotty.sh file (bash with annotations), run them with clear output, and use it as a drop-in, Envoy-compatible alternative for deploys and ops.
php artisan commands, .env variables) and Envoy’s existing deploy scripts, reducing friction for teams already using Envoy.Scotty.sh file (Bash + annotations), enabling granular, reusable workflows without coupling to Laravel’s core. Ideal for microservices, multi-server deployments, or legacy PHP apps.@servers, @task syntax), with backward compatibility for existing scripts. Minimal refactoring needed.~/.ssh/config or environment variables).scotty run --verbose), increasing operational toil compared to local task runners.scotty run deploy).scotty run maintenance).scotty run post-build in GitHub Actions).envoy:run commands with scotty run..env variables in Scotty.sh via @env annotations (e.g., @env APP_URL=${APP_URL}).deploy.sh → Scotty.sh).scotty run instead of envoy run.envoy:run in package.json/composer scripts with scotty run.@servers, @task, @macro annotations are identical.@parallel or @stop-on-failure (workarounds: Bash & or custom error handling).php artisan commands).scotty --password flag).~/.ssh/config host aliases)..env via @env annotations (e.g., @env DB_HOST=${DB_HOST}).Scotty.sh format.scotty run --dry-run.Scotty.sh templates for the team.Scotty.sh are not tracked by Scotty (use Git for history).~/.ssh/config or environment variables.scotty --verbose).@timeout in annotations).scotty run --verbose for detailed logs.scotty run --dry-run to preview tasks.& or external tools (e.g., GNU Parallel) for multi-server jobs.@servers grouping).| Failure Type | Impact | Mitigation |
|---|---|---|
| SSH connection drops | Task failures, deployment halts | Retry logic (scotty --retries 3), monitor SSH stability. |
| Remote script errors | Silent failures (e.g., git pull fails) |
Use set -e in Bash, check exit codes. |
| Key rotation issues | Authentication failures | Autom |
How can I help you explore Laravel packages today?