PHPackages                             spatie/scotty - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [DevOps &amp; Deployment](/categories/devops)
4. /
5. spatie/scotty

ActiveProject[DevOps &amp; Deployment](/categories/devops)

spatie/scotty
=============

A beautiful SSH task runner

1.0.0(1mo ago)15908[3 issues](https://github.com/spatie/scotty/issues)[1 PRs](https://github.com/spatie/scotty/pulls)MITPHPPHP ^8.4CI passing

Since Mar 28Pushed 1mo agoCompare

[ Source](https://github.com/spatie/scotty)[ Packagist](https://packagist.org/packages/spatie/scotty)[ RSS](/packages/spatie-scotty/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (6)Dependencies (5)Versions (2)Used By (0)

Scotty: a beautiful SSH task runner
===================================

[](#scotty-a-beautiful-ssh-task-runner)

[![Latest Version on Packagist](https://camo.githubusercontent.com/45dc02b4a0ee35c8c66977e77c8759bd1da0f5f405e14ad197c5d2bd51184f1b/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7370617469652f73636f7474792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/scotty)[![GitHub Tests Action Status](https://camo.githubusercontent.com/d72ad4fda04b978b8a83ee0e3941a3dde109a994e1005f2467b1a288a4b4f98f/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f7370617469652f73636f7474792f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/spatie/scotty/actions?query=workflow%3Arun-tests+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/8eb0be5079a7a27920af5e0f346a50288b056a1160c19a23bf8dd0101cc780e0/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7370617469652f73636f7474792e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/spatie/scotty)

Scotty is a tool that runs tasks on your remote servers over SSH. You write your tasks in a `Scotty.sh` file (plain bash with annotation comments), and Scotty takes care of connecting, running each script, and showing you exactly what's happening. It's fully compatible with [Laravel Envoy](https://laravel.com/docs/envoy), so you can use it as a drop-in replacement.

[![scotty run deploy](https://github.com/spatie/scotty/raw/main/docs/images/scotty-run-deploy.jpg?raw=true)](https://github.com/spatie/scotty/blob/main/docs/images/scotty-run-deploy.jpg?raw=true)

Here's what a `Scotty.sh` file looks like:

```
#!/usr/bin/env scotty

# @servers remote=deployer@your-server.com
# @macro deploy pullCode clearCache

# @task on:remote
pullCode() {
    cd /var/www/my-app
    git pull origin main
}

# @task on:remote
clearCache() {
    cd /var/www/my-app
    php artisan cache:clear
}
```

Run it with `scotty run deploy`.

Support us
----------

[](#support-us)

[![](https://camo.githubusercontent.com/1b7652e33fdac7ce9714805989c78b96bc63813fe7e1d78b7875765bb20d58e5/68747470733a2f2f6769746875622d6164732e73332e65752d63656e7472616c2d312e616d617a6f6e6177732e636f6d2f73636f7474792e6a70673f743d31)](https://spatie.be/github-ad-click/scotty)

We invest a lot of resources into creating [best in class open source packages](https://spatie.be/open-source). You can support us by [buying one of our paid products](https://spatie.be/open-source/support-us).

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](https://spatie.be/about-us). We publish all received postcards on [our virtual postcard wall](https://spatie.be/open-source/postcards).

Documentation
-------------

[](#documentation)

All documentation is available [on our documentation site](https://spatie.be/docs/scotty).

Acknowledgements
----------------

[](#acknowledgements)

Scotty is built on the ideas and architecture of [Laravel Envoy](https://github.com/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
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Freek Van der Herten](https://github.com/freekmurze)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

44

—

FairBetter than 92% of packages

Maintenance90

Actively maintained with recent releases

Popularity17

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity51

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

45d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/7535935?v=4)[Spatie](/maintainers/spatie)[@spatie](https://github.com/spatie)

---

Top Contributors

[![freekmurze](https://avatars.githubusercontent.com/u/483853?v=4)](https://github.com/freekmurze "freekmurze (70 commits)")

---

Tags

bashdeployenvoysshtaskssshdevopsdeploytask-runner

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

Type Coverage Yes

### Embed Badge

![Health badge](/badges/spatie-scotty/health.svg)

```
[![Health](https://phpackages.com/badges/spatie-scotty/health.svg)](https://phpackages.com/packages/spatie-scotty)
```

###  Alternatives

[ondram/ci-detector

Detect continuous integration environment and provide unified access to properties of current build

22249.4M33](/packages/ondram-ci-detector)[dg/ftp-deployment

A tool for automated deployment of web applications to an FTP server.

615845.5k8](/packages/dg-ftp-deployment)[easycorp/easy-deploy-bundle

The easiest way to deploy Symfony applications

468310.2k](/packages/easycorp-easy-deploy-bundle)[jalogut/magento2-deployer-plus

Magento 2 deployment tool based on deployer.org

201415.5k](/packages/jalogut-magento2-deployer-plus)[kohkimakimoto/altax

Altax is an extensible deployment tool for PHP.

2002.8k](/packages/kohkimakimoto-altax)[madalynn/plum

An object oriented deployer library

8610.2k](/packages/madalynn-plum)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
