HN
Today

Scotty: A beautiful SSH task runner

Scotty is a slick new SSH task runner from Spatie, designed for developers who crave fine-grained control and crystal-clear visibility during deployments. This tool revamps Laravel Envoy's approach, offering a "beautiful" terminal experience with real-time output, pausing capabilities, and a preference for plain bash over Blade templating. It appeals to those who value transparency and manual execution for their remote server tasks, making complex deployments feel more manageable and less like a black box.

8
Score
1
Comments
#19
Highest Rank
3h
on Front Page
First Seen
Mar 31, 5:00 PM
Last Seen
Mar 31, 7:00 PM
Rank Over Time
201922

The Lowdown

Spatie has unveiled Scotty, a fresh take on SSH task runners, aiming to provide developers with a more transparent and interactive way to manage remote server tasks and deployments. Positioned as a spiritual successor and re-imagining of Laravel Envoy, Scotty emphasizes beautiful terminal output, granular control, and the simplicity of plain bash scripting, addressing common pain points associated with existing deployment tools.

  • Purpose & Philosophy: Scotty allows users to define and run deploy scripts and other remote tasks directly from their terminal, prioritizing real-time feedback and direct interaction over web-based UIs like Laravel Forge.
  • Origins & Evolution: Built by Spatie, Scotty is heavily inspired by Laravel Envoy, even using its codebase as a source with AI assistance. It aims to improve upon Envoy by offering enhanced output, the ability to pause execution, and native plain bash support.
  • Task Definition: Tasks are defined in Scotty.sh files using plain bash functions annotated with # @task, or it can directly consume existing Envoy.blade.php files. This offers flexibility and familiar scripting for many developers.
  • Execution & Feedback: When running tasks, Scotty provides detailed, step-by-step output, including task names, progress, and elapsed time, stopping immediately on failure to highlight issues.
  • Advanced Features:
    • Pause/Resume: Users can pause task execution mid-deploy to inspect the server and then resume or cancel.
    • Pretend Mode: A --pretend flag allows dry-running deployments to see commands without actual execution.
    • Doctor Command: scotty doctor validates the setup, checking file parsing, SSH connectivity, and the presence of necessary remote tools (e.g., php, git).
    • Variable Support: Command-line arguments can be passed as variables into tasks.
  • Migration Path: For existing Laravel Envoy users, Scotty offers a seamless transition by being able to read Envoy.blade.php files directly, allowing gradual migration to the Scotty.sh format. Ultimately, Scotty positions itself as an elegant and powerful tool for developers who desire an improved, highly visible, and interactive command-line experience for their server deployments and remote task automation, bridging the gap between full-service deployment platforms and raw SSH scripting.