Skip to content
README.md 1.31 KiB
Newer Older
theMackabu's avatar
theMackabu committed
# Process Management Controller (PMC)

## Overview

theMackabu's avatar
theMackabu committed
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
theMackabu's avatar
theMackabu committed

## Features

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

## Usage

```bash
theMackabu's avatar
theMackabu committed
# Start/Restart a process
theMackabu's avatar
theMackabu committed
pmc start <id> or <script> [--name <name>]

theMackabu's avatar
theMackabu committed
# Stop/Kill a process
theMackabu's avatar
theMackabu committed
pmc stop <id>

theMackabu's avatar
theMackabu committed
# Remove a process
theMackabu's avatar
theMackabu committed
pmc remove <id>

theMackabu's avatar
theMackabu committed
# Get process info
theMackabu's avatar
theMackabu committed
pmc info <id>

theMackabu's avatar
theMackabu committed
# Get process env
pmc env <id>

theMackabu's avatar
theMackabu committed
# List all processes
theMackabu's avatar
theMackabu committed
pmc list [--format <raw|json|default>]

theMackabu's avatar
theMackabu committed
# Get process logs
theMackabu's avatar
theMackabu committed
pmc logs <id> [--lines <num_lines>]
```

theMackabu's avatar
theMackabu committed
For more commands, check out `pmc --help`
theMackabu's avatar
theMackabu committed

theMackabu's avatar
theMackabu committed
### Installation
theMackabu's avatar
theMackabu committed

Pre-built binaries for Linux, MacOS, and WSL can be found on the [releases](releases) page.

There is no windows support yet. Install from crates.io using `cargo install pmc` (requires clang++)
theMackabu's avatar
theMackabu committed

#### Building
theMackabu's avatar
theMackabu committed

theMackabu's avatar
theMackabu committed
- Clone the project
- Open a terminal in the project folder
- Check if you have cargo (Rust's package manager) installed, just type in `cargo`
- If cargo is installed, run `cargo build --release`
- Put the executable into one of your PATH entries, usually `/bin/` or `/usr/bin/`