Skip to main content

module-manager

tests Coverage License Ruff Documentation PyPI Python versions

module-manager deploys versioned Python, Rust, shell, and collective CLI environments behind GNU environment modulefiles for Linux/HPC systems.

It writes tools and modulefiles into predictable versioned locations:

/prod/tools/<name>/<version>/bin
/prod/modulefiles/<name>/<version>

The installation prefix and module root must be different directories.

Installation

Install from PyPI:

pip install env-module-manager

Or install as a uv-managed tool:

uv tool install env-module-manager

Quick Start

Deploy a Python CLI with uv tool install:

module-manager deploy-python ruff 0.8.0 \
  --package 'ruff==0.8.0' \
  --default-index https://packages.example/simple \
  --constraints /prod/constraints/runtime.txt \
  --uv-executable /opt/uv/bin/uv \
  --prefix /prod/tools \
  --module-root /prod/modulefiles \
  --execute-install

Set MODULE_MANAGER_UV_EXECUTABLE=/opt/uv/bin/uv to use the same uv path by default.

To expose executable entry points from direct dependencies too, add --with-executables-from=package1,package2. Used without package names, the option reads [project].dependencies from the current directory's pyproject.toml.

Python deployments also pass through uv's --with, --with-requirements, --constraints, --overrides, --lfs, --verbose, --native-tls, and --no-config options. --config-file is accepted as an alias for --uv-config-file.

Deploy a Rust binary:

module-manager deploy-rust ripgrep 14.1.1 \
  --binary ./target/release/rg \
  --prefix /prod/tools \
  --module-root /prod/modulefiles

Add --env NAME=VALUE to any deploy command to export a variable from the generated modulefile. For deploy-env, variables can also be declared in the manifest's [environment] table.

Generate a constraints file for a Python CLI:

module-manager auto-constraints ruff==0.8.0 --output constraints.txt

Deploy from a direct wheel or Git URL:

module-manager deploy-python my-tool 1.0.0 \
  --package 'my-tool @ file:///prod/wheels/my_tool-1.0.0-py3-none-any.whl' \
  --prefix /prod/tools \
  --module-root /prod/modulefiles \
  --execute-install

Deploy a shell script:

module-manager deploy-script my-tool 1.0.0 \
  --script ./scripts/my-tool \
  --prefix /prod/tools \
  --module-root /prod/modulefiles

Deploy a collective environment from a TOML manifest:

module-manager deploy-env --file dev-tools.toml --dry-run
module-manager deploy-env --file dev-tools.toml

Use the generated module:

module use /prod/modulefiles
module load ruff
ruff --version

Deployments make the deployed version the module default. Add --no-default when you want to write the versioned modulefile without changing the default.

Remove a deployed version:

module-manager uninstall ruff 0.8.0 \
  --prefix /prod/tools \
  --module-root /prod/modulefiles

Documentation

Read the full documentation on Read the Docs.

Metadata

Release files for env-module-manager 0.12.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for env-module-manager 0.12.0
File Size Uploaded
env_module_manager-0.12.0.tar.gz 104.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for env-module-manager 0.12.0
File Interpreter ABI Platform
env_module_manager-0.12.0-py3-none-any.whl Python 3 none any Details

Total release size: 129.6 kB

Release files / env_module_manager-0.12.0.tar.gz

Download URL env_module_manager-0.12.0.tar.gz
Size 104.6 kB
Tags Source
SHA-256 checksum
How to use checksums
2e36551f9ab06488da3da6971ab588511db2d1875e76f0236ac50c4425f9210d
BLAKE2b-256 checksum
How to use checksums
ed5ee26a8edaaf3f0f36326ebed9246e9573c77530cdee86043a1c53351cb5e1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.6

Release files / env_module_manager-0.12.0-py3-none-any.whl

Download URL env_module_manager-0.12.0-py3-none-any.whl
Size 24.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0a0559b6d10bc21796f6a0607d76be64c3f2da64c0cbf48c172657a6cff5d8df
BLAKE2b-256 checksum
How to use checksums
b33e26847cfd609ef194704863e509b1e89b189ea044b5adddf9afbfeb7b171e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.2.0 CPython/3.14.6

Release history Release notifications | RSS feed

This release

0.12.0 This release

2 release files

0.11.0

2 release files

0.10.0

2 release files

0.9.0

2 release files

0.8.0

2 release files

0.7.0

2 release files

0.6.0

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page