Scotty
- title
- Scotty
- type
- toolbox
- summary
- SSH task runner defining deploy steps as annotated bash functions, successor to Laravel Envoy
- tags
- php, ssh, deployment, cli
- language
- PHP
- license
- unknown
- created
- 2026-04-06
- updated
- 2026-04-06
An SSH task runner from Spatie that lets you define deployment scripts as plain bash functions and run them on remote servers with real-time output. Spiritual successor to Laravel Envoy, rebuilt from scratch.
How it works: you write a Scotty.sh file with annotated bash functions. Each function is a task, annotations specify which server to run on. Scotty parses the file, SSHs into the server, and streams output back with step counters and timing.
#!/usr/bin/env scotty
# @servers remote=deployer@your-server.com
# @task on:remote
deploy() {
cd /var/www/my-app
git pull origin main
php artisan migrate --force
}
scotty run deploy
What makes it nice:
- Plain bash syntax (not Blade templates) โ you get real shell highlighting and full bash compatibility
- Real-time display: task name, step counter, elapsed time, current command
- Summary table after completion showing timing per step
- Press
pto pause mid-deploy, verify on the server, then resume or cancel --pretendmode shows commands without executing--summarymode hides output, shows only resultsscotty doctorvalidates file parsing, SSH connectivity, and remote tool availability- Reads existing
Envoy.blade.phpfiles for backward compatibility
Limitations: PHP-based, so requires PHP runtime. Focused on the Laravel/PHP deployment world, though the bash task format works for anything.
Repo: https://github.com/spatie/scotty โ 162 stars.