Skip to content

tillda/proman

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 

Repository files navigation

proman - your Project Manager!

This is basically a 3kb drop-in replacement for the "&" bash syntax :-).

It launches multiple commands in background from a fancy definition file proman.json and merges their standard output(s).

This README reflects: 0.4.0-beta1

Features

  • Simply launch multiple background servers, builders, watchers etc. with one command
  • Visual separators between outputs Screenshot
  • Reliable Ctrl+C : it kills all the launched processes and their children Screenshot
  • cmd-line utility proman reads proman.json from current directory
  • User-defined "error" strings in output trigger bell ring and a big "ERROR" bar Screenshot
  • all stderr output is marked with red dot Screenshot

Example output

ScreenShot

Install

npm install -g proman

Run

  • Create proman.json in your project directory. Use syntax specified below.
  • Run proman

Command-line syntax

  • proman launches all processes specified in proman.json
  • proman name launches process with a name name or all processes in a group name
  • proman name1 name2 ... launches processes or groups name1 name2 ...
  • proman name -c only shows the command(s) of name process/group
  • proman name -i shows table of information regarding name process/group Screenshot

Example process definition file

{
    "processes" : [
        {   "name": "clj-tdd",
            "group":"clj",
            "cwd":"editor",
            "cmd": "lein midje :autotest",
            "errorPatterns" : ["failed"]
        }, {
            "name": "livereload",
            "cwd" : "client",
            "delay" : 5000,
            "group" : "web",
            "cmd": "grunt watch --gruntfile Gruntfile-LiveReload.js"
        }, {
            "name": "devserver",
            "group": "web",
            "cwd":"devserver",
            "cmd": "node node_modules/gulp/bin/gulp.js"
        }, {
            "name": "staticserver",
            "group": "web",
            "cwd" : "staticserver",
            "cmd": "nodemon -w . -e js -- staticserver.js -p 6400 -e development -s ../client/build"
        }
    ],

    "errorPatterns" : ["Error:"]

}

Process definition syntax

  • .name (string) - required - this is how processes are referred to in proman
  • .cmd (string) - required - the command to run
  • .group (string) - optional - enables launching all processes in a group by one command
  • .cwd (string) - optional - if present changes working directory of a to-be launched process to this value
  • .delay (number - miliseconds) - optional - if present delays launching of the process by this time in ms
  • .disabled (boolean) - optional - skipped if true

Error patterns

Beta - work in progress!

Both individual processes and the main definition object can contain a errorPatterns key containing a list of strings. If any of this strings is found in the output a big ERROR bar is displayed and the system bell rings. This is (also) intended to help with TDD.

TODO

  • Simple keyboard shortcuts to restart one or more of the processes
  • Throttle (group) output lines by some time interval (300ms)
  • Add "color" option to processes

About

Background process launcher and output merger

Resources

Stars

Watchers

Forks

Packages

No packages published