百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
C

castor

> 开发工具
开源

一个轻量级且现代化的自动化任务运行器,适用于 CI/CD 和 DevOps。

552 stars0 点赞3 次浏览
访问官网GitHub

工具介绍

一个轻量级且现代化的自动化任务运行器,适用于 CI/CD 和 DevOps。

A lightweight and modern task runner for Automation, CI/CD & 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 & native - no configuration, no boilerplate
  • Provided with a bunch of useful built-in functions
  • Autocompletion & descriptions for each task
  • Easy to integrate in your dev workflows

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 support for faster and error-free typing
  • A built-in list of useful functions:
    • run(): Run external processes, enabling seamless integration with external tools
    • io(): Display beautiful output and interacts with the terminal
    • watch(): Watch files and automatically triggers actions on file modifications
    • fs(): Create, remove, and manipulate files and directories
    • And even more advanced functions

Get started in 10 seconds

bash
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.

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 that come pre-packaged with Castor.

For example, the following castor.php file:

php
use Castor\Attribute\AsTask;

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

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

bash
$ castor hello
Hello from castor

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

…

→ Want to see basic usages and main features of Castor? Read the Getting started documentation

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.

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?

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

Want more?

Discover more by reading the docs:

  • Installing Castor and initial setup
  • Documentation
    • Getting started with Castor
      • Basic Usage
      • Executing Processes with run()
      • Task Arguments
      • Using the Context
      • Remote execution
    • Going further with Castor
    • Castor reference
  • Need help?
    • Frequently asked questions
    • Examples
    • Support

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

PHPclicommand-linecommand-line-toolhacktoberfest

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类开发工具
定价开源

> 相关工具

V
VS Code
流行的开源代码编辑器
G
Git
分布式版本控制系统
V
Vite
下一代前端构建工具