PHPackages                             dennisdigital/drupal\_console\_commands - 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. dennisdigital/drupal\_console\_commands

ActiveDrupal-console-library[CLI &amp; Console](/categories/cli)

dennisdigital/drupal\_console\_commands
=======================================

Custom commands for Drupal console.

1.2(5y ago)54.8k5[4 issues](https://github.com/dennisinteractive/drupal_console_commands/issues)[2 PRs](https://github.com/dennisinteractive/drupal_console_commands/pulls)1GPL-2.0+PHPCI failing

Since Oct 28Pushed 5y ago43 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (85)Used By (1)

Dennis Console
==============

[](#dennis-console)

Provides custom Drupal console commands and chains.

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

[](#requirements)

- [Composer](https://getcomposer.org/download/)

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

[](#installation)

```
curl -L https://raw.githubusercontent.com/dennisinteractive/drupal_console_commands/master/Makefile > Makefile

make install

```

Commands
--------

[](#commands)

These are custom commands used to build a site. The information about the site comes from `~/.console/sites/site-name.yml`. See some examples of site YAML files at [https://github.com/dennisinteractive/drupal\_console\_commands/tree/master/sites](https://github.com/dennisinteractive/drupal_console_commands/tree/master/sites)

- drupal **site:build**

    Runs the following commands to build a site:

    - site:checkout
    - site:compose|make
    - site:npm
    - site:grunt
    - site:settings
    - site:phpunit:setup
    - site:behat:setup
    - site:db:import
    - site:update

    options:

    - skip: Use this option to leave out one or more commands. i.e. `--skip="checkout, phpunit:setup"` will run all the steps above except`site:checkout` and `site:phpunit:setup`.
- drupal **site:new**

    Builds a new site using a Drupal project as template from one of the following:

    - drupal-composer/drupal-project:8.x-dev
    - acquia/lightning-project
    - acquia/reservoir-project
- drupal **site:checkout** *site-name* \[--branch|--tag\]

    Performs a git clone and checks out the specified branch or tag

    - drupal **site:checkout:tag** *site-name* --tag

        Performs a `git clone` and checks out the specified tag/revision
    - drupal **site:checkout:branch** *site-name* --branch

        Performs a `git clone` and checks out the specified branch
- drupal **site:compose** *site-name*

    Runs `composer install`
- drupal **site:make** *site-name*

    Runs `drush make`
- drupal **site:npm**

    Compiles NPM packages and runs `npm`
- drupal **site:grunt**

    Compiles Grunt packages and runs `grunt`
- drupal **site:settings** *site-name*

    - Runs the following commands:

        - site:settings:db
        - site:settings:memcache
    - Creates *settings.php* using *default.settings.php* provided by Drupal core
    - Appends includes for the settings below:

        - *settings.db.php* for database credentials.
        - *settings.memcache.php* for memcache configuration.
        - *settings.local.php* in the *web/sites/\[site name\]* directory.

        This file is auto-generated and should not be committed. If you have a file named `web/sites/example.settings.local.php` in the site's folder, it will be used as a template for `settings.local.php`.

        - *settings.\[env\].php* These files are auto-generated and should not be committed. Depending on your environment (--env option), it will copy the respective file into *web/sites/\[site name\]*. i.e. default.settings.dev.php -&gt; settings.dev.php
        - *settings.mine.php* Use this file to add your personal customisations to override all of the above.

    **It is recommended that you add settings.\*.php to .gitignore.**
- drupal **site:settings:db** *site-name*

    Creates *settings.db.php* in the *web/sites/default* folder. This file contains DB credentials and should not be committed.
- drupal **site:settings:memcache** *site-name*

    Creates *settings.memcache.php* in the *web/sites/default* folder. This file contains Memcache configuration and should not be committed.
- drupal **site:phpunit:setup** *site-name*

    Creates *phpunit.xml* in the root. This file contains PHPUnit configuration and should not be committed.
- drupal **site:behat:setup** *site-name*

    Creates *behat.yml* in the *tests* folder. This file contains Behat configuration and should not be committed.
- drupal **site:db:import** *site-name*

    If a database dump is available, it will drop the current database and import the dump. The information for this comes from `~/.console/sites/site-name.yml`.

    The command will copy the dump from the original place to `/tmp`. Runing the command again will only copy the file if the original has changed. This is very useful when working remotely on slow networks.

    If no db-dump information is available or there is no dump at the location, it will run a site install.

    Currently, the supported extensions are `.sql` and `.sql.gz` only.
- drupal **site:update** *site-name*

    Runs updates, import configuration, clear caches. You can enable or disable modules after import by adding the list to the site.yml file as follows:

    ```
      modules:
        enable:
          - stage_file_proxy
          - devel
        disable:
          - cdn

    ```
- drupal **site:test** *site-name*

    Runs test suites

    ```
    - `./behat %s` (Behat tests)
    - `./vendor/bin/phpunit` (PHPUnit tests)

    ```

Environment specific chains
---------------------------

[](#environment-specific-chains)

Each environment will have its own chain that executes the relevant commands and chains

### Artifact

[](#artifact)

- drupal **site:build:artifact**

    Prepares artifacts and runs the following:

    - site:checkout
    - site:compose
    - site:npm
    - site:grunt

### CI

[](#ci)

- drupal **site:build:ci**

    Builds a site for CI and runs the following:

    - site:db:import
    - site:update
    - site:test

### QA

[](#qa)

- drupal **site:build:qa**

    Builds a site for QA and runs the following:

    - site:db:import
    - site:update
    - site:test

### Staging

[](#staging)

- drupal **site:build:staging**

    Builds a site for Staging and runs the following:

    - site:db:import
    - site:update

### Production

[](#production)

- drupal **site:build:prod**

    Runs updates on production and runs the following:

    - site:update

Useful arguments and options
----------------------------

[](#useful-arguments-and-options)

- **-h** - Shows all the available arguments and options.
- **--no-interaction** - Executes the command without asking any optional argument
- **--skip** - Skips the execution of one or more commands (only `site:build`).

Environment variables
---------------------

[](#environment-variables)

By default, the commands will use parameters from the `site.yml`, but it is possible to override them using environment variables.

For example, to override the root directory you can set the variable before calling `site:build`

`export site_destination_directory="/directory/"`

Usage examples
--------------

[](#usage-examples)

```
drupal site:build
drupal site:build d7-example
drupal site:build d7-example -e dev --branch="master"
drupal site:build d7-example -e dev --branch="master" --skip="checkout, compose"
drupal site:db:import d7-example

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance4

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community27

Small or concentrated contributor base

Maturity79

Established project with proven stability

 Bus Factor1

Top contributor holds 80.1% 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 ~24 days

Recently: every ~225 days

Total

59

Last Release

2056d ago

Major Versions

0.50 → 1.02017-09-11

0.48.0.2 → 1.12018-09-21

0.48.0.3 → 1.22020-09-22

PHP version history (2 changes)0.1PHP ~5.6

0.2PHP &gt;=5.6

### Community

Maintainers

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

---

Top Contributors

[![marcelovani](https://avatars.githubusercontent.com/u/2162363?v=4)](https://github.com/marcelovani "marcelovani (508 commits)")[![davidgrayston](https://avatars.githubusercontent.com/u/1229335?v=4)](https://github.com/davidgrayston "davidgrayston (56 commits)")[![kalpaitch](https://avatars.githubusercontent.com/u/334114?v=4)](https://github.com/kalpaitch "kalpaitch (34 commits)")[![guardiola86](https://avatars.githubusercontent.com/u/2041549?v=4)](https://github.com/guardiola86 "guardiola86 (10 commits)")[![tashaharrison](https://avatars.githubusercontent.com/u/4018999?v=4)](https://github.com/tashaharrison "tashaharrison (9 commits)")[![tariqinaam](https://avatars.githubusercontent.com/u/3472479?v=4)](https://github.com/tariqinaam "tariqinaam (5 commits)")[![peteratdennis](https://avatars.githubusercontent.com/u/24475027?v=4)](https://github.com/peteratdennis "peteratdennis (4 commits)")[![dakala](https://avatars.githubusercontent.com/u/285543?v=4)](https://github.com/dakala "dakala (2 commits)")[![glynnreid](https://avatars.githubusercontent.com/u/199417?v=4)](https://github.com/glynnreid "glynnreid (2 commits)")[![kungfuchris](https://avatars.githubusercontent.com/u/843206?v=4)](https://github.com/kungfuchris "kungfuchris (1 commits)")[![simon-peacock](https://avatars.githubusercontent.com/u/2843186?v=4)](https://github.com/simon-peacock "simon-peacock (1 commits)")[![ioanma](https://avatars.githubusercontent.com/u/1290483?v=4)](https://github.com/ioanma "ioanma (1 commits)")[![jfcolomer](https://avatars.githubusercontent.com/u/12459799?v=4)](https://github.com/jfcolomer "jfcolomer (1 commits)")

---

Tags

consolesymfonydrupaldevelopment

### Embed Badge

![Health badge](/badges/dennisdigital-drupal-console-commands/health.svg)

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

###  Alternatives

[drupal/console

The Drupal CLI. A tool to generate boilerplate code, interact with and debug Drupal.

93615.1M160](/packages/drupal-console)[drupal/console-core

Drupal Console Core

13514.7M12](/packages/drupal-console-core)[drupal/console-en

Drupal Console English Language

12814.6M4](/packages/drupal-console-en)[nunomaduro/laravel-console-task

Laravel Console Task is a output method for your Laravel/Laravel Zero commands.

2582.1M11](/packages/nunomaduro-laravel-console-task)[drupal/console-launcher

Drupal Console launcher

217.9k](/packages/drupal-console-launcher)[duncan3dc/console

Create command line php applications using symfony/console

17263.4k2](/packages/duncan3dc-console)

PHPackages © 2026

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