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. Define tasks in a Scotty.sh file (bash with annotations) and run them on remote servers over SSH with clear, readable output. Compatible with Laravel Envoy, so you can use it as a drop-in replacement.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Automating DevOps workflows: Eliminates manual SSH deployments, reducing human error and improving consistency across environments (dev, staging, prod).
  • Build vs. Buy: Buy—avoids reinventing SSH task automation from scratch. Scotty is a lightweight, maintained alternative to Laravel Envoy, with better UX (e.g., pause/resume, pretender mode).
  • Roadmap priorities:
    • Phase 1: Replace ad-hoc SSH scripts with standardized Scotty.sh files for deployments, database migrations, and server maintenance.
    • Phase 2: Integrate Scotty into CI/CD pipelines (e.g., GitHub Actions) to automate post-build steps like cache clearing or queue restarts.
    • Phase 3: Extend to multi-server orchestration (e.g., blue-green deployments) by leveraging Scotty’s @servers and macros.
  • Use cases:
    • Deployments: Chain tasks (git pull → composer install → migrations → cache clear) into reusable macros.
    • Server maintenance: Run ad-hoc tasks (e.g., scotty run clearLogs) without SSH’ing in.
    • Onboarding: Standardize deployment workflows for new team members via version-controlled Scotty.sh files.
    • Debugging: Use --pretend to dry-run deployments or --summary for quick health checks in CI.

When to Consider This Package

  • Adopt Scotty if:

    • Your team manually runs SSH commands for deployments/maintenance (high risk of drift or errors).
    • You use Laravel or PHP but want a simpler, more modern alternative to Laravel Envoy (no Blade templating overhead).
    • You need visual feedback during task execution (e.g., pause/resume, real-time output, failure highlighting).
    • Your workflows involve multi-step, repeatable tasks (e.g., deployments, backups) that could benefit from macros.
    • You prioritize developer experience: Scotty.sh files are plain bash (no proprietary syntax), and tasks are listed/inspected via scotty tasks.
  • Look elsewhere if:

    • You need advanced SSH features (e.g., dynamic host discovery, complex key management) not covered by @servers—consider Ansible or Capistrano.
    • Your stack is non-PHP (Scotty is PHP-centric; e.g., no native support for Node.js/Python tasks).
    • You require enterprise-grade auditing or RBAC—Scotty is lightweight and lacks built-in access controls.
    • Your team prefers YAML/JSON configs over bash scripts (though Scotty’s Blade format is an option).
    • You’re already invested in Terraform/Pulumi for infrastructure-as-code (Scotty focuses on execution, not provisioning).

How to Pitch It (Stakeholders)

For Executives:

*"Scotty eliminates a major pain point in our deployment workflows—manual SSH commands that are error-prone, undocumented, and inconsistent across teams. By standardizing these into version-controlled Scotty.sh files, we’ll:

  • Reduce deployment failures by 30%+ (automated validation, failure highlighting).
  • Save 10+ engineer-hours/week by replacing ad-hoc SSH with reusable macros (e.g., ‘deploy’, ‘rollback’).
  • Improve onboarding—new hires get a single, up-to-date script instead of tribal knowledge.
  • Lower risk—‘pretend mode’ lets us test deployments without touching production. This is a low-code, high-impact tool that pays for itself in developer productivity. It’s also open-source, so we avoid vendor lock-in."*

Ask: "Which manual SSH workflows cause the most headaches for your team? Let’s automate those first."


For Engineering/DevOps:

*"Scotty is like Laravel Envoy on steroids—but simpler. Here’s why it’s a game-changer for us:

  • Drop-in replacement for Envoy: Uses the same @servers/@task syntax, but with a better CLI (pause/resume, real-time output, summary mode).
  • No Blade templating: Scotty.sh files are plain bash, so they’re easier to edit, review, and debug (no compiler step).
  • Built for PHP workflows: Native support for artisan commands, composer, and Laravel-specific tasks (e.g., cache clearing).
  • Collaboration-friendly: Store Scotty.sh in your repo—everyone uses the same workflow.
  • Debugging superpowers:
    • --pretend: See what would run without executing.
    • --continue: Skip failures if you want to see what else breaks.
    • scotty ssh: Quickly jump into a server from your script.

Example: Our current deployment involves 8 manual SSH steps. With Scotty, we’ll chain them into a deploy macro and run it in one command. Plus, we can add safety checks (e.g., --confirm) to prevent accidents.

Next steps:

  1. Replace one high-risk SSH workflow (e.g., production deployments) with Scotty.
  2. Add it to our CI pipeline for post-build steps (e.g., cache warming).
  3. Train the team on Scotty.sh best practices (variables, options, macros).

Trade-offs:

  • Not a full infrastructure-as-code tool (use Terraform for provisioning).
  • No built-in secrets management (use .env or a secrets manager for credentials).

Let’s pilot this on [X workflow] and measure the time saved."*


Key Sell Points:

  • For PMs: Reduces operational toil and improves release reliability.
  • For Engineers: Replaces painful SSH with a tool that’s faster, safer, and more transparent.
  • For Execs: ROI-driven—saves time, reduces errors, and scales with the team.
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.
nexmo/api-specification
capell-app/block-library
axium/identity
cetria/laravel-dummy-models
cetria/reflection-helper
agropredict/sso-auth-bundle
evolvestudio/spam-protection
datacore/hub-sdk
develia/commons
cuci/prototurk-sdk
cuci/prototurk-sdk-symfony
develia/geo-bundle
dreamzy/livewire-charts
touchestate-sdk/php-sdk
ecotone/kafka
22h/doctrine-garbage-collection-bundle
agtp/agtp-php
agtp/mod-php
splash/sonata-admin
splash/metadata