spatie/scotty
Scotty is a beautiful SSH task runner. Write tasks as plain bash in a Scotty.sh file with annotation comments, and it connects to your remote servers, runs each script, and shows exactly what's happening. Fully compatible with Laravel Envoy.
deploy.sh + ssh wrapper (maintenance burden, tribal knowledge, no dry-run, no output discipline) without buying a deployment platform. The decision it unblocks is narrow and real: do we keep paying engineering time to maintain bespoke SSH glue, or adopt a 1-file tool that does the same job with --pretend, --continue, --summary, and readable output?--pretend for review-before-execution, --continue and timestamped completion/failure messages, and scotty doctor for pre-flight connectivity/macro validation map directly to on-call needs. This is a candidate for a "reduce incident MTTR / reduce fat-finger risk" initiative with a measurable claim: dry-run output becomes the review artifact, and connectivity failures surface before the incident rather than during it.--summary exists precisely because CI wants pass/fail, humans want verbose. That's a per-environment default decision (verbose locally, summary in CI) worth capturing once instead of re-litigating per pipeline.Adopt when all of these hold:
Envoy.blade.php or Scotty.sh — i.e. the workflow exists and is being maintained by hand.--pretend, doctor) more than you need approvals, audit trails, or artifact promotion.Look elsewhere when:
@option is unavailable there per the docs. Two formats with different feature sets is an adoption wrinkle to price in, not a footnote.host:port (1.4.0), or working Blade hooks — 1.4.4 fixed @before/@after/@error/@success/@finished hooks that previously failed silently. That silent-failure history is the single highest-risk unknown; verify hook behavior explicitly in pilot rather than trusting the compatibility claim.To executives — one paragraph: We spend engineering hours maintaining a hand-rolled SSH deploy script that has no dry-run, no pre-flight validation, and inconsistent output. Scotty is a single-file, MIT-licensed CLI from Spatie (a well-known PHP vendor) that does that job properly — written bash task definitions, one-command execution across our servers, a dry-run mode we can review before touching production, and pre-flight connectivity checks. Adoption cost is one binary and one script in the repo; no agent, no daemon, no database, no contract. It's a reversible experiment, not a platform migration, and it lets us retire Laravel Envoy as a follow-on. What it is not: it does not give us zero-downtime releases, rollback, or centralized secrets — we are explicitly not buying that with this, and if we need it, it's a separate decision.
To engineering — the substance: Install is trivial (phar into the repo, phar on $PATH, or composer global require spatie/scotty). Tasks are plain bash with annotation comments (@servers, @task, @macro, @option) — no DSL, and editors highlight it for free. Self-contained phar means no PHP extension or runtime negotiation. Sequence: pilot in one repo → scotty doctor before anything real → --pretend on the full deploy macro as the review artifact → port the Envoy.blade.php and run both against staging, diffing observed effects rather than trusting the drop-in claim → move to CI with --summary → deprecate Envoy after one full cycle. Keep routine deploy adoption ahead of incident-runbook adoption; don't try to land both at once. Pick one canonical format (Scotty.sh or Envoy.blade.php) up front to avoid the @option parity surprise.
The one sentence to get a decision: This is a one-file, reversible pilot that removes a maintenance burden and gives us a reviewable dry-run — approve it for one repo, and we'll bring back staging parity results before it touches production.
How can I help you explore Laravel packages today?