spatie / scotty
A beautiful SSH task runner
Requires
- php: ^8.4
- laravel-zero/framework: ^12.0.2
Requires (Dev)
- laravel/pint: ^1.25.1
- mockery/mockery: ^1.6.12
- pestphp/pest: ^3.8.4|^4.1.2
- phpstan/phpstan: ^2.1
README
Scotty beams your deployment scripts to remote servers. It's a fresh take on Laravel Envoy, built from the ground up with better output, a new bash file format, and pause/resume support.
What Scotty adds over Envoy
- A pure bash file format with full syntax highlighting and editor support (no more Blade for shell scripts)
- Real time output with a spinner, elapsed timer, and command tracing showing which line is executing
- Per task timing and a summary table when the deploy finishes
- Pause and resume by pressing
pduring a deploy scotty doctorto validate your file, SSH connectivity, and remote tools before deploying- Envoy compatibility so you can drop Scotty into any project that already has an
Envoy.blade.php
Support us
We invest a lot of resources into creating best in class open source packages. You can support us by buying one of our paid products.
We highly appreciate you sending us a postcard from your hometown, mentioning which of our package(s) you are using. You'll find our address on our contact page. We publish all received postcards on our virtual postcard wall.
Installation
composer global require spatie/scotty
Quick start
Create a Scotty.sh file in your project root:
#!/usr/bin/env scotty # @servers remote=forge@your-server.com # @macro deploy pullCode clearCache # @task on:remote pullCode() { cd /home/forge/my-app git pull origin main } # @task on:remote clearCache() { cd /home/forge/my-app php artisan cache:clear }
Run it:
scotty run deploy
Every line is real bash. No templating, no special syntax, full editor support.
Already using Laravel Envoy? Scotty reads Envoy.blade.php files too. Just run scotty run deploy in the same directory.
Validate your setup
Documentation
Full documentation is available at spatie.be/docs/scotty.
- The Scotty.sh format (servers, tasks, macros, hooks, variables)
- Running tasks (pretend mode, pause/resume, dynamic options)
- Other commands (tasks, ssh, init, doctor)
- Envoy compatibility (supported features, migration guide)
Acknowledgements
Scotty is built on the ideas and architecture of Laravel Envoy by Taylor Otwell. The Blade file parser includes code ported from Envoy's compiler. We're grateful for the foundation Envoy provided.
Testing
composer test
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
License
The MIT License (MIT). Please see License File for more information.

