PHPackages                             smalot/drupal-console-build - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. smalot/drupal-console-build

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

smalot/drupal-console-build
===========================

Expose new commands to Drupal Console to run builds using a config file.

v0.2(9y ago)2541MITPHP

Since Feb 22Pushed 9y ago1 watchersCompare

[ Source](https://github.com/smalot/drupal-console-build)[ Packagist](https://packagist.org/packages/smalot/drupal-console-build)[ RSS](/packages/smalot-drupal-console-build/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (4)Versions (3)Used By (0)

Drupal Console Build
====================

[](#drupal-console-build)

Expose new commands to `Drupal Console` to run builds using a config file.

[![Latest Stable Version](https://camo.githubusercontent.com/cf56d51a8ad1465b42c3ba8888b7c6b838ae36c053f8fba1ae6263c9d1a1b359/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f762f737461626c65)](https://packagist.org/packages/smalot/drupal-console-build)[![Latest Unstable Version](https://camo.githubusercontent.com/c8abf9f9a3ee208b800e71a7a55e4d59e6c74b60b6868422dae1be33275456c5/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f762f756e737461626c65)](https://packagist.org/packages/smalot/drupal-console-build)[![License](https://camo.githubusercontent.com/c57d5dedffe9c331801a2381e5b1ed4d58f7883e0727c0a6cb61e2f9871cb9cb/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f6c6963656e7365)](https://packagist.org/packages/smalot/drupal-console-build)[![composer.lock](https://camo.githubusercontent.com/5a8069f79b1cf71f9a31238c1c91220620be413efa11c459501f3298db328835/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f636f6d706f7365726c6f636b)](https://packagist.org/packages/smalot/drupal-console-build)

[![Total Downloads](https://camo.githubusercontent.com/1a3077f4e155d5f9dc82519bb3c9571f3d86c62dd77c22d333fd562030d9eebe/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f646f776e6c6f616473)](https://packagist.org/packages/smalot/drupal-console-build)[![Monthly Downloads](https://camo.githubusercontent.com/d2b751329f361e5afd6d8794b4d8db04d952134bc3370400058c86429391c036/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f642f6d6f6e74686c79)](https://packagist.org/packages/smalot/drupal-console-build)[![Daily Downloads](https://camo.githubusercontent.com/1c705078faef78a6f1eabeaf9b44f12bec630bc8798a19a29191f8e7165a73c3/68747470733a2f2f706f7365722e707567782e6f72672f736d616c6f742f64727570616c2d636f6e736f6c652d6275696c642f642f6461696c79)](https://packagist.org/packages/smalot/drupal-console-build)

Setup
-----

[](#setup)

Include this library in your Drupal project:

```
composer require "smalot/drupal-console-build:*"
```

Must be added in your `settings.yml` file.

```
services:
  console.deploy_run:
    class: Smalot\Drupal\Console\Build\Command\RunCommand
    arguments: []
    tags:
      - { name: drupal.command }

  console.deploy_list:
    class: Smalot\Drupal\Console\Build\Command\ListCommand
    arguments: []
    tags:
      - { name: drupal.command }
```

Sample config file
------------------

[](#sample-config-file)

File: `.build.yml`should be at the same folder level as the `.git/`.

```
# List stages enabled
stages:
    - compile
    - cache
    - features

# Commands section
compile_css:
    stage: compile
    script:
        - echo "Compile SASS file into CSS"
        - compass build
    allow_failure: true

cache_rebuild:
    stage: cache
    script:
        - echo "Cache Rebuild"
        - cd web && drush cache-rebuild

features_revert:
    stage: features
    script:
        - echo "Features revert all"
        - cd web && drush fra -y
    except:
        - master
```

### Settings

[](#settings)

`stages` allows to group commands and to order them during process. If `stages` entry is specified, all commands without `stage` attribute won't be run.

Both `only` and `except` accepts regex patterns (must be surrounded by backslash `/`). You can't specify `only` and `except` at the same time.

```
command:
    only:
        - "/^fix-.*$/i"
```

The `allow_failure` will report a command in error, but won't stop future commands. Otherwise, the whole build will stop at the first command line error.

Usage
-----

[](#usage)

Run all tasks

```
drupal build:run
```

Run all tasks of one stage

```
drupal build:run --stage=cache
```

Run specific tasks

```
drupal build:run compile_css cache_rebuild
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity54

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

Every ~0 days

Total

2

Last Release

3366d ago

### Community

Maintainers

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

---

Top Contributors

[![smalot](https://avatars.githubusercontent.com/u/1424035?v=4)](https://github.com/smalot "smalot (8 commits)")

### Embed Badge

![Health badge](/badges/smalot-drupal-console-build/health.svg)

```
[![Health](https://phpackages.com/badges/smalot-drupal-console-build/health.svg)](https://phpackages.com/packages/smalot-drupal-console-build)
```

###  Alternatives

[symplify/monorepo-builder

Not only Composer tools to build a Monorepo.

5205.3M82](/packages/symplify-monorepo-builder)[shlinkio/shlink

A self-hosted and PHP-based URL shortener application with CLI and REST interfaces

4.8k4.3k](/packages/shlinkio-shlink)[cognesy/instructor-php

The complete AI toolkit for PHP: unified LLM API, structured outputs, agents, and coding agent control

310107.9k1](/packages/cognesy-instructor-php)[shivas/versioning-bundle

Symfony application versioning, simple console command to manage version (with providers e.g. git tag) of your application using Semantic Versioning 2.0.0 recommendations

1121.2M1](/packages/shivas-versioning-bundle)[overtrue/php-opencc

中文简繁转换，支持词汇级别的转换、异体字转换和地区习惯用词转换（中国大陆、台湾、香港、日本新字体）。基于 \[BYVoid/OpenCC\](https://github.com/BYVoid/OpenCC) 数据实现。

12130.7k](/packages/overtrue-php-opencc)[shyim/danger-php

Port of danger to PHP

8544.9k](/packages/shyim-danger-php)

PHPackages © 2026

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