Unitech/pm2 — pull request #608 by rlidwka (2014-08-01 21:32:42+00:00)
Title: remove padding from descriptions

With this and https://github.com/visionmedia/commander.js/issues/236 patch --help output would look like this:

```
$ ./pm2

Usage: pm2 [cmd] app

Commands:

start [options] start and daemonize an app
deploy deploy your json
startOrRestart start or restart JSON file
stop [options] stop a process (to start it again, do pm2 restart )
restart [options] restart a process
reload reload processes (note that its for app using HTTP/HTTPS)
gracefulReload gracefully reload a process. Send a "shutdown" message to close all connections.
delete stop and delete a process from pm2 process list
sendSignal send a system signal to the target process
ping ping pm2 daemon - if not up it will launch it
updatePM2 updatePM2 after a npm update
interact [secret_key] [public_key] [machine_name] launch agent to interact with Keymetrics
killInteract stop agent
infoInteract get information about agent
web launch an health API on port 9615
dump dump all processes for resurrecting them later
save (alias) dump all processes for resurrecting them later
resurrect resurrect previously dumped processes
startup auto resurect process at startup. [platform] = ubuntu, centos, gentoo or systemd
generate generate an ecosystem.json configuration file
ecosystem generate an ecosystem.json configuration file
describe describe all parameters of a process id
desc describe all parameters of a process id
list list all processes
ls (alias) list all processes
l (alias) list all processes
status (alias) list all processes
jlist list all processes in JSON format
prettylist print json in a prettified JSON
monit launch termcaps monitoring
m (alias) launch termcaps monitoring
flush flush logs
reloadLogs reload all logs
logs [id|name] stream logs file. Default stream all logs
ilogs advanced interface to display logs
kill kill daemon
* undefined

Options:

-h, --help output usage information
-V, --version output the version number
-v --version get version
-s --silent hide all messages
-m --mini-list display a compacted list without formatting
-f --force force actions
-n --name set a for script
-i --instances launch [number] instances (for networked app)(load balanced)
-o --output specify out log file
-e --error specify error log file
-p --pid specify pid file
--env specify environment to get specific env variables (for JSON declaration)
-x --execute-command execute a program using fork system
-u --user define user when generating startup script
-c --cron restart a running process based on a cron pattern
-w --write write configuration in local folder
--interpreter the interpreter pm2 should use for executing app (bash, python...)
--log-date-format add custom prefix timestamp to logs
--no-daemon run pm2 daemon in the foreground if it doesn't exist already
--merge-logs merge logs from different instances but keep error and out separated
--watch watch application folder for changes
--node-args space delimited arguments to pass to node in cluster mode - e.g. --node-args="--debug=7001 --trace-deprecation"
--run-as-user The user or uid to run a managed process as
--run-as-group The group or gid to run a managed process as
--no-color skip colors

Basic Examples:

Start an app using all CPUs available + set a name :
$ pm2 start app.js -i max --name "api"

Restart the previous app launched, by name :
$ pm2 restart api

Stop the app :
$ pm2 stop api

Restart the app that is stopped :
$ pm2 restart api

Remove the app from the process list :
$ pm2 delete api

Kill daemon pm2 :
$ pm2 kill

Update pm2 :
$ npm install pm2@latest -g ; pm2 updatePM2

More examples in https://github.com/Unitech/pm2#usagefeatures

Deployment help:

$ pm2 deploy help

```