PHPackages                             phptaskman/core - 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. phptaskman/core

ActiveLibrary

phptaskman/core
===============

A friendly PHP tasks launcher.

1.0.5(6y ago)86.8k15MITPHPPHP &gt;= 7.1.3

Since Apr 23Pushed 5y ago3 watchersCompare

[ Source](https://github.com/php-taskman/core)[ Packagist](https://packagist.org/packages/phptaskman/core)[ RSS](/packages/phptaskman-core/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (2)Dependencies (4)Versions (33)Used By (5)

[![Latest Stable Version](https://camo.githubusercontent.com/1533a57189bf7d1a52b0235da795ffb2b9dade92d2c6c8d585b8a63bf3d9629e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7068707461736b6d616e2f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phptaskman/core)[![GitHub stars](https://camo.githubusercontent.com/c87016c5b3d05dc0d0bcc2c65e12d15a8c9b61965a7944c2f246f081b3e4a2bc/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f73746172732f7068702d7461736b6d616e2f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-taskman/core)[![Total Downloads](https://camo.githubusercontent.com/f47ea5da3c2efb2e18055e30b03bdc6384edfb11c4bd4d26ee5e763f089e4581/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7068707461736b6d616e2f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/php-taskman/core)[![Build Status](https://camo.githubusercontent.com/9962ee892811aa4409adf0feed9648ddd6ae358e5e8394db2a94e5bfb5bdbb4a/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f7068702d7461736b6d616e2f636f72652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/php-taskman/core)[![Scrutinizer code quality](https://camo.githubusercontent.com/2dad24247beeda27e4ca4ef586440e1665e83da3a0583a3b32689218cf53d6d3/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f7175616c6974792f672f7068702d7461736b6d616e2f636f72652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-taskman/core/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/cadb99e180537f2063cba60385c668d0d8513315e2b32534df330e8dd69c49ba/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f7068702d7461736b6d616e2f636f72652f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/php-taskman/core/?branch=master)[![License](https://camo.githubusercontent.com/17e617d4dfc96e12705eb31b255fd2f6bfa0da816a63b969cae3706a55db69be/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7068707461736b6d616e2f636f72652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/phptaskman/core)[![Say Thanks!](https://camo.githubusercontent.com/05c3c1ff30c669596f087c84fa3128739d9a3c5ba0d3537ed0e41ad41553a04e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5361792d7468616e6b732d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://saythanks.io/to/drupol)[![Donate!](https://camo.githubusercontent.com/f2e288c194c16198351c80fcb396a39afb2ae2ccf89c1549c8dc049901151137/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174652d50617970616c2d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](https://paypal.me/drupol)

PHP Taskman
===========

[](#php-taskman)

Description
-----------

[](#description)

Taskman is a helper for running commands and tasks. It is shipped with a few simple default tasks.

It will help you in your every day life of setting up recurring tasks that you have to run in your projects.

Taskman is based on [Robo](https://robo.li/) and not tied to any framework or whatsoever.

Requirements
------------

[](#requirements)

- PHP &gt;= 5.6

Installation
------------

[](#installation)

`composer require phptaskman/core`

Configuration
-------------

[](#configuration)

Taskman can be customized in different ways:

1. By setting arguments and options when running a command.
2. By providing default values in configuration files. Taskman will read the following files in the specified order. Options supplied in later files will override earlier ones:
    - The defaults provided by Taskman. This file is located inside the Taskman repository in `config/default.yml`.
    - `taskman.yml.dist` - project specific defaults. This file should be placed in the root folder of the project that depends on Taskman. Use this file to declare default options which are expected to work with your application under regular circumstances. This file should be committed in the project.
    - `taskman.yml` - project specific user overrides. This file is also located in the root folder of the project that depends on Taskman. This file can be used to override options with values that are specific to the user's local environment. It is considered good practice to add this file to `.gitignore` to prevent it from being accidentally committed in the project repository.
    - User provided global overrides stored in environment variables. These can be used to define environment specific configuration that applies to all projects that uses Taskman, such as database credentials and the Github access token. The following locations will be checked and the first one that is found will be used:
        - `$PHPTASKMAN_CONFIG`
        - `$XDG_CONFIG_HOME/phptaskman/taskman.yml`
        - `$HOME/.config/phptaskman/taskman.yml`

Optional packages
-----------------

[](#optional-packages)

- [phptaskman/drupal](https://github.com/php-taskman/drupal)Provides commands for your Drupal environment.
- [phptaskman/package](https://github.com/php-taskman/package)Provide commands for generating packages out of your sources.
- [phptaskman/travis](https://github.com/php-taskman/travis)Provide commands to execute parts of your `.travis.yml` file.

Usage
-----

[](#usage)

```
./vendor/bin/taskman
```

Then run a command:

```
./vendor/bin/taskman [NAME-OF-THE-COMMAND]
```

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

[](#documentation)

The documentation is not up to date, this is a never ending work in progress.

Taskman will run commands. Commands contains one or multiple tasks.

Commands or tasks can be defined using YAML or through code.

An example of custom command with some tasks in a `taskman.yml.dist` file:

```
commands:
  foo:foo:
    - ls -la
    - { task: "mkdir", dir: "foo" }
    - ls -la
    - { task: "run", command: "foo:remove" }
  foo:remove:
    - rm -rf foo
    - ls -la
```

As you can see, there are 2 custom commands that are defined: `foo:foo` and `foo:remove`.

Those commands contains tasks, 4 tasks for `foo:foo` and 2 tasks for `foo:remove`.

A task can be either a string or a well structured array.

### Expose custom tasks in YAML

[](#expose-custom-tasks-in-yaml)

Let's use the same example and add a custom task in the YAML file.

```
tasks:
  baz:
    - ls -la

commands:
  foo:foo:
    - ls -la
    - { task: "mkdir", dir: "foo" }
    - ls -la
    - { task: "run", command: "foo:remove" }
  foo:remove:
    - rm -rf foo
    - { task: "baz" }
```

There are a few tasks that are supported by default in Taskman and provided by [the phptaskman/core-tasks package](https://packagist.org/packages/phptaskman/core-tasks).

### Expose custom commands in YAML

[](#expose-custom-commands-in-yaml)

Taskman allows you to expose new commands using a YAML file (*taskman.yml.dist or taskman.yml*). Commands can reference each other, allowing for complex scenarios to be implemented with relative ease.

- Create a file `taskman.yml` or `taskman.yml.dist` in your project, and start adding commands:

```
commands:
  hello-world:
    - echo "Hello"
    - echo "world !"
    - { task: "mkdir", dir: "foo" }
  datetime:
    - date -u

```

Taskman will automatically look into your package dependencies for such files automatically.

This means that you can create custom packagist packages containing your `taskman.yml` file with your custom commands.

### Advanced custom commands

[](#advanced-custom-commands)

You can define also command options along with a custom command.

```
commands:
  setup:behat:
    description: Write a short description of your task here.
    help: Write a short help text here.
    # When you need to define command options, the list of tasks should be
    # placed under the 'tasks' key...
    tasks:
      - { task: "process", source: "behat.yml.dist", destination: "behat.yml" }
    # Add preconditions that are going to be evaluated before running the command.
    # If one of these preconditions does not return 0, the command is not run.
    preconditions:
      - test -f .env
    # ...and option definitions are under the 'options' key.
    options:
      # The option name, without the leading double dash ('--').
      webdriver-url:
        # Optional. If this key is present, the input option value is assigned
        # to this configuration entry. This a key feature because in this way
        # you're able to override configuration values, making it very helpful
        # in CI flows.
        config: behat.webdriver_url
        # Optional. You can provide a list of shortcuts to the command, without
        # adding the dash ('-') prefix.
        shortcut:
          - wdu
          - wurl
        # The mode of this option. See the Symfony `InputOption::VALUE_*`
        # constants. Several options can be combined.
        # @see \Symfony\Component\Console\Input\InputOption::VALUE_NONE
        # @see \Symfony\Component\Console\Input\InputOption::VALUE_REQUIRED
        # @see \Symfony\Component\Console\Input\InputOption::VALUE_OPTIONAL
        # @see \Symfony\Component\Console\Input\InputOption::VALUE_IS_ARRAY
        mode: 4
        # Optional. A description for this option. This is displayed when
        # asking for help. E.g. `./vendor/bin/run setup:behat --help`.
        description: 'The webdriver URL.'
        # Optional. A default value when an optional option is not present in
        # the input.
        default: null
```

### Define global command options

[](#define-global-command-options)

You can define global options that can be applied to any command.

```
globals:
    options:
        env:
            description: Environment
            default: dev

commands:
    test:command:
        tasks:
            - echo "Running on environment ${options.env}"
```

Now you can run the command and change the value of the command option dynamically:

```
./bin/console test:command --env=prod
```

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

[](#contributing)

See [Contributing](CONTRIBUTING.md).

###  Health Score

35

—

LowBetter than 79% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity27

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 98.8% 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

Every ~6 days

Recently: every ~0 days

Total

29

Last Release

2411d ago

Major Versions

0.1.5 → 1.0.02019-04-29

0.1.10 → 1.0.12019-05-20

0.1.11 → 1.0.22019-05-20

0.1.16 → 1.0.32019-07-28

PHP version history (3 changes)0.1.1PHP &gt;= 5.6

1.0.0PHP &gt;= 7.1

1.0.3PHP &gt;= 7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/3a5b33672e6fed2f03fee680279b6bddb884ca494237764e8c4dbb2c77e8bf05?d=identicon)[drupol](/maintainers/drupol)

---

Top Contributors

[![drupol](https://avatars.githubusercontent.com/u/252042?v=4)](https://github.com/drupol "drupol (80 commits)")[![aritomelo](https://avatars.githubusercontent.com/u/9381722?v=4)](https://github.com/aritomelo "aritomelo (1 commits)")

###  Code Quality

TestsCodeception

### Embed Badge

![Health badge](/badges/phptaskman-core/health.svg)

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

###  Alternatives

[drush/drush

Drush is a command line shell and scripting interface for Drupal, a veritable Swiss Army knife designed to make life easier for those of us who spend some of our working hours hacking away at the command prompt.

2.4k57.4M685](/packages/drush-drush)[pantheon-systems/terminus

A command line interface for Pantheon

3391.5M13](/packages/pantheon-systems-terminus)[edgedesign/phpqa

Analyze PHP code with one command.

5641.0M24](/packages/edgedesign-phpqa)[codeception/robo-paracept

Codeception Parallel Execution Tasks via Robo Task Runner

583.6M1](/packages/codeception-robo-paracept)[chromatic/usher

A collection of Robo commands for use on Chromatic projects.

13534.3k1](/packages/chromatic-usher)[ec-europa/toolkit

Toolkit packaged for Drupal projects based on Robo.

38244.6k16](/packages/ec-europa-toolkit)

PHPackages © 2026

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