pmo


Namepmo JSON
Version 0.5.1 PyPI version JSON
download
home_pageNone
Summarysimple process manager
upload_time2025-09-04 08:42:04
maintainerNone
docs_urlNone
authorNone
requires_python>=3.10
licenseMIT
keywords command-line tool
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # PMO - Process Manager Omni

A lightweight process manager inspired by PM2, but designed primarily for development environments.

## Features

- `start`, `stop`, and `restart` services, similar to PM2
- Simple YAML configuration
- Real-time logs with highlight
- Automatic log rotation per run (keeps up to 30 log files)
- Environment variable support
- Automatic `.env` file loading
- Multi-machine support with hostname-specific directories (for shared NAS environments)
- Service configuration inheritance via `extends`

## Installation

```bash
pip install pmo
```

## Usage

### Quick Start

1. Create a `pmo.yml` file in your project:

```yaml
# Simple format, just like procfile
web-server: node server.js

# Detailed format
api-server:
  cmd: python api.py
  cwd: ./api
  env:
    NODE_ENV: development
```

2. Optional: Create a `.env` file for shared environment variables:

```
# This will apply to all services
DATABASE_URL=postgres://localhost:5432/mydb
DEBUG=true
```

3. Start your services:

```bash
pmo start all
# or start specific services
pmo start web-server api-server
```

4. List your services:

```bash
pmo ls
```

Output:

```plaintext
+---------------------------------------------------------------------------------------------------------------------+
|  id  | name      |        pid |   uptime |   status    |        cpu |        mem |    gpu mem | gpu id | user       |
|------+-----------+------------+----------+-------------+------------+------------+------------+--------+------------|
|  0   | vllm-1    |     482950 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   0    | simpx      |
|  1   | sglang-1  |     482952 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   1    | simpx      |
|  2   | vllm-2    |     482954 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   2    | simpx      |
+---------------------------------------------------------------------------------------------------------------------+
```

### Commands

```
pmo start   [all | service-name | service-id]
pmo stop    [all | service-name | service-id]
pmo restart [all | service-name | service-id]
pmo logs    [all | service-name | service-id]
pmo flush   [all | service-name | service-id]
pmo dry-run [all | service-name | service-id]
pmo ls
pmo status  [all | service-name | service-id]

```

## Configuration

The `pmo.yml` file supports two formats:

1. **Simple**: `service-name: command`
2. **Detailed**:
   ```yaml
   service-name:
     cmd: command
     cwd: working directory (optional)
     env:
       KEY: value
   ```

### Extending Services

Services can reuse definitions with `extends`:

```yaml
base:
  cmd: python app.py
  env:
    DEBUG: true

worker:
  extends: base
  cmd: python worker.py
  env:
    WORKER: yes
```

Environment variables are merged recursively.

PMO manages runtime data in the `.pmo` directory with logs and PID files.

### Multi-machine Support

PMO now supports multiple machines sharing the same configuration through a shared filesystem (like NAS). Each machine will store its process information in a hostname-specific directory:

```
.pmo/
  hostname1/
    pids/
    logs/
  hostname2/
    pids/
    logs/
```

This allows processes on different machines to be managed separately even when sharing the same configuration files.

## License

