A developer-friendly process manager and supervisor for Hivemind workspaces
Project description
Hivemind Manager
Hivemind Manager (hm) is a developer-focused process manager built on top of Hivemind.
It provides service discovery, dependency management, supervision, automatic restarts, log management, and project-aware workflows for local development environments.
Instead of manually managing multiple Hivemind processes, hm treats your workspace as a collection of services and provides a unified CLI for operating them.
Features
- Automatic discovery of
*.hmservice definitions - Project-aware workspace detection
- Dependency resolution via
# depends_on: - Supervisor process with automatic restart backoff
- PID tracking and process lifecycle management
- Orphaned process cleanup
- Multi-service log management
- Execution-based log rotation
- Project-local configuration via
pyproject.toml - Works from any subdirectory inside a project
- Lightweight and Hivemind-compatible
Installation
From PyPI
pip install hivemind-manager==0.1.0
From Source
git clone git@github.com:dhruv13x/hivemind-manager.git
cd hivemind-manager
pip install -e .
Requirements
- Python 3.8+
- Hivemind installed and available on
PATH
Verify installation:
hivemind --version
Quick Start
Inside your project:
hm init
This creates a project configuration:
[tool.hm]
home_dir = "hm"
preserve_logs = true
max_log_history = 5
max_log_size_mb = 0
Then start services:
hm up
Check status:
hm ps
Stop everything:
hm down
Service Definitions
Services are defined using standard Hivemind files.
Example: infra.hm
api: uvicorn app.main:app --host 0.0.0.0 --port 8000
worker: python -m app.worker
Example: transfer.hm
# depends_on: infra
transfer_bot: python -m services.transfer_bot.main
Dependency Management
Dependencies are declared using comments:
# depends_on: infra
When starting:
hm start transfer
hm automatically starts:
infra
└── transfer
if the dependency is not already running.
Project Discovery
hm automatically discovers project roots using:
HM_PROJECT_ROOTpyproject.tomlcontaining[tool.hm].hmservice definitions- Current working directory
Commands work from anywhere inside the project:
cd scripts/dev
hm ps
hm start infra
hm logs transfer
Commands
Initialize Project
hm init
Create project configuration and HM workspace.
List Services
hm list
Example:
Detected services:
✓ infra
✓ transfer
✓ bypass
✓ uab
Show Status
hm ps
Example:
SERVICE STATUS
----------------------
infra running
transfer running
uab stopped
Start Service
hm start infra
Without log following:
hm start infra --no-follow
Stop Service
hm stop infra
Restart Service
hm restart infra
View Logs
hm logs infra
Multiple services:
hm logs infra transfer uab
Start All Services
hm up
Stop All Services
hm down
Diagnostics
hm doctor
Example:
Project Root : /workspace/bot_platform
HM Home : /workspace/bot_platform/hm
Config File : /workspace/bot_platform/pyproject.toml
Hivemind Bin : /usr/local/bin/hivemind
Log Management
Each service receives:
hm/
├── infra.log
├── infra.log.1
├── infra.log.2
├── infra.pid
Execution-based rotation preserves previous runs:
infra.log— current executioninfra.log.1— previous executioninfra.log.2— older execution
This makes debugging service restarts straightforward.
Configuration
Project configuration lives in pyproject.toml:
[tool.hm]
home_dir = "hm"
preserve_logs = true
max_log_history = 5
max_log_size_mb = 0
| Option | Description |
|---|---|
home_dir |
Directory used for logs and PID files |
preserve_logs |
Preserve previous execution logs |
max_log_history |
Number of historical logs to keep |
max_log_size_mb |
Size-based rotation threshold (0 disables) |
Environment Variables
Override configuration via environment:
| Variable | Purpose |
|---|---|
HM_PROJECT_ROOT |
Override project root detection |
HM_HOME_DIR |
Override logs/PID directory |
HM_HIVEMIND_BIN |
Override Hivemind binary path |
Why Hivemind Manager?
Hivemind excels at running processes.
Hivemind Manager adds:
- Service-level supervision
- Dependency resolution
- Project discovery
- Log history
- Process cleanup
- Workspace-aware workflows
without replacing Hivemind itself.
License
MIT License
Copyright (c) dhruv13x
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file hivemind_manager-4.0.0.tar.gz.
File metadata
- Download URL: hivemind_manager-4.0.0.tar.gz
- Upload date:
- Size: 21.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f304af79084c9e5339ade345710aa609e36317ebfe86677fe70dbd5e245540cb
|
|
| MD5 |
150875f26544f0ac9acefa65644301d2
|
|
| BLAKE2b-256 |
a89a3bcb87d5ded649819255ab761f2726e7717932d9df3742a2b4d5ea295852
|
Provenance
The following attestation bundles were made for hivemind_manager-4.0.0.tar.gz:
Publisher:
publish.yml on dhruv13x/hivemind-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hivemind_manager-4.0.0.tar.gz -
Subject digest:
f304af79084c9e5339ade345710aa609e36317ebfe86677fe70dbd5e245540cb - Sigstore transparency entry: 1682405159
- Sigstore integration time:
-
Permalink:
dhruv13x/hivemind-manager@c2bc1e1977ae925d09958b4aa8379907a6eac94c -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c2bc1e1977ae925d09958b4aa8379907a6eac94c -
Trigger Event:
push
-
Statement type:
File details
Details for the file hivemind_manager-4.0.0-py3-none-any.whl.
File metadata
- Download URL: hivemind_manager-4.0.0-py3-none-any.whl
- Upload date:
- Size: 17.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2bf3459e683a4485dca18bb695ffd4a0473268b3b8f8ed608e9a7b4b4549bb99
|
|
| MD5 |
01db9436dcd9e134a42c92b3d7fcf1ce
|
|
| BLAKE2b-256 |
029eb6b3e75eea71444b4edc81876734f27723528594c7e2e44c9e4571eb047e
|
Provenance
The following attestation bundles were made for hivemind_manager-4.0.0-py3-none-any.whl:
Publisher:
publish.yml on dhruv13x/hivemind-manager
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
hivemind_manager-4.0.0-py3-none-any.whl -
Subject digest:
2bf3459e683a4485dca18bb695ffd4a0473268b3b8f8ed608e9a7b4b4549bb99 - Sigstore transparency entry: 1682405229
- Sigstore integration time:
-
Permalink:
dhruv13x/hivemind-manager@c2bc1e1977ae925d09958b4aa8379907a6eac94c -
Branch / Tag:
refs/tags/v4.0.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@c2bc1e1977ae925d09958b4aa8379907a6eac94c -
Trigger Event:
push
-
Statement type: