A unified CLI tool to manage versioning, git, and PyPI releases for multiple projects.
Project description
relm
The Monorepo Manager for Python. "Batteries Included" CLI for managing your Python mono-repo or multi-project workspace. Automate versioning, git tagging, PyPI releases, and local environment setup with a single tool.
⚡ Quick Start (The "5-Minute Rule")
Prerequisites
- Python 3.8+
- Docker (Optional, for containerized workflows)
- Git (Required for version control operations)
Installation
Install globally with pipx (recommended) or pip:
# Recommended
pipx install relm
# Alternative
pip install relm
Run
Start managing your workspace instantly:
# Discover projects in the current directory
relm list
Demo
Copy-paste this snippet to see relm in action (assumes you have a Python project structure):
# 1. List all projects and their current versions
relm list
# 2. Check git status across the entire workspace recursively
relm status all -r
# 3. Install all projects in editable mode in parallel
relm install all -p
# 4. Run tests in parallel across all projects in the 'packages' folder
relm pytest packages -p --from-root
# 5. Release a patch version for a specific library
relm release my-library patch
✨ Features (The "Why")
Core
- Automated Discovery: Recursively scans and identifies Python projects (
pyproject.toml) in your workspace with configurable depth. - Smart Versioning: Semantically bumps versions (
major,minor,patch,alpha,beta,rc) and updates files automatically. - Zero-Config Git Ops: Auto-stages, commits, tags, and pushes releases with standardized messages.
Performance & Workflow
- High-Performance Parallelism: Execute
pytest,install, orruncommands concurrently across projects while respecting the dependency graph. - Path-Based Targeting: Target operations at specific folders (e.g.,
relm pytest packages) or the entire workspace. - Dependency Awareness: Topologically sorts projects to ensure correct build order, with lenient handling for circular dependencies.
- "From Root" Execution: Seamlessly run commands from the workspace root to avoid monorepo import issues.
- Workspace Cleaning: Instantly wipe
dist/,build/, and__pycache__artifacts withrelm clean.
Automation & Security
- Automated Changelog: Parses Conventional Commits to auto-generate
CHANGELOG.md. - PyPI Publishing: seamless build and upload workflow.
- Memory-Safe Logging: Captures only the "tail" of logs during parallel execution to prevent terminal crashes on massive monorepos.
- Safety Checks: Prevents accidental execution in system roots.
🛠️ Configuration (The "How")
relm is configured via a .relm.toml file in your workspace root and CLI arguments.
Environment Variables
relm primarily uses .relm.toml for configuration, but respects standard tool variables:
| Name | Description | Default | Required |
|---|---|---|---|
TWINE_USERNAME |
Username for PyPI upload (used by internal tools) | None | For Release |
TWINE_PASSWORD |
Password/Token for PyPI upload | None | For Release |
CLI Arguments
Global Options
| Flag | Shortcut | Description |
|---|---|---|
--path |
N/A | Root directory to scan for projects (default: .) |
--recursive |
-r |
Recursively scan for projects in subdirectories. |
--depth |
-d |
Maximum depth to scan when recursive is enabled (default: 2). |
--parallel |
-p |
Run commands in parallel across projects. |
--jobs |
-j |
Number of parallel jobs (default: number of CPUs). |
--from-root |
N/A | Run commands from the CWD instead of project directories. |
Commands
| Command | Arguments | Description |
|---|---|---|
list |
--since <ref> |
List projects (optionally filtered by changes since git ref). |
status |
project_or_path |
Show git branch and dirty status. |
install |
project_or_path, --no-editable |
Install projects (default: editable). |
pytest |
project_or_path, --fail-fast, -- <args> |
Run pytest across projects and summarize results. |
run |
command, project_or_path, --fail-fast |
Execute shell command in project directories. |
release |
project, type, -y, -m |
Bump version, tag, and publish. Type: major, minor, patch, etc. |
clean |
project_or_path |
Remove build artifacts. |
create |
name, path |
Scaffold a new project. |
verify |
project_or_path |
Verify PyPI release availability. |
gc |
project_or_path |
Run git gc on projects. |
🏗️ Architecture
relm uses a modular architecture designed for maintainability and separation of concerns.
Directory Tree
src/relm/
├── commands/ # 🔌 Pluggable Command Modules
│ ├── pytest_command.py
│ ├── release_command.py
│ └── ...
├── core.py # 🧠 Project Model & Dependency Graph
├── runner.py # ⚡ Parallel Task Execution Engine
├── config.py # ⚙️ Configuration Loader (.relm.toml)
├── git_ops.py # 🐙 Git Wrapper
├── release.py # 🚀 Release Workflow Engine
├── versioning.py # 🏷️ SemVer Logic
├── changelog.py # 📝 Changelog Generator
├── main.py # 🏁 CLI Entry Point
└── banner.py # 🎨 ASCII Art
Data Flow
- Discovery:
main.pybootstraps and callscore.pyto recursively findpyproject.tomlfiles. - Graph Construction: Projects are parsed into
Projectobjects; dependencies are mapped. - Topological Sort: Projects are ordered so dependencies are processed first (with cycle-breaking logic).
- Execution: The
runner.pyengine orchestrates execution (sequential or parallel), capturing truncated logs for safety.
🐞 Troubleshooting
Common Issues
| Error Message | Possible Cause | Solution |
|---|---|---|
Project 'xyz' not found |
The project is not in the scan path. | Ensure --path is correct and pyproject.toml exists. |
Git repository is not clean |
Uncommitted changes exist. | Commit or stash changes before releasing. |
Circular dependency detected |
Projects depend on each other. | relm will warn and continue, but check your dependencies. |
Running in system root |
Executing from / or similar. |
Navigate to your workspace folder or use --path. |
Debug Mode
relm uses rich for output. Exceptions are printed with tracebacks on failure.
In parallel mode, full output is only shown for failed projects (truncated to the last 50 lines).
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
🗺️ Roadmap
See ROADMAP.md for the full vision.
- Bulk Release Support
- Task Runner (
relm run) - Project Status (
relm status) - Pre-release Version Support (
alpha,beta,rc) - Automated Changelog Generation
- Configuration File Support (
.relm.toml) - Dependency Graph Awareness
- Parallel execution for
run,install, andpytest - Recursive project discovery
- Interactive mode for project selection
- Docker container support
- CI/CD Integration templates
Project details
Release history Release notifications | RSS feed
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 relm-6.1.0.tar.gz.
File metadata
- Download URL: relm-6.1.0.tar.gz
- Upload date:
- Size: 48.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
406945d0558b91570bb8174cce5f8c56dfa0e0ddd3bee9adce88bb5955399f7f
|
|
| MD5 |
e2a73fbf7662da38829241cdcdc0f1db
|
|
| BLAKE2b-256 |
0e6bcdcce5e4d522bea4a0a5043a6b418a86a7537bb16e06f5857a5a40093822
|
Provenance
The following attestation bundles were made for relm-6.1.0.tar.gz:
Publisher:
publish.yml on dhruv13x/relm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relm-6.1.0.tar.gz -
Subject digest:
406945d0558b91570bb8174cce5f8c56dfa0e0ddd3bee9adce88bb5955399f7f - Sigstore transparency entry: 790691452
- Sigstore integration time:
-
Permalink:
dhruv13x/relm@671c6bce0aad9b172ddf1b1080bb616162709488 -
Branch / Tag:
refs/tags/v6.1.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@671c6bce0aad9b172ddf1b1080bb616162709488 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relm-6.1.0-py3-none-any.whl.
File metadata
- Download URL: relm-6.1.0-py3-none-any.whl
- Upload date:
- Size: 41.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c6b985d85882472ab419173c0c9cde66a49700c86b5fb5cab43369373667d3bb
|
|
| MD5 |
4929303fecca81db5af4d1816eab775a
|
|
| BLAKE2b-256 |
755910b0493927398cbfb4550a691a1d55ed6ea6f3ba5850a1a00e17446d2d8d
|
Provenance
The following attestation bundles were made for relm-6.1.0-py3-none-any.whl:
Publisher:
publish.yml on dhruv13x/relm
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
relm-6.1.0-py3-none-any.whl -
Subject digest:
c6b985d85882472ab419173c0c9cde66a49700c86b5fb5cab43369373667d3bb - Sigstore transparency entry: 790691453
- Sigstore integration time:
-
Permalink:
dhruv13x/relm@671c6bce0aad9b172ddf1b1080bb616162709488 -
Branch / Tag:
refs/tags/v6.1.0 - Owner: https://github.com/dhruv13x
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@671c6bce0aad9b172ddf1b1080bb616162709488 -
Trigger Event:
push
-
Statement type: