PMC

A simple and easy to use PM2 alternative

PMC (Process Management Controller) is a simple PM2 alternative written in Rust. It provides a command-line/api interface to start, stop, restart, and manage fork processes

Brought to you by theMackabu

2.0.0-rc1 (This is a prerelease)

New features and changes:

  • Migrated to scalar UI for docs
  • Add warning for non absolute paths
  • Export/Import from hcl templates
  • Ability to flush log files
  • Webui now shows servers and their graphs
  • Rewritten how metrics are pulled
// example.hcl
process "test_prod" {
  script = "node ./test.js"

  env {
    NODE_ENV = "production"
  }

  watch {
    path = "./test.js"
  }
}

process "test" {
  script = "node ./test.js"
}

Release v1.8.0

Skipping v1.7.0 binary release due to complications and issues with the code

New features and changes:

  • Ability to start/stop all processes
  • Fixed optional fields in config
  • [hotfix] Fixed child processes not killed
  • Revise remote command system
  • Improved UX in command line
  • Migrate to rustls-tls
  • Ability to restore process statues from dumpfile
  • All process related commands refactored to support id and name

Added commands usage:

# Save all processes to dumpfile
pmc save

# Restore all processes
pmc restore

# Add new Ssrver
pmc server new

# List servers
pmc server list [--format <format>]

# Remove server
pmc server remove <name>

# Set default server
pmc server default [<name>]

Release v1.6.4

Changes

  • added authentication to webui
  • ability to support rewritten paths
  • using templating system for variables
  • cleanup of webui code

Config sections

[daemon.web]
ui = true
api = false
address = "localhost"
path = "/pmc" # rewrite path
port = 5630

[daemon.web.secure]
enabled = true # webui enabled will display login page
token = "test_token"

Daemon webui

This release introduces a brand new optional webui The webui may either be toggled with pmc daemon restart --webui or in config.toml

[daemon.web]
ui = true
api = false # auto defaults to true on webui
address = "0.0.0.0"
port = 5630

v0.1.0 Welcome to PMC

Features:

  • Start, stop, and restart processes.
  • List all running processes with customizable output formats.
  • Retrieve detailed information about a specific process.
  • Use HTTP/rust api to control processes.

Usage:

# Start/Restart a process
pmc start <id/name> or <script> [--name <name>]

# Stop/Kill a process
pmc stop <id/name>

# Remove a process
pmc remove <id/name>

# Get process info
pmc info <id/name>

# Get process env
pmc env <id/name>

# List all processes
pmc list [--format <raw|json|default>]

# Get process logs
pmc logs <id/name> [--lines <num_lines>]