Skip to main content

module-manager

tests Coverage License Ruff Documentation PyPI Python versions

module-manager deploys versioned Python, binary, 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

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 binary:

module-manager deploy-binary 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. Values in that table expand $NAME and ${NAME} references from the environment running module-manager. Collective manifests can also define shell aliases in an [alias] table. Binary entries support binary_mode = "copy", "symlink", or "hardlink"; the default remains "copy". Use [defaults.python] to share Python deployment options across collective tool entries, and [defaults.binary] to share binary_mode. Values declared on an individual tool replace inherited defaults. Set expose_python = "tool-python" on a collective Python entry to expose a named interpreter that can run scripts with that tool's installed packages.

Every completed deployment includes a module-manager.lock.json file with its metadata and generated-file checksums. Use module-manager list --prefix PATH, module-manager show NAME VERSION, and module-manager verify NAME VERSION to inspect recorded deployments and detect missing, modified, or unexpected files.

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

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

Collective manifests can reuse command-line values in string fields with {NAME} placeholders. For example, use version = "{version}" and package = "my-tool=={version}", then deploy with module-manager deploy-env --file dev-tools.toml --set version=1.2.3. Use {{ and }} for literal braces.

Deploying an existing name and version is refused by default. Add --force to replace that deployment deliberately.

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.20.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.20.0
File Size Uploaded Provenance Actions
env_module_manager-0.20.0.tar.gz 121.7 kB Without provenance Details for env_module_manager-0.20.0.tar.gz

Built distribution (wheel)

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

Total release size: 154.3 kB

Release files / env_module_manager-0.20.0.tar.gz

Download URL env_module_manager-0.20.0.tar.gz
Size 121.7 kB
Tags Source
SHA-256 checksum
How to use checksums
c5ce423c575005b7bcfbeecc843a2a9af3e22830bffcc21c2b00e366aecb3f0e
BLAKE2b-256 checksum
How to use checksums
3a7d184c05aeefad2fa88ce8a0ff841e152b88ab0cda5a1aea813980c3a11c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.4

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

Download URL env_module_manager-0.20.0-py3-none-any.whl
Size 32.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0d5cce9935b1a4cc23db84af202e189b3c00f40085947095654e1cc769c287b6
BLAKE2b-256 checksum
How to use checksums
1299ceeafecf2cdd1f8988c76c680aec396ec2dfb3bdeaa3d6dbd7a59c68eb58
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.14.4

Security for env-module-manager 0.20.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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