id = "pm2"
name = "PM2"
homepage = "https://pm2.keymetrics.io"
description = "Production process manager for Node.js applications with a built-in load balancer."
icon = "theSVG:pm2"
executables = ["pm2"]
[dotfiles]
paths = ["~/.pm2/module_conf.json"]
exclude = [
"~/.pm2/logs/",
"~/.pm2/pm2.log",
"~/.pm2/dump.pm2",
]
secret = []
[commands]
format = 1
label = "PM2 processes"
description = "Start, restart, stop and delete managed processes. Deploy, ecosystem files, startup scripts and monitoring are left out."
quality = "ai-draft"
base = "fig:pm2"
parser = { end_of_options = "--", interleave = "permute", long_equals = true, short_attached = true, short_bundles = false }
[[commands.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/pm2.ts"
license = "MIT"
[[commands.subcommand]]
path = ["start"]
label = "Start an app"
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/pm2.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "script"
label = "Script, app name or id"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "name"
label = "Process name"
type = "string"
option = ["--name", "-n"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "instances"
label = "Instances"
type = "integer"
option = ["--instances", "-i"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "max_memory"
label = "Restart above memory"
type = "string"
option = ["--max-memory-restart"]
suggestions = [{ value = "100M", label = "100M" }, { value = "500M", label = "500M" }, { value = "1G", label = "1G" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "cron"
label = "Cron restart pattern"
type = "string"
option = ["--cron", "-c"]
sources = ["fig"]
[[commands.subcommand.field]]
id = "interpreter"
label = "Interpreter"
type = "string"
option = ["--interpreter"]
suggestions = [{ value = "bash", label = "bash" }, { value = "python", label = "python" }, { value = "node", label = "node" }]
sources = ["fig"]
[[commands.subcommand.field]]
id = "cwd"
label = "Working directory"
type = "path"
option = ["--cwd"]
path = { kind = "directory", role = "input" }
sources = ["fig"]
[[commands.subcommand.field]]
id = "update_env"
label = "Update environment"
type = "boolean"
option = ["--update-env", "-a"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "start"
label = "Start a script"
fields = ["script", "name", "instances", "max_memory", "cron", "interpreter", "cwd", "update_env"]
required = ["script"]
[[commands.subcommand.task]]
id = "cluster"
label = "Start as cluster"
fields = ["script", "name", "instances"]
required = ["script", "instances"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["script", "name", "instances", "max_memory"]
[[commands.subcommand.group]]
id = "advanced"
label = "Advanced"
fields = ["cron", "interpreter", "cwd", "update_env"]
[[commands.subcommand]]
path = ["restart"]
label = "Restart a process"
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/pm2.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "target"
label = "Id, name or all"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.field]]
id = "update_env"
label = "Update environment"
type = "boolean"
option = ["--update-env", "-a"]
sources = ["fig"]
[[commands.subcommand.task]]
id = "restart"
label = "Restart"
fields = ["target", "update_env"]
required = ["target"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["target", "update_env"]
[[commands.subcommand]]
path = ["stop"]
label = "Stop a process"
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/pm2.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "target"
label = "Id, name or all"
type = "string"
position = 0
sources = ["fig"]
[[commands.subcommand.task]]
id = "stop"
label = "Stop"
fields = ["target"]
required = ["target"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["target"]
[[commands.subcommand]]
path = ["delete"]
label = "Delete a process"
description = "Stops the process and removes it from the pm2 list."
[[commands.subcommand.source]]
id = "fig"
kind = "completion"
url = "https://github.com/withfig/autocomplete/blob/master/src/pm2.ts"
license = "MIT"
[[commands.subcommand.field]]
id = "target"
label = "Id, name or all"
type = "string"
position = 0
effect = "delete"
sources = ["fig"]
[[commands.subcommand.task]]
id = "delete"
label = "Delete"
fields = ["target"]
required = ["target"]
[[commands.subcommand.group]]
id = "basic"
label = "Basic"
fields = ["target"]