PHPackages                             fulmenef/magephi - 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. [DevOps &amp; Deployment](/categories/devops)
4. /
5. fulmenef/magephi

ActiveApplication[DevOps &amp; Deployment](/categories/devops)

fulmenef/magephi
================

PHP toolbox to manage Magento 2 project with a Docker Environment.

2.1.0(1y ago)7581MITPHP ~8.2 || ~8.3 || ~8.4

Since Nov 16Pushed 1y ago2 watchersCompare

[ Source](https://github.com/Fulmenef/magephi)[ Packagist](https://packagist.org/packages/fulmenef/magephi)[ RSS](/packages/fulmenef-magephi/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (10)DependenciesVersions (44)Used By (0)

Magephi
=======

[](#magephi)

[![status](https://camo.githubusercontent.com/f797bdc098b4a063f7cfb7f949a9a3fc30caf082a2f5aa58e71ae5ce9293da62/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d737461626c652d696d706f7274616e742e7376673f63616368655365636f6e64733d32353932303030)](https://camo.githubusercontent.com/f797bdc098b4a063f7cfb7f949a9a3fc30caf082a2f5aa58e71ae5ce9293da62/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7374617475732d737461626c652d696d706f7274616e742e7376673f63616368655365636f6e64733d32353932303030)[![php](https://camo.githubusercontent.com/b876f175f4113f2610a3899ad26a81d99db26ee90954ead04880a0c89cce45b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c75652e7376673f63616368655365636f6e64733d32353932303030)](https://camo.githubusercontent.com/b876f175f4113f2610a3899ad26a81d99db26ee90954ead04880a0c89cce45b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253545382e322d626c75652e7376673f63616368655365636f6e64733d32353932303030)[![symfony](https://camo.githubusercontent.com/2ee428bcd60ebeb78f82a087c71eb654d81e53daac04d33dc708e7d4df40127c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d372e312d6461726b677265656e2e7376673f63616368655365636f6e64733d32353932303030)](https://camo.githubusercontent.com/2ee428bcd60ebeb78f82a087c71eb654d81e53daac04d33dc708e7d4df40127c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f73796d666f6e792d372e312d6461726b677265656e2e7376673f63616368655365636f6e64733d32353932303030)[![GitHub tag (latest by date)](https://camo.githubusercontent.com/2f8cd549b882f41f9a52edf6fdbe99f146b41bf655d335dfcee41a1ae909f2f0/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f762f7461672f66756c6d656e65662f6d6167657068692e737667)](https://github.com/fulmenef/magephi/tags)[![GitHub Issues](https://camo.githubusercontent.com/f7773544aa781d19c9c555dfe79b94423dfddd7090125f3d502565404fbbe21b/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f66756c6d656e65662f6d6167657068692e737667)](https://github.com/fulmenef/magephi/issues)[![Contributions welcome](https://camo.githubusercontent.com/d36745df8a6a62e0aa3eac455d2563d6049bde3683dc6f6f21af87f1561bb8c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d677265656e2e737667)](https://camo.githubusercontent.com/d36745df8a6a62e0aa3eac455d2563d6049bde3683dc6f6f21af87f1561bb8c4/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f6e747269627574696f6e732d77656c636f6d652d677265656e2e737667)[![license](https://camo.githubusercontent.com/d95d21dab9ed00f81b1c2114d540f5a22c59fc5c3107acc0d8d24d8d40dfb647/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d707572706c652e7376673f63616368655365636f6e64733d32353932303030)](https://camo.githubusercontent.com/d95d21dab9ed00f81b1c2114d540f5a22c59fc5c3107acc0d8d24d8d40dfb647/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d707572706c652e7376673f63616368655365636f6e64733d32353932303030)

Magephi is a [Symfony](https://github.com/symfony/symfony) based PHP CLI designed to manage Magento 2 projects environment.

Its main functionality are the installation/start/stop of your environment but it can also initialize a Magento 2 project with its environment, give you access to services, verify your environment match the prerequisites, import a database etc.

For now Magephi has been only tested on Mac with the environment [docker-magento2](https://github.com/EmakinaFR/docker-magento2).

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

[](#installation)

```
composer global require fulmenef/magephi

```

Usage
-----

[](#usage)

```
# List Magephi commands
magephi

# Execute a specific command
magephi xxxxx

# Display the help message of a specific command
magephi xxxxx --help

# List all available commands (i.e. Symfony included)
magephi list
```

Demo
----

[](#demo)

 [![demo](https://gist.githubusercontent.com/fulmenef/6d269a661b9ef62c015d0b961b34d762/raw/22420f21ec32705b6aecd78a0f02eb25a191b608/magephi.gif)](https://gist.githubusercontent.com/fulmenef/6d269a661b9ef62c015d0b961b34d762/raw/22420f21ec32705b6aecd78a0f02eb25a191b608/magephi.gif)

Functionality
-------------

[](#functionality)

#### General

[](#general)

- `magephi prerequisites` to check if your system match the prerequisites to use the environment.
- `magephi import` to import a database and update the urls.
- `magephi update` to update Magephi.

#### Environment

[](#environment)

- `magephi create` Initialize a new project with the environment. See [here](#project-initialization) for more details about the command.
- `magephi install` to install the environment (build + start).
- `magephi status` to give you a quick look on the project status (equivalent to docker-compose ps and mutagen list).
- `magephi start` to start the environment.
- `magephi stop` to stop the environment.
- `magephi cache` to flush Magento and Redis cache.
- `magephi uninstall` to fully uninstall the environment. This will remove volumes and container but not the files on your local system.
- `magephi backup|restore` Generate or restore a backup of your database and environment configuration.

#### Docker

[](#docker)

- `magephi php|mysql|nginx|redis` to connect to containers.
- `magephi build` to build the containers. The docker/local/.env file must have been filled before.

#### Magento

[](#magento)

- `magephi magento:install` to install Magento after you have installed the environment.

Details
-------

[](#details)

#### Project initialization

[](#project-initialization)

You can initialize a project with the `magephi create`. If you are in an empty directory, the project will be installed inside it, if not you'll be asked for the project name and a directory with that name will be created and used as work directory.

At the same time as the Magento 2 dependency, some development dependencies are added.

Also, a custom .gitignore is set, you can have a look of the content [here](https://github.com/Fulmenef/magephi/blob/master/src/Command/Environment/CreateCommand.php#L118).

##### Composer

[](#composer)

- [Docker Magento 2](https://github.com/EmakinaFR/docker-magento2): Docker environment for your project
- [PhpStan](https://github.com/phpstan/phpstan): Static code analyser for PHP
- [PhpStan extension for Magento](https://github.com/bitExpert/phpstan-magento)
- [PhpCsFixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer): A tool to automatically fix PHP Coding Standards issues
- [Security Checker](https://github.com/sensiolabs/security-checker): Command line tool that checks if your application uses dependencies with known security vulnerabilities
- [Security Advisories](https://github.com/Roave/SecurityAdvisories): Composer tool to help to prevent installing packages with know vulnerabilities

##### Yarn

[](#yarn)

- [Husky](https://github.com/typicode/husky): Tool to trigger action on git hooks
- [Lint-Staged](https://github.com/okonet/lint-staged): Linter to apply checks on staged files, used with Husky.
- [Eslint](https://eslint.org/): Static code analyser for Javascript
- [Eslint extension for Magento](https://github.com/magento-research/magento-eslint)
- [Stylelint](https://stylelint.io/): Linter for LESS/CSS files

###### Example of configuration for Husky and Lint-Staged

[](#example-of-configuration-for-husky-and-lint-staged)

The following will run PHPCsFixer and PHPStan on each PHP and PHTML files, Stylelint for each LESS files and Eslint for javascript files each time you run a `git commit`.

```
// To be placed at the end of the package.json

"husky": {
    "hooks": {
        "pre-commit": "lint-staged --relative --shell"
    }
},
"lint-staged": {
    "!(app/etc/*).php|*.phtml": [
        "php ./vendor/bin/php-cs-fixer fix --config .php_cs",
        "php ./vendor/bin/phpstan analyze --level=max --no-progress"
    ],
    "app/code/YourVendor/**/*.less|app/design/frontend/YourVendor/**/*.less": [
        "php ./node_modules/.bin/stylelint --fix"
    ],
    "app/code/YourVendor/**/*.js|app/design/frontend/YourVendor/**/*.js": [
        "php ./node_modules/.bin/eslint --fix"
    ]
}
```

Contributing
------------

[](#contributing)

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

If you would like to see your environment managed by Magephi, please open an issue.

License
-------

[](#license)

[MIT](https://choosealicense.com/licenses/mit/)

###  Health Score

43

—

FairBetter than 91% of packages

Maintenance42

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 76.2% 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 ~45 days

Recently: every ~209 days

Total

43

Last Release

481d ago

Major Versions

0.9.4 → 1.0.02021-11-20

1.2.1 → 2.0.02023-10-18

PHP version history (8 changes)0.4.6PHP ^7.1.3

0.5.0PHP ^7.2

0.6.2PHP ^7.4

0.9.2PHP ^7.4.0

1.0.0PHP ^7.4.0|^8.0

1.1.0PHP &gt;=8.0.2

2.0.1PHP &gt;=8.1

2.1.0PHP ~8.2 || ~8.3 || ~8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/0a592c8694d706ffba54d413a331bf687b1ced3ed747dfaa15ac995d1d08cb3b?d=identicon)[Fulmenef](/maintainers/Fulmenef)

---

Top Contributors

[![Fulmenef](https://avatars.githubusercontent.com/u/17000257?v=4)](https://github.com/Fulmenef "Fulmenef (310 commits)")[![dependabot-preview[bot]](https://avatars.githubusercontent.com/in/2141?v=4)](https://github.com/dependabot-preview[bot] "dependabot-preview[bot] (95 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")

---

Tags

dockerhacktoberfestmagento2phpsymfonytoolbox

### Embed Badge

![Health badge](/badges/fulmenef-magephi/health.svg)

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

###  Alternatives

[deployer/deployer

Deployment Tool

11.0k25.4M207](/packages/deployer-deployer)[appwrite/server-ce

End to end backend server for frontend and mobile apps.

55.3k84.2k](/packages/appwrite-server-ce)[pragmarx/health

Laravel Server &amp; App Health Monitor and Notifier

2.0k1.0M2](/packages/pragmarx-health)[felixfbecker/language-server-protocol

PHP classes for the Language Server Protocol

22476.7M6](/packages/felixfbecker-language-server-protocol)[heroku/heroku-buildpack-php

Toolkit for starting a PHP application locally, with or without foreman, using the same config for PHP and Apache2/Nginx as on Heroku

8161.3M10](/packages/heroku-heroku-buildpack-php)[tiamo/phpas2

PHPAS2 is a php-based implementation of the EDIINT AS2 standard

4674.7k](/packages/tiamo-phpas2)

PHPackages © 2026

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