Skip to content

max-mapper/monu

Repository files navigation

Monu

app.png

Monu is an open source process monitoring menu bar application for Mac OS. You can configure Monu to launch programs, and when Monu starts up it will start them. Additionally, it will monitor the processes and restart them if they crash.

Monu is a portmanteau of 'monitor' and 'menu'. It has two C/C++ dependencies, Electron (which includes iojs) and the mon process monitor.

Monu is currently ALPHA STATUS and is intended for developers/early adopters.

To download the latest version visit the releases page

js-standard-style

Build Status

screenshot.png

How to use Monu

To configure Monu, click 'Open Config Folder' and open 'config.json' in a text editor. When you save and return to Monu your new configuration will be automatically loaded.

Be sure your JSON syntax is valid when editing the configuration. Here are supported options. These should be added as top level key/value pairs to 'config.json':

  • processes the processes to run (see below)
  • logs the directory to store logs in (default config/logs)
  • pids the directory to store PIDs in (default config/pids)
  • on-error a command to run when a process cannot start (default none)
  • on-restart a command to run when a process restarts (default none)
  • sleep sleep seconds before re-executing (default 1)
  • attempts restart attempts within 60 seconds before stopping app (default 10)
  • prefix add a string prefix to the log (default none)
Adding Processes

In the 'config.json' file add processes to the 'processes' key. The key must be a name (lowercase letters and hypens) and the value must be the launch command. For example:

{
  "logs": "./logs",
  "pids": "./pids",
  "processes": {
    "web-1": "http-server . -p 8081",
    "web-2": "http-server . -p 8082",
    "web-3": "http-server . -p 8083"
  }
}
Launch on Startup

When you open Monu.app, it will start all configured processes.

If you would like Monu.app to start when your Mac starts up, got to System Preferences > Users and Groups and add Monu.app to Login Items for your User.

Developing
npm install # installs electron and all the deps needed for monu
npm start # runs the app in the electron wrapper
npm run build # builds the mac app
Publishing

Before publishing, make sure that your repo is clean, and that you've created a tag for the latest commit. npm version [major|minor|patch] will do this for you, increasing the package.json version, creating a commit and adding a tag.

You should see something like this:

🐈  make publish
rm -rf Monu.app Monu.zip # prevent duplicates in the final bundle
npm run build

> [email protected] build /Users/maxogden/src/js/monu
> electron-packager . Monu --platform=darwin --arch=x64 --version=0.26.0 --ignore=node_modules/electron

Wrote new app to /Users/maxogden/src/js/monu/Monu.app
ditto -c -k --sequesterRsrc --keepParent Monu.app Monu.zip
npm run publish

> [email protected] publish /Users/maxogden/src/js/monu
> publish-release --template notes.md --assets Monu.zip

? Git Tag: v1.0.4
? Github repository owner: maxogden
? Github repository name: monu
? Release Name: Monu v1.0.4 Alpha

Uploading Monu.zip
[=================================================>] 100.0% (1.17 MB/s)
Done! Published at: https://github.com/maxogden/monu/releases/tag/v1.0.4