Phive support for n98-magerun

With the growing number of Composer packages in the PHP Universe, we have more integrations. On the downside, we get more and more version conflicts. n98-magerun, especially Version 2, has to to deal with a wide range of dependencies. One of the advantages of n98-magerun is that you are able to manage multiple Magento versions with only one tool installation. This means that we as maintainer have to support various different Magento dependencies at once. Maybe this is not anymore possible in the future, according to unresolvable conflicts with new Magento dependencies.

This is one of the purposes that we recommend the use of the .phar distribution over of a Composer installation. Other tools have similar problems. That is why Phive was created.

What is Phive

Phive is a tool manage tool distributed as phar file. Have a look on to see a list of popular tools like PHPUnit, PHPStan, phpDoc etc. which can easily be installed with Phive.

New in the list of available tools is “n98-magerun” and “n98-magerun2”.

How does this works?

First, you install Phive on your machine.

Now you can install n98-magerun with Phive in your Project.

phive install n98-magerun
Phive downloads the .phar file and puts it under ~/.phive. In the project only a symlink will be generated. It is also possible to install different versions of one tool. Every project can have it’s own tool dependencies.

Phive creates a “phive.xml” file in your project root directory. In this file you can specify version contraint similar to composer’s contraints for the targeted tools.


For a good security, all phar files are checked against a GPG key. We added support for GPG Signature checks to our files.

On our download site, we provide the SHA-256 and the GPG Signature to verify the download manually. If you download with Phive, GPG verification is already included.

To download the GPG signature manually, add “.asc” to the download URL of the phar file.



GPG Signature:

A verification can be done with this script:

We hope you like the new additional way to download n98-magerun 1/2.

Have fun!



n98-magerun2 1.5.0 is available

Hi everyone,

after our last release before Magento Imagine 2017 we are back again with a new release for you guys.
The new release contains one new command and some ports of n98-magerun1 features to existing n98-magerun2 commands.
Also we fixed some bugs related to the DB logic or improved the developer console.

New Command index:trigger:recreate

The new command is handy to recreate triggers on the fly. If you are not familiar with the new index logic: If you change the index mode of an indexer in Magento 2 the system will create DB triggers on the fly.
If one of the “mview.xml” files is changed the triggers should be regenerated. Why do we need this command? With this command you can force to regenerate the triggers during develpment. It is not needed to wait for a cronjob which triggers the regeneration. Also there are some edgecases. A trigger is assigned to the DB user who created the trigger. It this user will be removed from the system the trigger is in an invalid state. With the new command you are able to recreate the triggers with the new user so that the trigger are can work again.

Developer Console

Are you a fan of the dev:console command and the useful “make” commands? If yes, you should know Jacques Bodin-Hullin,
He is a smart guy and had the initial idea of the stateful commands. The n98-magerun2 commands are a clone of the great Installer tool features.

Thanks Jacques!


The release contains a lot of refactoring work under the hood by Tom Klingenberg. He is currently streamlining some utility classes so that we can share the code between n98-magerun1 and n98-magerun2. Thanks Tom!

Complete Changelog

  • Fix: Add Phar checksum guide to readme (report by Max Chadwick, fix by Tom Klingenberg, #279)
  • Fix: Prevent exceptions in dev:console from being suppressed and hidden (by Jason Woods, #282)
  • Fix: Sync optimize() with Magerun1 (by Alexander Menk, #291)
  • Fix: Updates script command to have non-zero exit code (by Christian Münch)
  • Fix: customer:create shows incorrect notice (by Christian Münch, #289)
  • Imp: Streamline db:dump with Magerun (by Tom Klingenberg)
  • Imp: Optimize description of –add-time option (by Christian Münch, #281)
  • New: Add current Magento2 versions (by Kristof Ringleff, #292)
  • New: Port db:dump –exclude from Magerun 1 (by Torrey Tsui, #294)
  • New: Command index:trigger:recreate (by Christian Münch)




Magerun 2.0 is alive!

n98-magerun2 Logo

If you missed it: V2 of n98-magerun dedicated for Magento 2 is here!
We deployed it on November 11 before an exclusive “Stammtisch” after the official Magento 2 release.
As you can imagine we had to fix several issues after the official Magento 2 launch one day before.


Changed download URLs for phar version


Please note that the download of the phar version of n98-magerun from github is now deprecated.
We created a new file hub to deliver phar files of each version.

The new website will provide nightly builds of the development version.
Our goal is to remove the phar to reduce the repository size (i.e. for a faster composer installation) file from main repository in the next half year.

If n98-magerun is used in any automatization you should replace the download url to the new one.



Download Hub

If you visit the new download page you will see a list of links to the generated phar files.
The new site lists version of n98-magerun for Magento 1 and n98-magerun2 for Magento 2 on the same page.


The new phar file creation service will give us more speed to provide new versions of n98-magerun and n98-magerun2.
We hope you like the new service.