Skip to main content

A unified CLI tool to manage versioning, git, and PyPI releases for multiple projects.

Project description

relm logo

PyPI version Python Wheel Release

Build status Codecov Test Coverage Code style: black Ruff

Downloads License: MIT

relm

The "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

Prerequisites

  • Python 3.8+
  • pip or pipx

Installation

Install globally with pipx (recommended):

pipx install relm

Or with pip:

pip install relm

Usage Example

Manage your projects from the root of your workspace:

# 1. Discover all projects in the current directory
relm list

# 2. Bulk install all projects in editable mode (Developer Mode)
relm install all

# 3. Check git status across all projects
relm status all

# 4. Run a command across all projects (e.g., tests)
relm run "pytest" all --fail-fast

# 5. Release a patch version for a specific project
relm release my-lib patch

Note: relm works by finding pyproject.toml files. Ensure your projects are standard Python packages.


✨ Key Features

  • Automated Discovery: recursively finds all valid Python projects in your workspace.
  • Smart Versioning: Semantically bumps versions (major, minor, patch, alpha, beta, rc) in pyproject.toml and __init__.py.
  • Zero-Config Git Ops: Auto-stages, commits, and tags releases with clean messages.
  • PyPI Publishing: Builds wheels/sdist and uploads to PyPI automatically.
  • Automated Changelog: Parses Conventional Commits to automatically generate and update CHANGELOG.md.
  • Configuration: Supports .relm.toml for global configuration.
  • Bulk Operations: Release, Install, or Check Status of ALL projects at once.
  • Task Runner: Execute any shell command across your entire suite (relm run "...").
  • Dependency Awareness: Automatically topological sorts projects during execution (build lib-a before app-b).
  • Workspace Cleaning: Quickly remove build artifacts (dist/, build/, __pycache__) with relm clean.
  • PyPI Verification: Verify if the locally released version (tag) is available on PyPI with relm verify.
  • "Changed Since" Detection: Only list or act on projects modified since a specific git reference using --since.
  • Project Scaffolding: Generate new standard Python projects instantly with relm create.
  • Developer Friendly: "Safety checks" prevent running in system roots.

⚙️ Configuration & Advanced Usage

relm is controlled entirely via CLI arguments.

Global Arguments

Argument Default Description
--path . Root directory to scan for projects.

Commands

list

Lists all discovered projects, their versions, and paths.

Argument Description
--since List only projects changed since the given git ref (e.g., HEAD~1, main, v1.0).

create

Generates a new standard Python project structure.

Argument Description
name Name of the new project.
path Directory to create the project in (default: current directory).

install

Installs projects into the current environment.

Argument Description
project_name Name of the project or all.
--no-editable Install in standard mode (default is editable -e).

run

Executes a shell command in each project's directory.

Argument Description
command_string The shell command to execute (e.g., "ls -la").
project_name Name of the project or all (default: all).
--fail-fast Stop execution immediately if a command fails.

status

Shows the Git branch and dirty/clean status for projects.

Argument Description
project_name Name of the project or all.

verify

Verifies if the locally released version (tag) is available on PyPI.

Argument Description
project_name Name of the project or all.

clean

Recursively removes build artifacts (dist/, build/, __pycache__) from projects.

Argument Description
project_name Name of the project or all.

release

Orchestrates the version bump, build, and publish flow.

Argument Description
project_name Name of the project or all.
type Bump type: major, minor, patch, alpha, beta, rc, release.
-y, --yes Skip confirmation prompts.
-m, --message Custom commit message template (e.g., 'chore: release {version}').

🏗️ Architecture

relm follows a modular design to keep concerns separated:

src/relm/
├── commands/        # Modular Command Implementations
│   ├── base.py      # Abstract base for commands
│   └── ...          # Individual command modules (list, release, etc.)
├── __init__.py      # Package init
├── banner.py        # ASCII art logo
├── changelog.py     # Changelog generation logic
├── config.py        # Configuration loading (.relm.toml)
├── core.py          # Project discovery & parsing logic
├── git_ops.py       # Git commands (status, commit, tag, push)
├── install.py       # pip installation wrappers
├── main.py          # CLI Entry Point & Argument Parsing
├── release.py       # Release orchestration workflow
├── runner.py        # Subprocess execution for 'run' command
├── verify.py        # PyPI availability verification
└── versioning.py    # Semantic version bumping

Logic Flow

  1. Discovery: main.py loads configuration and calls core.py to map the directory tree.
  2. Dispatch: The argparse subparser routes execution to the specific module in src/relm/commands/.
  3. Execution: Command modules orchestrate the logic, calling helpers like runner.py, git_ops.py, or changelog.py to interact with the system.

🗺️ Roadmap

See ROADMAP.md for the detailed vision.

  • Bulk Release Support
  • Task Runner (relm run)
  • Project Status (relm status)
  • Pre-release Version Support (alpha, beta, rc)
  • Custom Commit Messages
  • Changelog Generation
  • Configuration File Support
  • Dependency Graph Awareness

🤝 Contributing & License

Contributions are welcome! Please submit a PR or open an issue.

Licensed under MIT. See LICENSE for details.

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

relm-2.0.0.tar.gz (38.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

relm-2.0.0-py3-none-any.whl (29.9 kB view details)

Uploaded Python 3

File details

Details for the file relm-2.0.0.tar.gz.

File metadata

  • Download URL: relm-2.0.0.tar.gz
  • Upload date:
  • Size: 38.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for relm-2.0.0.tar.gz
Algorithm Hash digest
SHA256 422c3de09cd66b4d1de3453b19ea0a366a7e597adc695e0f27294082235b2ede
MD5 b96b0b48a2646e8c778c14201b435944
BLAKE2b-256 66bb5ef8f1c3fcd03259c044359e6e1d45d468fe1d6be1c48abc32726e96b4b5

See more details on using hashes here.

Provenance

The following attestation bundles were made for relm-2.0.0.tar.gz:

Publisher: publish.yml on dhruv13x/relm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file relm-2.0.0-py3-none-any.whl.

File metadata

  • Download URL: relm-2.0.0-py3-none-any.whl
  • Upload date:
  • Size: 29.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for relm-2.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68df78cc3b5214259416d4340bfcb244de7f88b52b6fd8c2f9824e11d18e4d6e
MD5 6452f695330b5728627fdd26e850a082
BLAKE2b-256 d73303af52fdcf9c124fb8df889472932c9271d04453fd4536170b94cd8c727e

See more details on using hashes here.

Provenance

The following attestation bundles were made for relm-2.0.0-py3-none-any.whl:

Publisher: publish.yml on dhruv13x/relm

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page