MIT

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "pmo",
    "maintainer": null,
    "docs_url": null,
    "requires_python": ">=3.10",
    "maintainer_email": null,
    "keywords": "command-line, tool",
    "author": null,
    "author_email": "simpxx <simpxx@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/93/bf/63622d88403f5ec2b0083020c3b9b437af9e2471a8742cf00ccb596d3e4f/pmo-0.5.1.tar.gz",
    "platform": null,
    "description": "# PMO - Process Manager Omni\n\nA lightweight process manager inspired by PM2, but designed primarily for development environments.\n\n## Features\n\n- `start`, `stop`, and `restart` services, similar to PM2\n- Simple YAML configuration\n- Real-time logs with highlight\n- Automatic log rotation per run (keeps up to 30 log files)\n- Environment variable support\n- Automatic `.env` file loading\n- Multi-machine support with hostname-specific directories (for shared NAS environments)\n- Service configuration inheritance via `extends`\n\n## Installation\n\n```bash\npip install pmo\n```\n\n## Usage\n\n### Quick Start\n\n1. Create a `pmo.yml` file in your project:\n\n```yaml\n# Simple format, just like procfile\nweb-server: node server.js\n\n# Detailed format\napi-server:\n  cmd: python api.py\n  cwd: ./api\n  env:\n    NODE_ENV: development\n```\n\n2. Optional: Create a `.env` file for shared environment variables:\n\n```\n# This will apply to all services\nDATABASE_URL=postgres://localhost:5432/mydb\nDEBUG=true\n```\n\n3. Start your services:\n\n```bash\npmo start all\n# or start specific services\npmo start web-server api-server\n```\n\n4. List your services:\n\n```bash\npmo ls\n```\n\nOutput:\n\n```plaintext\n+---------------------------------------------------------------------------------------------------------------------+\n|  id  | name      |        pid |   uptime |   status    |        cpu |        mem |    gpu mem | gpu id | user       |\n|------+-----------+------------+----------+-------------+------------+------------+------------+--------+------------|\n|  0   | vllm-1    |     482950 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   0    | simpx      |\n|  1   | sglang-1  |     482952 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   1    | simpx      |\n|  2   | vllm-2    |     482954 |  25m 15s |   running   |       0.0% |        1mb |  20632 MiB |   2    | simpx      |\n+---------------------------------------------------------------------------------------------------------------------+\n```\n\n### Commands\n\n```\npmo start   [all | service-name | service-id]\npmo stop    [all | service-name | service-id]\npmo restart [all | service-name | service-id]\npmo logs    [all | service-name | service-id]\npmo flush   [all | service-name | service-id]\npmo dry-run [all | service-name | service-id]\npmo ls\npmo status  [all | service-name | service-id]\n\n```\n\n## Configuration\n\nThe `pmo.yml` file supports two formats:\n\n1. **Simple**: `service-name: command`\n2. **Detailed**:\n   ```yaml\n   service-name:\n     cmd: command\n     cwd: working directory (optional)\n     env:\n       KEY: value\n   ```\n\n### Extending Services\n\nServices can reuse definitions with `extends`:\n\n```yaml\nbase:\n  cmd: python app.py\n  env:\n    DEBUG: true\n\nworker:\n  extends: base\n  cmd: python worker.py\n  env:\n    WORKER: yes\n```\n\nEnvironment variables are merged recursively.\n\nPMO manages runtime data in the `.pmo` directory with logs and PID files.\n\n### Multi-machine Support\n\nPMO now supports multiple machines sharing the same configuration through a shared filesystem (like NAS). Each machine will store its process information in a hostname-specific directory:\n\n```\n.pmo/\n  hostname1/\n    pids/\n    logs/\n  hostname2/\n    pids/\n    logs/\n```\n\nThis allows processes on different machines to be managed separately even when sharing the same configuration files.\n\n## License\n\nMIT\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "simple process manager",
    "version": "0.5.1",
    "project_urls": null,
    "split_keywords": [
        "command-line",
        " tool"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "698ce9375ee7bd5e20fe7052e511509018dd0a54bebec3e07c06a522696bd866",
                "md5": "e86f3cdd49ed57638295cb6e5cb03961",
                "sha256": "502dd3f37d6e1a0ce5ba45299d4a14980b6a925dcffa54bdaa75789145d1ed97"
            },
            "downloads": -1,
            "filename": "pmo-0.5.1-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "e86f3cdd49ed57638295cb6e5cb03961",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.10",
            "size": 26522,
            "upload_time": "2025-09-04T08:42:02",
            "upload_time_iso_8601": "2025-09-04T08:42:02.971060Z",
            "url": "https://files.pythonhosted.org/packages/69/8c/e9375ee7bd5e20fe7052e511509018dd0a54bebec3e07c06a522696bd866/pmo-0.5.1-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "93bf63622d88403f5ec2b0083020c3b9b437af9e2471a8742cf00ccb596d3e4f",
                "md5": "fba32d495b100df7ba36a364f29f81ec",
                "sha256": "d0c6bc0a8a897b603582ece2713246fc0823ba561ba1f8f307fbf0cbb6642de6"
            },
            "downloads": -1,
            "filename": "pmo-0.5.1.tar.gz",
            "has_sig": false,
            "md5_digest": "fba32d495b100df7ba36a364f29f81ec",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.10",
            "size": 41534,
            "upload_time": "2025-09-04T08:42:04",
            "upload_time_iso_8601": "2025-09-04T08:42:04.190953Z",
            "url": "https://files.pythonhosted.org/packages/93/bf/63622d88403f5ec2b0083020c3b9b437af9e2471a8742cf00ccb596d3e4f/pmo-0.5.1.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-09-04 08:42:04",
    "github": false,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "lcname": "pmo"
}
        
Elapsed time: 1.51428s