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
relm status all
# 3. Install all projects in editable mode
relm install all
# 4. Run tests across all projects (stops on first failure)
relm run "pytest" all --fail-fast
# 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. - 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
- Bulk Operations: Install, Test, or Release ALL projects with a single command.
- Dependency Awareness: Topologically sorts projects to ensure correct build order (build
lib-abeforeapp-b). - "Changed Since" Detection: Filter operations to only target projects modified since a specific git reference (
--since). - 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.
- PyPI Verification: Verify local tags match PyPI releases with
relm verify. - 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 | Description |
|---|---|
--path |
Root directory to scan for projects (default: .) |
Commands
| Command | Arguments | Description |
|---|---|---|
list |
--since <ref> |
List projects (optionally filtered by changes since git ref). |
status |
project_name |
Show git branch and dirty status. |
install |
project_name, --no-editable |
Install projects (default: editable). |
run |
command, project_name, --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_name |
Remove build artifacts. |
create |
name, path |
Scaffold a new project. |
verify |
project_name |
Verify PyPI release availability. |
gc |
N/A | Run git gc on all projects. |
🏗️ Architecture
relm uses a modular architecture designed for maintainability and separation of concerns.
Directory Tree
src/relm/
├── commands/ # 🔌 Pluggable Command Modules
│ ├── list_command.py
│ ├── release_command.py
│ └── ...
├── core.py # 🧠 Project Model & Dependency Graph
├── 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: For bulk operations (
install,run), projects are ordered so dependencies are processed first. - Execution: The appropriate
commandmodule is invoked, orchestratinggit_ops,subprocesscalls, or file manipulations.
🐞 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. | Refactor dependencies to be acyclic. |
Running in system root |
Executing from / or similar. |
Navigate to your workspace folder or use --path. |
Debug Mode
relm uses rich for output. While there is no dedicated --debug flag, exceptions are printed with tracebacks on failure.
Check pyproject.toml for log_cli = true to enable verbose logging during test runs (relm run "pytest").
🤝 Contributing
We welcome contributions! Please see CONTRIBUTING.md for details.
Dev Setup
- Clone the repo.
- Install dependencies:
pip install .[dev]. - Run tests:
pytest. - Linting:
ruff check .andblack ..
🗺️ 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
runandinstall - 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-4.0.0.tar.gz.
File metadata
- Download URL: relm-4.0.0.tar.gz
- Upload date:
- Size: 40.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
937e500bb0e65f14dae2600d2f0b1eecbdb6288513959a6c68c599e40bf8cb20
|
|
| MD5 |
bbfa02ccb75d1485af624419417fce53
|
|
| BLAKE2b-256 |
732fd6745f9fdf407fb88ce4b9521114c9b60125b7c350d8c16848efdfd2a58f
|
Provenance
The following attestation bundles were made for relm-4.0.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-4.0.0.tar.gz -
Subject digest:
937e500bb0e65f14dae2600d2f0b1eecbdb6288513959a6c68c599e40bf8cb20 - Sigstore transparency entry: 772540301
- Sigstore integration time:
-
Permalink:
dhruv13x/relm@c734b4f09ed3d44b53c12ab79e5ed820fcb4f2e0 -
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@c734b4f09ed3d44b53c12ab79e5ed820fcb4f2e0 -
Trigger Event:
push
-
Statement type:
File details
Details for the file relm-4.0.0-py3-none-any.whl.
File metadata
- Download URL: relm-4.0.0-py3-none-any.whl
- Upload date:
- Size: 32.0 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 |
34ff4ec25d1d1053a24a2401bee61de98897b425dea2995f44fe77fd86378be3
|
|
| MD5 |
92514053cf0192d6980b01283ba227f0
|
|
| BLAKE2b-256 |
a749ee6f054612b475531a1f04a8e65a467bc9fd0d3b81a29cf533ee5046ee35
|
Provenance
The following attestation bundles were made for relm-4.0.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-4.0.0-py3-none-any.whl -
Subject digest:
34ff4ec25d1d1053a24a2401bee61de98897b425dea2995f44fe77fd86378be3 - Sigstore transparency entry: 772540313
- Sigstore integration time:
-
Permalink:
dhruv13x/relm@c734b4f09ed3d44b53c12ab79e5ed820fcb4f2e0 -
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@c734b4f09ed3d44b53c12ab79e5ed820fcb4f2e0 -
Trigger Event:
push
-
Statement type: