MMPM (MagicMirror Package Manager)
I’m the creator of MMPM, the MagicMirror Package Manager. Some of you may have used, or are currently using my CLI and Web interface to handle the installation and maintenance of your MagicMirror modules. However, truth be told, I was never very happy with how I had thrown the project together, and I will be releasing a completely revamped CLI and upgraded GUI. There are many major enhancements included in the upcoming release including tab autocompletion for the CLI.
Version 2.0 is set for release on 7/24/2020.
If you’ve used, or are currently using MMPM, you’ll notice a dramatic difference in the appearance of the web interface. The whole color scheme and styling is updated. Additionally, you’ll notice some new icons at the top.
The icon in the upper left will allow you toggle between a light and dark theme. The dark theme is shown in all the photos below. The two icons in the upper right with floating numeric values above them are the Available Upgrades and Active Processes (from left to right).
For any of the packages listed in the marketplace, your local packages, or your external packages, clicking on the description will give you more in-depth detail.
As for the Active Processes indicator, installing, removing, or upgrading packages will be placed into a queue, and executed in the background. In the photo below, you can see several packages are being installed. Once complete, the queue will be cleared.
By clicking on the Available Upgrades (the one that looks like a download logo), you can see the upgrades you have available, and pick which packages you’d like to upgrade on the spot. If MagicMirror or MMPM has upgrades, they’ll be shown in this dialog.
The config editor now accesses three files. As before, the MagicMirror’s config.js, can be edited, but now you can also edit MagicMirror’s custom.css file. The third file, mmpm-env.json, is a configuration file for MMPM. This file contains the path to the MagicMirror root directory, the PM2 process name associated with MagicMirror (if you are using PM2), the docker-compose file path (if using docker-compose), and whether or not MMPM is itself a Docker image. Editing this file in the config editor and reloading the web interface allows you to change environment configurations on the fly. This means you can have multiple MagicMirror directories on the same device, and hot-reload them into the MMPM CLI and/or GUI.
The Config Editor also includes autocompletion, syntax highlighting, and a good portion of features available in a default VSCode installation.
The Control Center has been massively upgraded, and now allows you to hide and show modules on the fly. The start, stop, and restart buttons for MagicMirror will work with PM2 and docker-compose. You will also have access to handy links through the Resources section, and can see the current environment settings (the values from mmpm-env.json) under the Environment Variables section. You’ll also be able to rotate the screen of your RaspberryPi (only RPi 3’s are supported for now) from the control center.
In the screenshot below, you can see all the brand new commands, and overview of the MMPM CLI. The CLI mimics much of Debian/Ubuntu’s apt-get interface. Each of the subcommands has it’s own help menu, along with numerous options.
As you can see, the output is significantly cleaner and more readable
Listing your installed packages will also output the directory in which they are installed, which is useful for switching between MagicMirror installations on the same device.
Many of the commands have options that allow for easy process substitution as well, as seen below:
You can get details about any installed or available package via the mmpm show command, and also utilize process substitution.
Invoking mmpm update will create a cached database of any modules that have available updates, which can later be upgraded via mmpm upgrade. You can see the list of available upgrades by executing mmpm list --upgradeable
You can also hide/show modules from the CLI, using options from the mmpm mm-ctl subcommand. Using mmpm mm-ctl --status will display which modules are active, and their current visibility.
Hiding/showing modules is instantanenous
I hope you’ll check out MMPM 2.0 when it’s released!
I saw your post yesterday on Reddit and I‘m looking forward to using it soon! Great job!
but beware however, this may break links to the required library versions on RPI for some modules
@Bugsounet Can you expand on your comment? There is also a docker image of MMPM available. Additionally all of the Python modules are installed with the --user flag by default, and the whole package can be installed in a virtualenv
@Fozi thanks! It’s definitely been a lot of fun to work on, and hopefully a lot of people will find it fun to use