PHPackages                             cresset/magebuild - 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. cresset/magebuild

ActiveLibrary[CLI &amp; Console](/categories/cli)

cresset/magebuild
=================

A fast, parallel, DAG-ordered Magento 2 build orchestrator: composer install, di-compile, static-content deploy, autoload dump, and packaging in one process, for CI / Deployer build steps. Fetches a prebuilt Rust binary on demand.

v0.3.1(6y ago)00EUPL-1.2PHP &gt;=8.1

Since Jan 1Compare

[ Source](https://github.com/cresset-tools/magebuild)[ Packagist](https://packagist.org/packages/cresset/magebuild)[ Docs](https://github.com/cresset-tools/magebuild)[ RSS](/packages/cresset-magebuild/feed)WikiDiscussions Synced today

READMEChangelog (5)DependenciesVersions (6)Used By (0)

magebuild
=========

[](#magebuild)

Build a Magento 2 release as fast as possible: a parallel, DAG-ordered orchestrator that runs `composer install`, DI compile, static-content deploy, autoload dump, and packaging in **one process**, replacing the build half of a Deployer recipe.

magebuild links [magequery](https://github.com/cresset-tools/magequery)'s write-side engines in-process (`magecommand-engine` for the DI compile, magecommand's `static_deploy` for static content) together with a native Composer client, so a full build needs no PHP and no framework bootstrap. The steps run on a bounded parallel ready-queue over a shared rayon pool, with DI compile and static-content deploy overlapped:

```
composer-install → { di-compile → autoload-dump } ∥ { static-deploy } → package

```

Install
-------

[](#install)

### curl (Linux / macOS)

[](#curl-linux--macos)

```
curl --proto '=https' --tlsv1.2 -LsSf \
  https://github.com/cresset-tools/magebuild/releases/latest/download/magebuild-installer.sh | sh
```

Prebuilt binaries ship for Linux (gnu and musl, x86\_64 and arm64), macOS (x86\_64 and arm64), and Windows. Every release archive is Sigstore-signed.

### Composer (for Deployer / CI projects)

[](#composer-for-deployer--ci-projects)

```
composer require --dev cresset/magebuild
```

This puts `magebuild` in `vendor/bin/`; the package fetches the prebuilt binary for your platform on first run (checksum-verified, cached).

Usage
-----

[](#usage)

```
magebuild                              # build the Magento root in the current dir
magebuild --root path/to/store         # ... or an explicit root
magebuild --artifact release.tar.zst   # also package (gzip/zstd chosen by extension)
magebuild plan                         # print the DAG + parallel schedule, run nothing
magebuild node di-compile              # run one node and its dependencies
magebuild --json                       # machine-readable output
```

Common flags: `--jobs N`, `--only `, `--skip `, `--dry-run`, `--profile`, `--deployed-version `, `--exclude-from `.

Packaging picks the compressor from the artifact extension: `.tar` (none), `.tar.gz` (parallel gzip), `.tar.zst` (multi-threaded zstd). Both compressors fan out across `--jobs` cores.

Configuration (`magebuild.toml`)
--------------------------------

[](#configuration-magebuildtoml)

Placed at the Magento root, it overrides node fields or adds project steps:

```
[build]
jobs = 8

[nodes.di-compile]
fused = true                       # fused interceptors

[nodes.static-deploy]
locales = ["en_US", "nl_NL"]

[nodes.composer-install]
hardlink = true                    # see below — off by default

# add a custom step to the graph
[nodes.my-assets]
after = ["composer-install"]
run = "npm run build"
```

`hardlink` (or the `MAGEBUILD_HARDLINK` env var) makes composer-install hard-link packages out of a decompress-once store instead of extracting on every run. It's **off by default** because it only pays off with a *persistent, uncompressed* store — self-hosted CI with a cache disk, a Docker layer, or repeated local builds. On ephemeral CI that restores the store from a compressed `actions/cache`, the restore re-decompresses everything, so a plain extract is just as fast.

Deployer integration
--------------------

[](#deployer-integration)

Install `magebuild` on the CI build host (curl one-liner above, or the Composer package), then call it from `deploy.php`. Either run the whole build in one parallel call:

```
task('magento:compile', function () {
    run('cd {{release_path}} && magebuild --deployed-version {{content_version}}');
});
```

or swap it in for individual `bin/magento` steps (di-compile ∥ static-deploy still overlap when run as one call; here they are separate recipe tasks):

```
task('magento:compile', function () {
    run('cd {{release_path}} && magebuild --only di-compile --skip composer-install');
    run('cd {{release_path}} && composer dump-autoload -o --no-dev');
});
task('magento:deploy:assets', function () {
    run('cd {{release_path}} && magebuild --only static-deploy --skip composer-install'
        . ' --deployed-version {{content_version}}');
});
```

`--skip composer-install` when Deployer already installed the vendor tree; drop it to let magebuild install from `composer.lock` too.

How it relates to magequery
---------------------------

[](#how-it-relates-to-magequery)

[magequery](https://github.com/cresset-tools/magequery) is the read-side tool (inspect a Magento codebase) and `magecommand` its write-side companion (DI compile, static deploy). magebuild is the orchestrator: it links those engines as libraries and runs them, plus Composer, as a parallel build graph.

License
-------

[](#license)

[EUPL-1.2](LICENSE).

###  Health Score

23

—

LowBetter than 25% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity0

Limited adoption so far

Community2

Small or concentrated contributor base

Maturity60

Established project with proven stability

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

5

Last Release

2395d ago

### Community

Maintainers

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

---

Tags

climagentocideployerbuildmagento2developer-tools

### Embed Badge

![Health badge](/badges/cresset-magebuild/health.svg)

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

###  Alternatives

[n98/magerun

Tools for managing Magento projects and installations

1.4k266.9k7](/packages/n98-magerun)[n98/magerun2

Tools for managing Magento projects and installations

926245.5k6](/packages/n98-magerun2)[mehrancodes/laravel-harbor

A CLI tool to Quickly create On-Demand preview environment for your apps.

10097.5k](/packages/mehrancodes-laravel-harbor)[tnegeli/m2clitools

Some nice commands to cleanup media files and tables on production systems

4174.8k](/packages/tnegeli-m2clitools)[spresnac/laravel-create-user-cli

Create a user-entry from cli with artisan

2357.4k1](/packages/spresnac-laravel-create-user-cli)

PHPackages © 2026

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