PHPackages                             jolicode/castor - 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. [CLI &amp; Console](/categories/cli)
4. /
5. jolicode/castor

ActiveProject[CLI &amp; Console](/categories/cli)

jolicode/castor
===============

A lightweight and modern task runner. Automate everything. In PHP.

v1.6.1(4d ago)54743.1k↓21.4%30[3 issues](https://github.com/jolicode/castor/issues)[3 PRs](https://github.com/jolicode/castor/pulls)3MITPHPPHP &gt;=8.4CI passing

Since May 31Pushed 4d ago17 watchersCompare

[ Source](https://github.com/jolicode/castor)[ Packagist](https://packagist.org/packages/jolicode/castor)[ RSS](/packages/jolicode-castor/feed)WikiDiscussions main Synced today

READMEChangelog (10)Dependencies (135)Versions (64)Used By (3)

 [![Castor](https://camo.githubusercontent.com/c12e3d857c1a982b1d2804ba15a6163b707958ba9a13557c69f1b1e1371b91db/68747470733a2f2f6a6f6c69636f64652e636f6d2f6d656469612f6f726967696e616c2f6f73732f686561646572732f636173746f722e706e67)](https://github.com/jolicode/castor)
 A lightweight and modern task runner for Automation, CI/CD &amp; DevOps.
 *###### Automate everything. In PHP. Simply. Efficiently. Elegantly.*
=============================================================================================================================================================================================================================================================================================================================================================================================================================

[](#------a-lightweight-and-modern-task-runner-for-automation-cicd--devops--automate-everything-in-php-simply-efficiently-elegantly)

Write your automation scripts in PHP, run them from the CLI.
No need for Bash, Makefiles or YAML.

- ✅ 100% PHP - define tasks as simple PHP functions
- ⚡ Fast &amp; native - no configuration, no boilerplate
- 🔧 Provided with a bunch of [useful built-in functions](https://castor.jolicode.com/docs/reference/)
- 🧠 [Autocompletion](https://castor.jolicode.com/docs/going-further/interacting-with-castor/autocomplete/) &amp; descriptions for each task
- 🧰 Easy to integrate in your dev workflows

Presentation
------------

[](#presentation)

Castor is a **DX oriented task runner**, that is designed to help you automate your development tasks and workflows in a simple and efficient way.

It can be viewed as an alternative to Makefile, Fabric, Invoke, Shell scripts, etc., but it leverages PHP's scripting capabilities and extensive library ecosystem.

It comes with many features to make your life easier:

- Seamless parsing of **arguments and options**, simplifying input handling
- **[Autocomplete](https://castor.jolicode.com/docs/going-further/interacting-with-castor/autocomplete)** support for faster and error-free typing
- A built-in list of useful functions:
    - [`run()`](https://castor.jolicode.com/docs/getting-started/run/#the-run-function): Run external processes, enabling seamless integration with external tools
    - [`io()`](https://castor.jolicode.com/docs/going-further/helpers/console-and-io/#the-io-function): Display beautiful output and interacts with the terminal
    - [`watch()`](https://castor.jolicode.com/docs/going-further/helpers/watch/): Watch files and automatically triggers actions on file modifications
    - [`fs()`](https://castor.jolicode.com/docs/going-further/helpers/filesystem/#the-fs-function): Create, remove, and manipulate files and directories
    - [And even more advanced functions](https://castor.jolicode.com/docs/reference/)

Get started in 10 seconds
-------------------------

[](#get-started-in-10-seconds)

```
curl "https://castor.jolicode.com/install" | bash

castor
```

→ Castor can also be installed in many other ways (phar, static binaries, Composer, Github Action, etc), see [the installation documentation](https://castor.jolicode.com/installation/).

Basic usage
-----------

[](#basic-usage)

In Castor, tasks are set up as typical PHP functions marked with the `#[AsTask()]` attribute in a `castor.php` file.

These tasks can run any PHP code but also make use of various [functions for standard operations](https://castor.jolicode.com/docs/reference/) that come pre-packaged with Castor.

For example, the following castor.php file:

```
use Castor\Attribute\AsTask;

#[AsTask()]
function hello(): void
{
    echo 'Hello from castor';
}
```

Will expose a `hello` task that you can run with `castor hello`:

```
$ castor hello
Hello from castor
```

Then, you can go wild and create more complex tasks:

```
#[AsTask(description: 'Clean the infrastructure (remove container, volume, networks)')]
function destroy(bool $force = false)
{
    if (!$force) {
        io()->warning('This will permanently remove all containers, volumes, networks... created for this project.');
        io()->comment('You can use the --force option to avoid this confirmation.');

        if (!io()->confirm('Are you sure?', false)) {
            io()->comment('Aborted.');

            return;
        }
    }

    run('docker-compose down -v --remove-orphans --volumes --rmi=local');

    notify('The infrastructure has been destroyed.')
}
```

→ Want to see basic usages and main features of Castor? Read the [Getting started documentation](https://castor.jolicode.com/docs/getting-started/)

Real-world use cases
--------------------

[](#real-world-use-cases)

- Run database migrations
- Deploy your app with one command
- Manage assets or translations
- Bootstrap environments
- Automate internal tools

→ See [more examples from the community](https://castor.jolicode.com/help/examples/#real-world-examples).

What developers say
-------------------

[](#what-developers-say)

> "Finally a task runner that feels like PHP. No weird DSL, just functions."
> — Every Castor user, probably

> "I thought I needed Bash, Make, and half a DevOps degree. Turns out I just needed Castor."
> — A surprisingly relieved developer

> "We migrated from Make to Castor and nobody cried. That's a win."
> — Senior Developer, now less grumpy

Why not Make / Robo / Phing / Deployer / Symfony Console?
---------------------------------------------------------

[](#why-not-make--robo--phing--deployer--symfony-console)

Because:

- Make is not PHP, and is hard to maintain in large projects
- Others are either too verbose, OOP-heavy, requiring YML or XML configurations or are specialized in deployment only.
- Symfony Console is a great base - but Castor is built on top of it and gives you superpowers

→ See detailed comparisons in our [FAQ](https://castor.jolicode.com/help/faq/)

Want more?
----------

[](#want-more)

Discover more by reading the docs:

- [Installing Castor and initial setup](https://castor.jolicode.com/installation/)
- [Documentation](https://castor.jolicode.com/docs/)
    - [Getting started with Castor](https://castor.jolicode.com/docs/getting-started/)
        - [Basic Usage](https://castor.jolicode.com/docs/getting-started/basic-usage/)
        - [Executing Processes with `run()`](https://castor.jolicode.com/docs/getting-started/run/)
        - [Task Arguments](https://castor.jolicode.com/docs/getting-started/arguments)
        - [Using the Context](https://castor.jolicode.com/docs/getting-started/context)
        - [Remote execution](https://castor.jolicode.com/docs/getting-started/remote)
    - [Going further with Castor](https://castor.jolicode.com/docs/going-further/)
    - [Castor reference](https://castor.jolicode.com/docs/reference/)
- [Need help?](https://castor.jolicode.com/help/)
    - [Frequently asked questions](https://castor.jolicode.com/help/faq/)
    - [Examples](https://castor.jolicode.com/help/examples/)
    - [Support](https://castor.jolicode.com/help/support/)

[![JoliCode is sponsoring this project](https://camo.githubusercontent.com/5dd64f06b500f261fcaac4e3594ca2d4efa01177f217c45a88835dc62140aaa2/68747470733a2f2f6a6f6c69636f64652e636f6d2f6d656469612f6f726967696e616c2f6f73732f666f6f7465722d6769746875622e706e673f7633)](https://jolicode.com/)

###  Health Score

68

—

FairBetter than 99% of packages

Maintenance99

Actively maintained with recent releases

Popularity50

Moderate usage in the ecosystem

Community39

Small or concentrated contributor base

Maturity76

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Every ~23 days

Recently: every ~29 days

Total

50

Last Release

4d ago

Major Versions

v0.29.0 → v1.0.02025-10-10

PHP version history (3 changes)v0.4PHP &gt;=8.1

v0.23.0PHP &gt;=8.2

v1.6.0PHP &gt;=8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/c06557c871a39a7ff7f83bd03aa85dc381147cd7dcd83504400f0acd2fda7835?d=identicon)[lyrixx](/maintainers/lyrixx)

![](https://www.gravatar.com/avatar/c177e9f7e88fba40b24b047954fe1ff793d48c2bd8bb12bb2e412aa9ea633ede?d=identicon)[pyrech](/maintainers/pyrech)

![](https://www.gravatar.com/avatar/16ce838e2759f19597de56865243a88711d822ba923c61e024090e87e4d3fc5f?d=identicon)[joelwurtz](/maintainers/joelwurtz)

![](https://www.gravatar.com/avatar/ebbe48a3e30540f24739602c197ad1212aeb81af96077aed5eb2a300267306bd?d=identicon)[damienalexandre](/maintainers/damienalexandre)

---

Top Contributors

[![lyrixx](https://avatars.githubusercontent.com/u/408368?v=4)](https://github.com/lyrixx "lyrixx (703 commits)")[![pyrech](https://avatars.githubusercontent.com/u/2021641?v=4)](https://github.com/pyrech "pyrech (483 commits)")[![joelwurtz](https://avatars.githubusercontent.com/u/90466?v=4)](https://github.com/joelwurtz "joelwurtz (203 commits)")[![TheoD02](https://avatars.githubusercontent.com/u/72203064?v=4)](https://github.com/TheoD02 "TheoD02 (46 commits)")[![tigitz](https://avatars.githubusercontent.com/u/1524501?v=4)](https://github.com/tigitz "tigitz (11 commits)")[![JorickPepin](https://avatars.githubusercontent.com/u/48644518?v=4)](https://github.com/JorickPepin "JorickPepin (9 commits)")[![damienalexandre](https://avatars.githubusercontent.com/u/225704?v=4)](https://github.com/damienalexandre "damienalexandre (9 commits)")[![tacman](https://avatars.githubusercontent.com/u/619585?v=4)](https://github.com/tacman "tacman (6 commits)")[![ptondereau](https://avatars.githubusercontent.com/u/4287777?v=4)](https://github.com/ptondereau "ptondereau (5 commits)")[![tucksaun](https://avatars.githubusercontent.com/u/870118?v=4)](https://github.com/tucksaun "tucksaun (5 commits)")[![YannCharlou-CleverAge](https://avatars.githubusercontent.com/u/139113009?v=4)](https://github.com/YannCharlou-CleverAge "YannCharlou-CleverAge (4 commits)")[![Korbeil](https://avatars.githubusercontent.com/u/944409?v=4)](https://github.com/Korbeil "Korbeil (3 commits)")[![thedomeffm](https://avatars.githubusercontent.com/u/29406401?v=4)](https://github.com/thedomeffm "thedomeffm (3 commits)")[![ruudk](https://avatars.githubusercontent.com/u/104180?v=4)](https://github.com/ruudk "ruudk (3 commits)")[![Nek-](https://avatars.githubusercontent.com/u/972456?v=4)](https://github.com/Nek- "Nek- (3 commits)")[![Amoifr](https://avatars.githubusercontent.com/u/31698966?v=4)](https://github.com/Amoifr "Amoifr (2 commits)")[![iNem0o](https://avatars.githubusercontent.com/u/1144755?v=4)](https://github.com/iNem0o "iNem0o (2 commits)")[![welcoMattic](https://avatars.githubusercontent.com/u/773875?v=4)](https://github.com/welcoMattic "welcoMattic (2 commits)")[![jeckel](https://avatars.githubusercontent.com/u/2981531?v=4)](https://github.com/jeckel "jeckel (2 commits)")[![qboot](https://avatars.githubusercontent.com/u/20137632?v=4)](https://github.com/qboot "qboot (2 commits)")

---

Tags

clicommand-linecommand-line-toolhacktoberfestphp-librarytask-runnertoolasyncprocessparalleltaskcastorrunner

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jolicode-castor/health.svg)

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

###  Alternatives

[shopware/core

Shopware platform is the core for all Shopware ecommerce products.

585.6M577](/packages/shopware-core)[shopware/platform

The Shopware e-commerce core

3.4k1.5M3](/packages/shopware-platform)[oro/platform

Business Application Platform (BAP)

645143.5k115](/packages/oro-platform)[chameleon-system/chameleon-base

The Chameleon System core.

1028.6k5](/packages/chameleon-system-chameleon-base)[prestashop/prestashop

PrestaShop is an Open Source e-commerce platform, committed to providing the best shopping cart experience for both merchants and customers.

9.1k17.8k](/packages/prestashop-prestashop)[contao/core-bundle

Contao Open Source CMS

1231.6M2.8k](/packages/contao-core-bundle)

PHPackages © 2026

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