PHPackages                             droath/drush-module-sync - 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. droath/drush-module-sync

ActiveDrupal-drush[Utility &amp; Helpers](/categories/utility)

droath/drush-module-sync
========================

Sync Drupal modules based on a defined scope.

0.0.3(9y ago)02.8k2[1 issues](https://github.com/droath/drush-module-sync/issues)MITPHPPHP &gt;=5.4

Since May 6Pushed 8y agoCompare

[ Source](https://github.com/droath/drush-module-sync)[ Packagist](https://packagist.org/packages/droath/drush-module-sync)[ RSS](/packages/droath-drush-module-sync/feed)WikiDiscussions master Synced 2w ago

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

Drush Module Sync
=================

[](#drush-module-sync)

[![Build Status](https://camo.githubusercontent.com/aac8782d4fe310d8de8283ffd91125fc9a6e05c6178cbc3191859be4ee866893/68747470733a2f2f7472617669732d63692e6f72672f64726f6174682f64727573682d6d6f64756c652d73796e632e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/droath/drush-module-sync)

Sync Drupal modules based on a defined scope. Scopes are arbitrary but in most cases they're setup to match different environments, which are usually invoked based on different build processes that need to take place. The appropriate module(s) will be synced (installed/uninstalled) based on the scope definition that are defined in a YAML configuration.

Dependencies
------------

[](#dependencies)

- Drush
- Drupal 8

Similar Concept
---------------

[](#similar-concept)

- [Master](https://www.drupal.org/project/master) - Drupal 7

Getting Started
---------------

[](#getting-started)

First, you'll need to download the `drush-module-sync` library using composer:

```
composer require droath/drush-module-sync
```

Next, you need to create a `module-sync` configuration file. This can be done by executing the following command:

```
drush module-sync-generate
```

Once invoked, the command will prompt for input as it generates your `module-sync.yml` configuration. When adding scopes I usually input both **local** and **stage**, as those are common environments that require different modules to be installed or uninstalled. By default the `module-sync.yml` file will be generated in the Drupal site path, which is usually `path-to-drupal/sites/default` if you're not using a multi-site configuration.

You can set the save path to a different directory, by providing the **--path** option.

```
drush module-sync-generate --path=../configs
```

Now you can edit the `module-sync.yml` configuration that was generated. You can define different modules for each scope `modules` directive:

```
scope:
  stage:
    extend_base: true
    modules:
      - file_stage_proxy
  local:
    extend_base: true
    modules:
      - devel
      - file_stage_proxy
base:
  - field
  - views
  ...
```

As you can see the scope can extend from the `base` directive, as this is useful to remove module redundancy between multiple scopes. If you don't want to extend from the base, just set `extend_base` to `false`. Make sure to remove any modules from the `base` directive if you only want that module to be installed for a particular scope, which should already been defined.

Finally, after you've tweaked your `module-sync` configurations to your liking you can run the following command to execute the sync process.

```
drush module-sync --scope=local
```

**Note:** You can pass along the --yes|-y flag to confirm all prompts.

The command will evaluate what modules that have already been installed or need to be uninstalled for the given scope. Make sure you only run this command with the `--yes` flag when your certain all modules have been accounted for, as you could have undesired consequences.

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

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

3

Last Release

3341d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/371104?v=4)[Travis Tomka](/maintainers/droath)[@droath](https://github.com/droath)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/droath-drush-module-sync/health.svg)

```
[![Health](https://phpackages.com/badges/droath-drush-module-sync/health.svg)](https://phpackages.com/packages/droath-drush-module-sync)
```

###  Alternatives

[friendsoftypo3/content-blocks

TYPO3 CMS Content Blocks - Content Types API | Define reusable components via YAML

101466.4k45](/packages/friendsoftypo3-content-blocks)[lullabot/drainpipe

An automated build tool to allow projects to have a set standardized operations scripts.

41759.2k3](/packages/lullabot-drainpipe)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[farmos/farmos

A web-based farm record keeping application.

1.3k7.0k1](/packages/farmos-farmos)[blackfire/player

A powerful web crawler and web scraper with Blackfire support

49517.1k](/packages/blackfire-player)[acquia/cohesion

Site Studio

271.6M10](/packages/acquia-cohesion)

PHPackages © 2026

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