Product Decisions This Supports
- Automate DevOps workflows: Eliminates manual SSH commands for deployments, reducing human error and improving consistency across environments (dev, staging, production).
- Laravel ecosystem integration: Replaces or augments Laravel Envoy, enabling teams to standardize deployment scripts while leveraging existing PHP/Laravel knowledge.
- Build vs. Buy: Avoids reinventing a custom SSH task runner, saving engineering time and reducing technical debt. Scotty’s simplicity and compatibility with Envoy make it a low-risk "buy" decision.
- Scalable deployments: Supports multi-server deployments (e.g., load-balanced Laravel apps) via
@servers and macros, reducing complexity for distributed systems.
- Developer experience (DX): Enables self-service deployments for non-engineers (e.g., frontend teams) by documenting workflows in version-controlled
Scotty.sh files.
- Security and compliance: Centralizes deployment logic in code, ensuring auditable, reproducible processes (e.g., for PCI/DSS or SOC2 requirements).
- Roadmap alignment: Aligns with initiatives to reduce operational toil (e.g., "eliminate manual deployments" or "improve MTTR").
When to Consider This Package
- Avoid if:
- Your team uses Ansible, Terraform, or Puppet for infrastructure-as-code (Scotty is SSH-focused, not idempotent).
- You need complex orchestration (e.g., rolling updates, blue-green deployments) beyond sequential task execution.
- Your environment lacks SSH access (e.g., serverless or containerized-only workflows).
- You require multi-cloud or hybrid cloud support (Scotty is SSH-centric; consider tools like Crossplane or Pulumi for broader cloud use cases).
- Look elsewhere if:
- You need GUI-based workflows (e.g., Jenkins pipelines, GitHub Actions with visual editors).
- Your stack is non-PHP (Scotty’s examples are Laravel-centric, though the tool is language-agnostic).
- You require advanced rollback mechanisms (Scotty stops on failure; consider custom scripting or tools like Argo Rollouts).
- Consider Scotty if:
- You manage PHP/Laravel applications with SSH-accessible servers.
- Your deployments are repeatable but not overly complex (e.g., git pull + composer install + artisan commands).
- You want to reduce deployment variability by codifying workflows in version control.
- Your team lacks DevOps engineers but needs self-service deployment capabilities.
How to Pitch It (Stakeholders)
For Executives:
"Scotty is a lightweight, open-source tool that automates SSH-based deployments for our Laravel apps, cutting deployment time by 70% and reducing errors from manual steps. By standardizing workflows in Scotty.sh files (stored in Git), we’ll improve consistency, enable faster releases, and free up engineers from repetitive tasks. It’s a low-cost, high-impact solution—think ‘Git for deployments’—with no vendor lock-in. Similar tools cost thousands; Scotty is free and maintained by a trusted open-source team."
Key Outcomes:
- Faster, error-free deployments.
- Reduced operational overhead (no need to hire DevOps specialists for simple workflows).
- Auditable, version-controlled deployment processes.
For Engineering Leaders:
*"Scotty replaces ad-hoc SSH commands with structured, reusable deployment scripts. It’s a drop-in replacement for Laravel Envoy but simpler and more maintainable. Here’s why it’s a win:
- Compatibility: Works with existing Laravel/Envoy scripts (minimal learning curve).
- Collaboration: Teams can review and edit
Scotty.sh files in PRs, just like code.
- Safety: Built-in
--pretend mode lets you dry-run deployments, and --continue skips failures if needed.
- Extensibility: Supports dynamic options (e.g.,
--branch=feature-X) and multi-server deployments.
We’re proposing a pilot for 2–3 high-traffic apps to replace manual SSH deployments. The payoff? Fewer ‘oops’ moments, faster releases, and engineers spending less time on ops."*
Migration Path:
- Phase 1: Replace 1–2 manual deployments with Scotty scripts.
- Phase 2: Standardize
Scotty.sh templates across teams.
- Phase 3: Integrate with CI/CD (e.g., trigger Scotty from GitHub Actions).
For Developers:
*"Tired of typing the same SSH commands every deploy? Scotty lets you write your deployment workflow once in a Scotty.sh file and reuse it forever. Here’s how it works:
- Define servers, tasks (like
git pull, artisan migrate), and macros (sequences of tasks) in a bash file.
- Run
scotty deploy and watch it handle the rest—with real-time output and failure detection.
- Need to deploy a feature branch? Just add
--branch=feature-X to the command.
It’s like writing a script for your terminal, but version-controlled and shareable. No more ‘works on my machine’ deployment issues!"*
Getting Started:
# 1. Install Scotty (5 minutes)
curl -L https://github.com/spatie/scotty/releases/latest/download/scotty -o scotty
chmod +x scotty
# 2. Create a Scotty.sh file
./scotty init
# 3. Define your first task
# @task on:remote
deploy() {
cd /var/www/my-app
git pull origin main
php artisan migrate
}
# 4. Run it!
./scotty run deploy