Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Scotty Laravel Package

spatie/scotty

Scotty is a beautiful SSH task runner for running scripted tasks on remote servers. Define tasks and macros in a simple Scotty.sh (bash + annotations), then run them with clear output. Fully compatible with Laravel Envoy as a drop-in replacement.

View on GitHub
Deep Wiki
Context7

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:

  1. Phase 1: Replace 1–2 manual deployments with Scotty scripts.
  2. Phase 2: Standardize Scotty.sh templates across teams.
  3. 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
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
hexters/coinpayment
rjcodes/rjcms
act-training/laravel-permissions-manager
alimarchal/laravel-chart-of-accounts
babenkoivan/elastic-scout-driver
mkwebdesign/filament-watchdog-v5
renatomarinho/laravel-page-speed
zedmagdy/filament-business-hours
renatovdemoura/blade-elements-ui
devgeek/beacon-admin
benjamin-rqt/data-watcher-bundle
atriumphp/atrium
sandermuller/package-boost-laravel
sandermuller/boost-skills
redaxo/core
yusufgenc/filament-api-forge
l3aro/rating-star-for-filament
leek/filament-subtenant-scope
anil/file-picker
broqit/fields-ai