# openforgeproject/mageforge

> Magento 2 module for frontend workflow automation

`composer require openforgeproject/mageforge`

Canonical URL: https://packagento.com/openforgeproject/mageforge

## At a glance

- **Vendor**: openforgeproject (https://packagento.com/openforgeproject.md)
- **Latest version**: 0.27.0 — released 2026-07-10
- **Pricing**: Free
- **Package type**: Magento 2 module
- **Status**: active, accepting new buyers

## Installation

Packagento is licence-gated, so even free packages need a licence on a project before Composer can resolve them.

1. **Sign in or create an account** at https://packagento.com/customer/account/.

2. **Add the package to your account.** Open https://packagento.com/openforgeproject/mageforge and complete the free checkout. A licence is minted automatically.

3. **Create or pick a project, then activate the licence on it.**
   - Projects represent the Magento installs you deploy to. Manage them at https://packagento.com/projects/.
   - Activate the new licence on the project you'll deploy this package to. Activation is what generates the Composer credentials scoped to that project.

4. **Add the project credentials to your Magento codebase.**

   Grab the project's public + private key from https://packagento.com/projects/ (open the project, then its Credentials tab), and add them to `auth.json`:

   ```json
   {
     "http-basic": {
       "packagento.com": {
         "username": "ppk_live_...",
         "password": "psk_live_..."
       }
     }
   }
   ```

   Add the Packagento Composer repository to `composer.json`:

   ```json
   {
     "repositories": [
       { "type": "composer", "url": "https://packagento.com" }
     ]
   }
   ```

5. **Install and apply.**

   ```bash
   composer require openforgeproject/mageforge:*
   bin/magento setup:upgrade
   bin/magento setup:di:compile
   bin/magento cache:flush
   ```

## What it does

Magento 2 module for frontend workflow automation

## README

![Mageforge Hero](./.github/assets/MageForge-Header.png)

[![Release](https://img.shields.io/github/v/release/OpenForgeProject/mageforge)](https://github.com/OpenForgeProject/mageforge/releases)
[![License](https://img.shields.io/badge/license-GPL--3.0-blue)](LICENSE)
[![Downloads](https://img.shields.io/packagist/dt/openforgeproject/mageforge)](https://packagist.org/packages/openforgeproject/mageforge)
[![PHP](https://img.shields.io/packagist/dependency-v/openforgeproject/mageforge/php?logo=php&logoColor=white)](composer.json)

[![PHPUnit](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpunit.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpunit.yml)
[![Coverage](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FOpenForgeProject%2Fmageforge%2Fbadges%2Fcoverage.json)](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpunit.yml)
[![Mutation Score](https://img.shields.io/endpoint?url=https%3A%2F%2Fraw.githubusercontent.com%2FOpenForgeProject%2Fmageforge%2Fbadges%2Fmsi.json)](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpunit.yml)
[![Functional Tests](https://github.com/OpenForgeProject/mageforge/actions/workflows/functional-tests.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/functional-tests.yml)
[![Magento Compatibility](https://github.com/OpenForgeProject/mageforge/actions/workflows/magento-compatibility.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/magento-compatibility.yml)

[![PHPCS](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpcs.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/phpcs.yml)
[![Static Analysis](https://github.com/OpenForgeProject/mageforge/actions/workflows/static-analysis.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/static-analysis.yml)
[![Lint](https://github.com/OpenForgeProject/mageforge/actions/workflows/lint.yml/badge.svg?branch=main)](https://github.com/OpenForgeProject/mageforge/actions/workflows/lint.yml)

MageForge is a powerful CLI toolkit for Magento 2 front-end development. It simplifies theme building workflows, supports multiple theme types (Magento Standard, Hyvä, TailwindCSS, custom), and includes developer tools like the Frontend Inspector.

### Table of Contents

- [Requirements](#requirements)
- [Supported Theme Types](#supported-theme-types)
- [Installation](#installation)
- [Quick Start](#quick-start)
- [Frontend Inspector](#frontend-inspector)
- [Commands Reference](#commands-reference)
- [Documentation](#documentation)
- [Get your Merch](#get-your-merch)
- [Credits](#credits)

> **Contributor?** Jump to the [Development Guide](./docs/development.md).

### Requirements

- Magento 2.4.7+ (tested on 2.4.7-p10, 2.4.8-p5, 2.4.9)
- PHP 8.3+
- Node.js (LTS recommended)
- Composer

### Supported Theme Types

![Mageforge Hero](./.github/assets/MageForge-cli-chooser.png)

| Theme Type                   | Support Status                                             |
| ---------------------------- | ---------------------------------------------------------- |
| Magento Standard             | ✅ Supported                                               |
| Hyvä (TailwindCSS 3.x / 4.x) | ✅ Supported                                               |
| Hyvä Checkout                | ✅ Supported                                               |
| Hyvä Fallback                | ✅ Supported                                               |
| Custom TailwindCSS (no Hyvä) | ✅ Supported                                               |
| Avanta B2B                   | ✅ Supported                                               |
| Your Custom Theme            | [Create your own Builder](./docs/custom_theme_builders.md) |

### Installation

1. Install via Composer:

   ```bash
   composer require openforgeproject/mageforge
   ```

2. Enable the module:

   ```bash
   bin/magento module:enable OpenForgeProject_MageForge
   bin/magento setup:upgrade
   ```

### Quick Start

```bash
## 1. List available themes
bin/magento mageforge:theme:list

## 2. Build a theme
bin/magento mageforge:theme:build Magento/luma

## 3. Watch for changes (development mode)
bin/magento mageforge:theme:watch Magento/luma
```

See [Commands Reference](./docs/commands_reference.md) for the full command list with options and examples.

### Frontend Inspector

The MageForge Inspector lets you inspect Magento blocks, templates, and performance metrics directly in your browser.

**Features:**

- Template paths, block classes, and module names
- PHP render times and cache status (lifetime, tags)
- Web Vitals: LCP, CLS, INP per element
- Accessibility checks: ARIA roles, contrast ratios, alt text

#### Screenshot

![Mageforge Toolbar](./.github/assets/MageForge-Toolbar.jpeg)

**Enable:**

```bash
bin/magento mageforge:theme:inspector enable
```

The Inspector can also be enabled in Admin: `Stores > Configuration > MageForge > Frontend Inspector`

**Use in Browser:**

- Toggle: `Ctrl+Shift+I` (Windows/Linux) or `Cmd+Option+I` (macOS)
- Hover over elements to inspect; click to lock on a specific block

> **Note:** Requires Developer Mode. If not already active, run `bin/magento deploy:mode:set developer`.

### Commands Reference

See the dedicated [Commands Reference](./docs/commands_reference.md) for complete documentation of all MageForge commands, including:

- Theme commands (`list`, `build`, `watch`, `clean`, `inspector`)
- Hyvä commands (`tokens`, `compatibility:check`)
- System commands (`version`, `check`)
- Options, arguments, and usage examples

### Documentation

_(README truncated for .md surface. Full README on https://packagento.com/openforgeproject/mageforge.)_

## Changelog

All notable changes to this project will be documented in this file.

---

### Latest Release

### [0.27.0](https://github.com/OpenForgeProject/mageforge/compare/0.26.1...0.27.0) (2026-07-10)


#### Added

* update actions ([#226](https://github.com/OpenForgeProject/mageforge/issues/226)) ([08d8d08](https://github.com/OpenForgeProject/mageforge/commit/08d8d08986884150b0695c2bf0af67201b11129d))


#### Fixed

* update export-ignore rules in .gitattributes ([#228](https://github.com/OpenForgeProject/mageforge/issues/228)) ([05d4d17](https://github.com/OpenForgeProject/mageforge/commit/05d4d17f04c6b8a461565acaf126a79574480bcc))

### [0.26.1](https://github.com/OpenForgeProject/mageforge/compare/0.26.0...0.26.1) (2026-07-10)


#### Fixed

* update static analysis ([#224](https://github.com/OpenForgeProject/mageforge/issues/224)) ([6925382](https://github.com/OpenForgeProject/mageforge/commit/6925382d67d00ab2bc252f6a9b410efac958ab71))

### [0.26.0](https://github.com/OpenForgeProject/mageforge/compare/0.25.0...0.26.0) (2026-07-05)


#### Added

* add badges for PHPUnit and code quality checks ([#220](https://github.com/OpenForgeProject/mageforge/issues/220)) ([f76a7d5](https://github.com/OpenForgeProject/mageforge/commit/f76a7d51fb4b0c414b6d85f26cb03c986337fde1))
* improve coverage ([#221](https://github.com/OpenForgeProject/mageforge/issues/221)) ([bde4acd](https://github.com/OpenForgeProject/mageforge/commit/bde4acd00a437e8a9c346672c2e4b26cc19f5578))
* improve unit tests ([#219](https://github.com/OpenForgeProject/mageforge/issues/219)) ([408e8a1](https://github.com/OpenForgeProject/mageforge/commit/408e8a13753b7cefb287ff36e91ead697f91d696))
* update mago analyze ([#217](https://github.com/OpenForgeProject/mageforge/issues/217)) ([c25ac12](https://github.com/OpenForgeProject/mageforge/commit/c25ac126de7afc58fef16144d312c5b24952202a))


#### Changed

* simplify condition checks in various files ([#215](https://github.com/OpenForgeProject/mageforge/issues/215)) ([89bd44c](https://github.com/OpenForgeProject/mageforge/commit/89bd44c77bc3f67652f7121a5dd4fdb190c54695))

### [0.25.0](https://github.com/OpenForgeProject/mageforge/compare/0.24.0...0.25.0) (2026-06-30)


#### Added

* add mago analyze ([#205](https://github.com/OpenForgeProject/mageforge/issues/205)) ([773bdf3](https://github.com/OpenForgeProject/mageforge/commit/773bdf3f3a83e00d5b1b138b927c432ae5398f64))

### [0.24.0](https://github.com/OpenForgeProject/mageforge/compare/0.23.1...0.24.0) (2026-06-29)


#### Added

* Add PHPUnit configuration and unit tests for Hyvä compatibility… ([#212](https://github.com/OpenForgeProject/mageforge/issues/212)) ([b72c7c1](https://github.com/OpenForgeProject/mageforge/commit/b72c7c1164b9d99fd945e040c27aa0a9318b1c3b))
* Add structured data audit features including JSON-LD and Schema… ([#213](https://github.com/OpenForgeProject/mageforge/issues/213)) ([7e17433](https://github.com/OpenForgeProject/mageforge/commit/7e17433241c7e32e726f1bfc01104d16aefd5c4e))


#### Fixed

_(Changelog truncated for .md surface. Full history on https://packagento.com/openforgeproject/mageforge.)_

## Recent Versions

| Version | Released |
|---|---|
| 0.27.0 | 2026-07-10 |
| 0.26.1 | 2026-07-10 |
| 0.26.0 | 2026-07-05 |
| 0.25.0 | 2026-07-04 |
| 0.24.0 | 2026-06-30 |
| 0.23.1 | 2026-06-26 |
| 0.23.0 | 2026-06-24 |
| 0.22.0 | 2026-06-01 |
| 0.21.1 | 2026-05-15 |
| 0.21.0 | 2026-05-11 |

Showing 10 of 44 versions. Full release history on https://packagento.com/openforgeproject/mageforge.

## Dependencies

### Require

| Package | Constraint |
|---|---|
| laravel/prompts | ^0.3.5 |
| magento/framework | 103.0.* |
| php | ~8.3.0\|\|~8.4.0\|\|~8.5.0 |

### Require (dev)

| Package | Constraint |
|---|---|
| carthage-software/mago | ^1.30 |
| infection/infection | ^0.34.0 |
| magento/magento-coding-standard | ^40 |
| phpunit/phpunit | ^11.0 |

## Quality

Latest release (0.27.0) fails the Packagento QA pipeline. Verdicts below are per-cell (Magento line × PHP version) for the matrixed tools, and run-once for the static / security tiers.


### Compatibility

Each Magento line is installed on its supported PHP versions, then the module is built (DI compile + static-content deploy). Cells show passed / failed / untested; staircase gaps render as `–`.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | not tested | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Code Quality

Advisory checks against the module's source. Never affect the Compatibility verdict — a phpcs finding can't make a module incompatible.

#### Static Analysis

Coding standards (phpcs), mess detection (phpmd), copy-pasted code (cpd), PHP cross-version compatibility, composer.json validity. Each runs once for the whole module.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| PHPCS | Pass | 0 |  |
| PHPMD | Warning | 20 | 20 rule violations (NPathComplexity:5, CyclomaticComplexity:5, ExcessiveClassComplexity:4, UnusedFormalParameter:3, MissingImport:2) |
| Cpd | Warning | 3 | 3 duplicated chunks spanning 71 total lines (min-lines=5, min-tokens=70) |
| Composer validate | Info | 2 | valid; 2 advisory notes (composer validate --strict) |

#### PHPStan

Type-checks the module against a real Magento install. Re-runs per Magento + PHP version because resolvable symbols differ between releases.

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | 1 | Pass | – | – |
| 2.4.8 | – | Pass | Pass | – |
| 2.4.9 | – | – | Pass | Pass |


### Tests

Unit and integration suites run per Magento + PHP cell. Test failures speak to the module's behaviour, not its compatibility with a line, so they're reported here separately.

#### Unit Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | 60 | – | – |
| 2.4.8 | – | 85 | not tested | – |
| 2.4.9 | – | – | 85 | not tested |

#### Integration Tests

| Magento | PHP 8.2 | PHP 8.3 | PHP 8.4 | PHP 8.5 |
|---|---|---|---|---|
| 2.4.7 | N/A | N/A | – | – |
| 2.4.8 | – | N/A | N/A | – |
| 2.4.9 | – | – | N/A | N/A |


### Security

Dependency-advisory audit (composer audit) plus a source malware scan. A malware detection fails the version outright.

| Tool | Status | Findings | Summary |
|---|---|---|---|
| Composer audit | Pass | 0 |  |
| Malware scan | Pass | 0 |  |

## Licence and pricing

Free. A licence is still minted on checkout and bound to your project for Composer access — no payment step.

Refundable within 14 days of first purchase via https://packagento.com/account/refunds/.

## Install via Claude Code or any MCP client

The Packagento MCP server can run the licence + project + Composer steps above in one tool call:

```
purchase_and_install_packages(
  composer_names=["openforgeproject/mageforge"],
  project_id="proj_xxx"
)
```

This handles cart, checkout, licence minting, project activation, and writes auth.json credentials. Connect a client with `claude mcp add packagento https://mcp.packagento.com`. Full setup at https://packagento.com/docs/mcp-setup.

## Vendor

openforgeproject is a Magento 2 vendor on Packagento. See https://packagento.com/openforgeproject.md for their full catalogue.

