{"id":31757274,"url":"https://github.com/entrepeneur4lyf/pmdaemon","last_synced_at":"2025-10-09T19:55:33.418Z","repository":{"id":295450507,"uuid":"990150063","full_name":"entrepeneur4lyf/pmdaemon","owner":"entrepeneur4lyf","description":"A high-performance, cross-platform process manager built in Rust, inspired by PM2","archived":false,"fork":false,"pushed_at":"2025-05-30T15:23:21.000Z","size":3501,"stargazers_count":95,"open_issues_count":2,"forks_count":5,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-10-04T22:02:27.631Z","etag":null,"topics":["crate","crates-io","memory-management","pm2","process-management","process-manager","process-supervision","process-supervisor","rust"],"latest_commit_sha":null,"homepage":"https://entrepeneur4lyf.github.io/pmdaemon/","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/entrepeneur4lyf.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-05-25T15:52:36.000Z","updated_at":"2025-10-04T00:15:30.000Z","dependencies_parsed_at":"2025-05-25T16:43:20.083Z","dependency_job_id":null,"html_url":"https://github.com/entrepeneur4lyf/pmdaemon","commit_stats":null,"previous_names":["entrepeneur4lyf/pmdaemon"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/entrepeneur4lyf/pmdaemon","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepeneur4lyf%2Fpmdaemon","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepeneur4lyf%2Fpmdaemon/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepeneur4lyf%2Fpmdaemon/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepeneur4lyf%2Fpmdaemon/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/entrepeneur4lyf","download_url":"https://codeload.github.com/entrepeneur4lyf/pmdaemon/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/entrepeneur4lyf%2Fpmdaemon/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279001948,"owners_count":26083244,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["crate","crates-io","memory-management","pm2","process-management","process-manager","process-supervision","process-supervisor","rust"],"created_at":"2025-10-09T19:55:31.752Z","updated_at":"2025-10-09T19:55:33.413Z","avatar_url":"https://github.com/entrepeneur4lyf.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv style=\"background-color: #1b252f; color: white; padding: 20px; text-align: center; border-radius: 8px;\"\u003e\n  \u003cimg src=\"assets/logo.png\" alt=\"PMDaemon Logo\" style=\"height: 60px; display: block; margin: 0 auto 10px;\"\u003e\n  \u003ch1 style=\"margin: 0; color: white;\"\u003ePMDaemon - Advanced Process Manager\u003c/h1\u003e\n  \u003cp style=\"margin: 5px 0 0; color: #cccccc;\"\u003eA high-performance, cross-platform process manager built in Rust\u003c/p\u003e\n\u003c/div\u003e\n\n[![GitHub Stars](https://img.shields.io/github/stars/entrepeneur4lyf/pmdaemon?style=flat-square)](https://github.com/entrepeneur4lyf/pmdaemon/stargazers)\n[![Crates.io Version](https://img.shields.io/crates/v/pmdaemon?style=flat-square)](https://crates.io/crates/pmdaemon)\n[![Crates.io Downloads](https://img.shields.io/crates/d/pmdaemon?style=flat-square)](https://crates.io/crates/pmdaemon)\n[![License](https://img.shields.io/badge/license-MIT-blue?style=flat-square)](LICENSE-MIT)\n[![Build Status](https://img.shields.io/github/actions/workflow/status/entrepeneur4lyf/pmdaemon/ci.yml?branch=main\u0026style=flat-square)](https://github.com/entrepeneur4lyf/pmdaemon/actions/workflows/ci.yml?query=branch%3Amain)\n[![Rust](https://img.shields.io/badge/rust-1.70+-orange.svg?style=flat-square)](https://www.rust-lang.org)\n[![Test Coverage](https://img.shields.io/badge/tests-272%20passing-brightgreen.svg?style=flat-square)](https://github.com/entrepeneur4lyf/pmdaemon)\n\nA high-performance, **cross-platform** process manager built in Rust, inspired by PM2 with innovative features that exceed the original. PMDaemon runs natively on **Linux, Windows, and macOS** and is designed for modern application deployment with advanced port management, real-time monitoring, and production-ready web APIs.\n\n## 📑 Table of Contents\n\n- [Key Features](#-key-features)\n- [Installation](#-installation)\n- [Quick Start](#-quick-start)\n- [Command Reference](#-command-reference)\n- [Configuration Options](#-configuration-options)\n- [Web API](#-web-api)\n- [Monitoring](#-monitoring)\n- [Comparison with PM2](#-comparison-with-pm2)\n- [Library Usage](#-library-usage)\n- [Testing](#-testing)\n- [Roadmap](#-roadmap)\n- [Contributing](#-contributing)\n- [License](#-license)\n\n## The CLI ##\n![PMDaemon CLI](assets/cli.png)\n\n## 🚀 Key Features\n\n### Core Process Management\n- **Process Lifecycle** - Start, stop, restart, reload, and enhanced delete operations\n- **Enhanced Delete Operations** - Bulk deletion, status-based deletion, and safe process shutdown\n- **Clustering** - Run multiple instances with automatic load balancing\n- **Auto-restart** - Automatic restart on crashes with configurable limits\n- **Signal Handling** - Graceful shutdown with SIGTERM/SIGINT and custom signals\n- **Configuration Persistence** - Process configs saved and restored between sessions\n- **🆕 Ecosystem Config Files** - Manage multiple applications with JSON, YAML, or TOML config files\n\n### Advanced Monitoring \u0026 Health Checks\n- **Real-time Monitoring** - CPU, memory, uptime tracking with system metrics\n- **Memory Limit Enforcement** - Automatic restart when processes exceed memory limits\n- **HTTP Health Checks** - Monitor process health via HTTP endpoints with configurable timeouts\n- **Script-based Health Checks** - Custom health check scripts for complex validation\n- **Blocking Start Command** - Wait for processes to be healthy before returning from start command\n- **Log Management** - Separate stdout/stderr files with viewing and following\n\n### 🌟 Innovative Port Management (Beyond PM2)\n- **Port Range Distribution** - Automatically distribute consecutive ports to cluster instances\n- **Auto-assignment** - Find first available port in specified range\n- **Conflict Detection** - Prevent port conflicts at the process manager level\n- **Runtime Port Overrides** - Change ports during restart without modifying saved config\n- **Port Visibility** - Display assigned ports in process listings\n\n### Web API \u0026 Real-time Updates\n- **REST API** - Full process management via HTTP with PM2-compatible responses\n- **WebSocket Support** - Live process status and system metrics streaming\n- **Production Web Server** - Built on Axum with CORS and security headers\n\n### 🌍 Cross-Platform Support\n- **Native Windows Support** - Full functionality on Windows with platform-optimized process management\n- **Native macOS Support** - Complete support for both Intel and Apple Silicon Macs\n- **Native Linux Support** - Optimized for Linux servers and development environments\n- **Unified API** - Same commands and features work identically across all platforms\n- **Platform-Specific Optimizations** - Tailored signal handling and process termination for each OS\n\n## 📦 Installation\n\n### From Source (All Platforms)\n```bash\ngit clone https://github.com/entrepeneur4lyf/pmdaemon\ncd pmdaemon\ncargo build --release\n```\n\n**Linux/macOS:**\n```bash\nsudo cp target/release/pmdaemon /usr/local/bin/\n```\n\n**Windows:**\n```cmd\ncopy target\\release\\pmdaemon.exe C:\\Windows\\System32\\\n```\n\n### Using Cargo (All Platforms)\n```bash\ncargo install pmdaemon\n```\n\n### Pre-built Binaries\nDownload platform-specific binaries from [GitHub Releases](https://github.com/entrepeneur4lyf/pmdaemon/releases):\n- **Linux**: `pmdaemon-linux-x86_64`\n- **Windows**: `pmdaemon-windows-x86_64.exe`\n- **macOS Intel**: `pmdaemon-macos-x86_64`\n- **macOS Apple Silicon**: `pmdaemon-macos-aarch64`\n\n## 🚀 Quick Start\n\n\u003e **Cross-Platform Note**: All commands below work identically on Linux, Windows, and macOS. PMDaemon automatically handles platform-specific differences internally.\n\n### Basic Process Management\n```bash\n# Start a process\npmdaemon start app.js --name myapp\n\n# List all processes\npmdaemon list\n\n# Stop a process\npmdaemon stop myapp\n\n# Restart a process\npmdaemon restart myapp\n\n# Delete a process (stops if running)\npmdaemon delete myapp\n\n# Delete all processes\npmdaemon delete all --force\n\n# Delete processes by status\npmdaemon delete stopped --status --force\n```\n\n### Clustering with Port Management\n```bash\n# Start 4 instances with port range\npmdaemon start server.js --instances 4 --port 4000-4003\n\n# Auto-assign ports from range\npmdaemon start worker.js --port auto:5000-5100\n\n# Runtime port override (doesn't modify saved config)\npmdaemon restart myapp --port 3001\n```\n\n### Ecosystem Configuration Files\n```bash\n# Start all apps from config file (JSON, YAML, or TOML)\npmdaemon --config ecosystem.json start\n\n# Start specific app from config file\npmdaemon --config ecosystem.yaml start --name my-web-app\n\n# Example ecosystem.json\n{\n  \"apps\": [\n    {\n      \"name\": \"web-server\",\n      \"script\": \"node\",\n      \"args\": [\"server.js\"],\n      \"instances\": 2,\n      \"port\": \"3000-3001\",\n      \"env\": {\n        \"NODE_ENV\": \"production\"\n      }\n    }\n  ]\n}\n```\n\n### Memory Limits and Monitoring\n```bash\n# Set memory limit with auto-restart\npmdaemon start app.js --max-memory 100M\n\n# Real-time monitoring with configurable intervals\npmdaemon monit --interval 2\n\n# View logs\npmdaemon logs myapp\n\n# Follow logs in real-time\npmdaemon logs myapp --follow\n```\n\n### Health Checks and Blocking Start\n```bash\n# Start with HTTP health check and wait for ready\npmdaemon start app.js --health-check-url http://localhost:9615/health --wait-ready\n\n# Start with script-based health check\npmdaemon start worker.js --health-check-script ./health-check.sh --wait-ready\n\n# Custom health check timeout\npmdaemon start api.js --health-check-url http://localhost:9615/status --wait-timeout 30s\n```\n\n### Web API Server\n```bash\n# Start web API server for remote monitoring (no authentication)\npmdaemon web --port 9615 --host 127.0.0.1\n\n# Start with API key authentication (recommended for production)\npmdaemon web --api-key \"your-secret-api-key\"\n```\n\n## 📋 Command Reference\n\n| Command     | Description                | Example                                |\n|-------------|----------------------------|----------------------------------------|\n| `start`     | Start a new process        | `pmdaemon start app.js --name myapp`  |\n|             | Start from config file     | `pmdaemon --config ecosystem.json start` |\n| `stop`      | Stop a process             | `pmdaemon stop myapp`                 |\n| `restart`   | Restart a process          | `pmdaemon restart myapp`              |\n| `reload`    | Graceful restart           | `pmdaemon reload myapp`               |\n| `delete`    | Delete process(es)         | `pmdaemon delete myapp`               |\n|             | Delete all processes       | `pmdaemon delete all --force`         |\n|             | Delete by status           | `pmdaemon delete stopped --status`   |\n| `list`      | List all processes         | `pmdaemon list`                       |\n| `monit`     | Real-time monitoring       | `pmdaemon monit --interval 2`         |\n| `logs`      | View/follow process logs   | `pmdaemon logs myapp --follow`        |\n| `info`      | Process details            | `pmdaemon info myapp`                 |\n| `web`       | Start web API server       | `pmdaemon web --port 9615`            |\n\n## 🔧 Configuration Options\n\n### Ecosystem Configuration Files\n\nPMDaemon supports ecosystem configuration files in JSON, YAML, and TOML formats for managing multiple applications:\n\n```bash\n# Use ecosystem config file\npmdaemon --config ecosystem.json start\n\n# Start specific app from config\npmdaemon --config ecosystem.yaml start --name web-server\n```\n\n**Example ecosystem.json:**\n```json\n{\n  \"apps\": [\n    {\n      \"name\": \"web-server\",\n      \"script\": \"node\",\n      \"args\": [\"server.js\"],\n      \"instances\": 2,\n      \"port\": \"3000-3001\",\n      \"env\": {\n        \"NODE_ENV\": \"production\"\n      },\n      \"health_check_url\": \"http://localhost:3000/health\"\n    },\n    {\n      \"name\": \"api-service\",\n      \"script\": \"python\",\n      \"args\": [\"api.py\"],\n      \"cwd\": \"/path/to/api\",\n      \"max_memory_restart\": \"512M\"\n    }\n  ]\n}\n```\n\n**Supported config formats:**\n- `ecosystem.json` - JSON format\n- `ecosystem.yaml` / `ecosystem.yml` - YAML format\n- `ecosystem.toml` - TOML format\n\nSee [CONFIG_USAGE.md](examples/CONFIG_USAGE.md) for detailed ecosystem configuration documentation.\n\n### Process Configuration\n```bash\npmdaemon start app.js \\\n  --name \"my-app\" \\\n  --instances 4 \\\n  --port 3000-3003 \\\n  --max-memory 512M \\\n  --env NODE_ENV=production \\\n  --cwd /path/to/app \\\n  --log-file /var/log/app.log \\\n  --health-check-url http://localhost:9615/health \\\n  --wait-ready\n```\n\n### Port Management Options\n\n| Option                      | Description                            | Example                    |\n|-----------------------------|----------------------------------------|----------------------------|\n| `--port 3000`               | Single port assignment                 | Assigns port 3000          |\n| `--port 3000-3005`          | Port range for clusters                | Distributes 3000-3005      |\n| `--port auto:4000-4100`     | Auto-find available port               | First available in range   |\n\n### Health Check Options\n\n| Option                           | Description                            | Example                         |\n|----------------------------------|----------------------------------------|---------------------------------|\n| `--health-check-url \u003curl\u003e`       | HTTP endpoint for health checks        | `http://localhost:9615/health` |\n| `--health-check-script \u003cpath\u003e`   | Script to run for health validation    | `./scripts/health-check.sh`     |\n| `--health-check-timeout \u003ctime\u003e`  | Timeout for individual health checks   | `5s`, `30s`, `1m`               |\n| `--health-check-interval \u003ctime\u003e` | Interval between health checks         | `10s`, `30s`, `1m`              |\n| `--health-check-retries \u003cnum\u003e`   | Number of retries before failure       | `3`, `5`, `10`                  |\n| `--wait-ready`                   | Block start until health checks pass   | Boolean flag                    |\n| `--wait-timeout \u003ctime\u003e`          | Timeout for blocking start             | `30s`, `1m`, `5m`               |\n\n### Delete Options\n\n| Option                      | Description                            | Example                         |\n|-----------------------------|----------------------------------------|---------------------------------|\n| `delete \u003cname\u003e`             | Delete single process by name/ID       | `pmdaemon delete myapp`         |\n| `delete all`                | Delete all processes                   | `pmdaemon delete all`           |\n| `delete \u003cstatus\u003e --status`  | Delete processes by status             | `pmdaemon delete stopped --status` |\n| `--force` / `-f`            | Skip confirmation prompts             | `pmdaemon delete all --force`   |\n\n**Valid statuses for `--status` flag:**\n- `starting` - Processes currently starting up\n- `online` - Running processes\n- `stopping` - Processes currently shutting down\n- `stopped` - Processes that have exited\n- `errored` - Processes that crashed or failed\n- `restarting` - Processes currently restarting\n\n**Safety Features:**\n- All delete operations automatically stop running processes before deletion\n- Interactive confirmation prompts for bulk operations (unless `--force` is used)\n- Graceful process shutdown with proper cleanup of files and ports\n- Clear feedback showing how many processes were stopped vs. deleted\n\n## 🌐 Web API\n\nPMDaemon provides a comprehensive REST API with optional authentication:\n\n### Security Features\n- **API Key Authentication** - Secure your API with keys\n- **Process Management Only** - Cannot create new processes for security\n- **Production Ready** - Built with security best practices\n\n### Endpoints\n\n| Method   | Endpoint                    | Description                  | Auth Required |\n|----------|----------------------------|------------------------------|---------------|\n| `GET`    | `/api/processes`           | List all processes           | ✅            |\n| `POST`   | `/api/processes/:id/start` | Start existing process       | ✅            |\n| `DELETE` | `/api/processes/:id`       | Stop/delete a process        | ✅            |\n| `GET`    | `/api/system`              | System metrics               | ✅            |\n| `GET`    | `/api/logs/:id`            | Process logs                 | ✅            |\n| `WS`     | `/ws`                      | Real-time updates            | ❌            |\n\n### Example API Usage\n```bash\n# Start with authentication\npmdaemon web --api-key \"your-secret-key\"\n\n# List processes (with API key)\ncurl -H \"Authorization: Bearer your-secret-key\" \\\n     http://localhost:9615/api/processes\n\n# Start an existing process (processes created via CLI only)\ncurl -X POST \\\n     -H \"Authorization: Bearer your-secret-key\" \\\n     http://localhost:9615/api/processes/my-app/start\n\n# WebSocket for real-time updates\nwscat -c ws://localhost:9615/ws\n```\n\n## 📊 Monitoring\n\nPMDaemon provides comprehensive monitoring capabilities:\n\n### Real-time Metrics\n- CPU usage percentage\n- Memory usage (RSS)\n- Process uptime\n- Restart count\n- Port assignments\n- Process state\n- Process ID (PID) for debugging\n\n### Configurable Monitoring\n- **Configurable update intervals** - Customize refresh rates (1s, 2s, 5s, etc.)\n- **Beautiful table formatting** - Professional display using comfy-table\n- **Color-coded status indicators** - Visual process state identification\n- **System overview** - CPU, memory, load average, and uptime\n\n### Log Management\n- Separate stdout/stderr files\n- **Real-time log following** - `tail -f` functionality for live log monitoring\n- **Configurable log retrieval** - Get last N lines from log files\n- **Missing file handling** - Graceful handling of non-existent log files\n- HTTP log access via API\n\n## 🆚 PMDaemon vs PM2\n\n| Feature                          | PMDaemon | PM2 |\n|----------------------------------|:--------:|:---:|\n| Port range distribution          |    ✅    |  ❌  |\n| Auto port assignment             |    ✅    |  ❌  |\n| Runtime port override            |    ✅    |  ❌  |\n| Built-in port conflict detection |    ✅    |  ❌  |\n| HTTP health checks               |    ✅    |  ❌  |\n| Script-based health checks       |    ✅    |  ❌  |\n| Blocking start command           |    ✅    |  ❌  |\n| **Configurable monitor intervals** |    ✅    |  ❌  |\n| **Real-time log following**      |    ✅    |  ❌  |\n| **Professional table formatting** |    ✅    |  ❌  |\n| **PID display in monitoring**    |    ✅    |  ❌  |\n| **Enhanced delete operations**   |    ✅    |  ❌  |\n| **Bulk deletion (delete all)**   |    ✅    |  ❌  |\n| **Status-based deletion**        |    ✅    |  ❌  |\n| **Safe process shutdown**        |    ✅    |  ❌  |\n| Memory limit enforcement         |    ✅    |  ✅  |\n| WebSocket real-time updates      |    ✅    |  ❌  |\n| **Native Windows support**       |    ✅    |  ❌  |\n| **Native macOS support**         |    ✅    |  ❌  |\n| **Cross-platform compatibility** |    ✅    |  ❌  |\n| Rust performance                 |    ✅    |  ❌  |\n| PM2-compatible API               |    ✅    |  ✅  |\n\n## Process Flowchart\n\n```mermaid\ngraph TD\n\n    User[\"User\u003cbr\u003eExternal Actor\"]\n    subgraph PMDaemon[\"PMDaemon Application\u003cbr\u003eRust\"]\n        CLI[\"CLI Entry Point\u003cbr\u003eRust\"]\n\n        subgraph WebLayer[\"Web Layer\"]\n            WebAPI[\"Web API Server\u003cbr\u003eAxum / HTTP\"]\n            Auth[\"API Key Authentication\u003cbr\u003eMiddleware\"]\n            WebSocket[\"WebSocket Handler\u003cbr\u003eReal-time Updates\"]\n        end\n\n        subgraph CoreLayer[\"Core Management Layer\"]\n            ProcessManager[\"Process Manager\u003cbr\u003eCore Orchestrator\"]\n            PortManager[\"Port Manager\u003cbr\u003eAllocation \u0026 Conflicts\"]\n            ConfigService[\"Configuration Service\u003cbr\u003eJSON/YAML/TOML\"]\n        end\n\n        subgraph MonitoringLayer[\"Monitoring \u0026 Health Layer\"]\n            HealthMonitor[\"Health Monitor\u003cbr\u003eHTTP \u0026 Script Checks\"]\n            SystemMonitor[\"System Monitor\u003cbr\u003eCPU/Memory/Load\"]\n            ProcessMonitor[\"Process Monitor\u003cbr\u003eIndividual Process Metrics\"]\n        end\n\n        subgraph ProcessLayer[\"Process Execution Layer\"]\n            ProcessExecution[\"Process Execution\u003cbr\u003eSpawn \u0026 Control\"]\n            SignalHandler[\"Signal Handler\u003cbr\u003eOS Signal Management\"]\n            LogManager[\"Log Manager\u003cbr\u003estdout/stderr Capture\"]\n        end\n\n        %% Web Layer Connections\n        WebAPI --\u003e|Authenticates via| Auth\n        Auth --\u003e|Authorized requests to| ProcessManager\n        WebAPI --\u003e|Real-time updates via| WebSocket\n        WebSocket --\u003e|Broadcasts from| SystemMonitor\n\n        %% CLI Connections\n        CLI --\u003e|Direct commands to| ProcessManager\n\n        %% Core Layer Connections\n        ProcessManager --\u003e|Manages ports via| PortManager\n        ProcessManager --\u003e|Loads/saves config via| ConfigService\n        ProcessManager --\u003e|Controls processes via| ProcessExecution\n        ProcessManager --\u003e|Coordinates monitoring via| HealthMonitor\n        ProcessManager --\u003e|Gets metrics from| SystemMonitor\n\n        %% Monitoring Connections\n        HealthMonitor --\u003e|Checks health of| ProcessExecution\n        ProcessMonitor --\u003e|Monitors individual| ProcessExecution\n        SystemMonitor --\u003e|Aggregates data from| ProcessMonitor\n\n        %% Process Layer Connections\n        ProcessExecution --\u003e|Handles signals via| SignalHandler\n        ProcessExecution --\u003e|Captures logs via| LogManager\n        ProcessExecution --\u003e|Uses config from| ConfigService\n        ProcessExecution --\u003e|Reports to| ProcessMonitor\n    end\n\n    %% External Connections\n    User --\u003e|CLI Commands| CLI\n    User --\u003e|HTTP/WebSocket| WebAPI\n\n    %% External Systems\n    ProcessExecution --\u003e|Spawns \u0026 Controls| SystemProcesses[\"System Processes\u003cbr\u003eManaged Applications\"]\n    ConfigService --\u003e|Persists to| ConfigFiles[\"Config Files\u003cbr\u003eJSON/YAML/TOML\"]\n    LogManager --\u003e|Writes to| LogFiles[\"Log Files\u003cbr\u003estdout/stderr\"]\n```\n\n## 🔧 Library Usage\n\nPMDaemon can also be used as a Rust library:\n\n```rust\nuse pmdaemon::{ProcessManager, ProcessConfig, config::PortConfig};\n\n#[tokio::main]\nasync fn main() -\u003e Result\u003c(), Box\u003cdyn std::error::Error\u003e\u003e {\n    let mut manager = ProcessManager::new().await?;\n\n    let config = ProcessConfig::builder()\n        .name(\"web-cluster\")\n        .script(\"node\")\n        .args(vec![\"app.js\"])\n        .instances(4)\n        .port(PortConfig::Range(3000, 3003))\n        .max_memory_restart(512 * 1024 * 1024) // 512MB\n        .build()?;\n\n    manager.start(config).await?;\n    println!(\"Started 4-instance cluster on ports 3000-3003\");\n\n    Ok(())\n}\n```\n\n## 🧪 Testing\n\nPMDaemon has comprehensive test coverage:\n\n```bash\n# Run all tests\ncargo test\n\n# Run with coverage\ncargo test --all-features\n\n# Run documentation tests\ncargo test --doc\n\n# Run integration tests\ncargo test --test integration_tests\n\n# Run end-to-end tests\ncargo test --test e2e_tests\n```\n\n### Test Coverage\n- **272 Total Tests**\n  - 150 Unit tests (library)\n  - 33 Unit tests (binary CLI)\n  - 13 Integration tests (including config file functionality tests)\n  - 8 End-to-end tests\n  - 8 Configuration format tests\n  - 60 Documentation tests\n\n## 🗺️ Roadmap\n\n### Completed Features ✅\n- ✅ Core process management (Phase 1-3)\n- ✅ CLI interface with all PM2-compatible commands (Phase 5)\n- ✅ Advanced monitoring and logging (Phase 6)\n- ✅ Web API and WebSocket support (Phase 7)\n- ✅ Health checks and blocking start (Phase 8)\n- ✅ Enhanced delete operations with bulk and status-based deletion\n- ✅ Safe process shutdown and lifecycle management\n- ✅ **Cross-platform support** - Native Windows, macOS, and Linux compatibility\n- ✅ **Platform-specific optimizations** - Tailored signal handling for each OS\n- ✅ Comprehensive test suite (Phase 10.1-10.3)\n\n### In Progress 🚧\n- 📝 Integration examples and documentation (Phase 9)\n- 📝 API documentation beyond docs.rs\n- 📝 Performance benchmarks vs PM2\n\n### Future Enhancements 🔮\n- 🎨 **v2.0** - Enhanced CLI with [ratatui](https://github.com/ratatui-org/ratatui) for interactive terminal UI\n- 📊 Advanced metrics visualization\n- 🔌 Plugin system for custom monitors\n- 🌍 Distributed process management\n\n## 🤝 Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit your changes (`git commit -m 'Add some amazing feature'`)\n4. Push to the branch (`git push origin feature/amazing-feature`)\n5. Open a Pull Request\n\n### Development Guidelines\n- Follow Rust best practices and idioms\n- Add tests for new features\n- Update documentation as needed\n- Ensure all tests pass before submitting PR\n\n## 📄 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Inspired by [PM2](https://pm2.keymetrics.io/) - The original Node.js process manager\n- Built with [Rust](https://www.rust-lang.org/) for performance and safety\n- Uses [Tokio](https://tokio.rs/) for async runtime\n- Web server powered by [Axum](https://github.com/tokio-rs/axum)\n\n---\n\n**PMDaemon** - Process management, evolved. 🚀\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrepeneur4lyf%2Fpmdaemon","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fentrepeneur4lyf%2Fpmdaemon","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fentrepeneur4lyf%2Fpmdaemon/lists"}