Skip to main content

controlm-chain-admin

CI PyPI Python License: MIT

Manage BMC Control-M job chains as a git-friendly JSON repository. Import the Control-M XML export, keep the links between jobs explicit, hold one environment-neutral definition for test/uat/bench/prod, validate the chains, refactor safely, and export the XML back for the environment you choose.

Status: alpha. Byte-identical import and export, environments (letter rule, constants, exceptions, folders and jobs of some environments) learned from the exports themselves, releases with installations per environment, comparison of branches and taking their changes item by item, validation with fixes, an editing web UI. The design is in DESIGN.md and the plan in BACKLOG.md. Released on PyPI since 0.1.0.

Why

The Control-M user interface is slow for reviewing or changing whole chains, and its XML export (DEFTABLE) is hard to diff, review and version. controlm-chain-admin turns that export into:

  • JSON files in git, one per folder and per job, with stable ordering, so a plain git diff shows what really changed and a pull request can review a chain change.
  • Links instead of condition names. OUTCOND/INCOND pairs become edges between nodes; the original names are kept, and the export can keep them or standardize them.
  • One base, many environments. The environment letter in names, hosts, users, mail recipients and other per-environment values become tokens and constants; each environment is a small file. Exporting for another environment is one flag.
  • Environments learned from their exports. Start from the production export; the export of each other environment is grouped into a few decisions (a machine, a user, a mail, the environment's name in a subject becomes a constant with a value per environment; what only one environment has or lacks is noted), and production stays byte for byte as it was. ctmchain check then counts, field by field, what the repository's export of each environment still differs in.
  • Releases and comparison. The trunk mirrors production; a release is installed environment by environment; two branches compare in Control-M terms, and any change of the other branch (one attribute, one job without its folder, one condition) can be taken into yours, conflicts shown value by value.
  • Validation and refactorings that the Control-M UI does not offer: dangling or stale conditions, chains broken by renames, condition names that differ only by a copy's suffix or by case (numbered as the fix), renaming a sub-application across a folder, moving a job, inserting a job in a chain.
  • Byte-identical export. Untouched definitions export exactly as they were imported.

Install

pip install controlm-chain-admin          # core + ctmchain CLI (standard library only)
pip install "controlm-chain-admin[web]"   # + local read-only web UI

Requires Python 3.11 or newer.

Where only PyPI is reachable

The source distribution carries the whole project (rules, skills, tests, the web sources and the built UI), so it can be adjusted where GitHub is out of reach:

pip download controlm-chain-admin==<version> --no-deps --no-binary :all:
tar -xzf controlm_chain_admin-<version>.tar.gz && cd controlm_chain_admin-<version>
git init -b main && git add -A && git commit -m "chore: controlm-chain-admin <version>"
python -m venv .venv && .venv/bin/pip install -e ".[dev,web]"

The bootstrap skill (.claude/skills/bootstrap/SKILL.md) takes it from there, for a person or Claude Code: the gate, then a new chain repository: production first, the values of the other environments from their full exports, then the releases on their way from their deliveries.

Quickstart

# a git repository (new or existing) becomes a chain repository
ctmchain init --repo ./my-chains --application P77_RISK_ENGINE \
    --envs test=T,uat=U,bench=B,prod=P --prefixes P77,RQ_,RC_ --leading-only RQ_,RC_

ctmchain distinct NODEID RUN_AS DOMAIL/@DEST --xml uat_export.xml   # what varies per environment
ctmchain import uat_export.xml --env uat --repo ./my-chains         # XML -> JSON, with a report
ctmchain validate --repo ./my-chains                                # chain findings, exit 1 if any
ctmchain resolve never-cleaned=add-cleanup --repo ./my-chains       # preview the fixes; --apply
ctmchain release start 2026-11 --repo ./my-chains                   # edits go to release/2026-11
ctmchain commit --dry-run --repo ./my-chains                        # the message it would use
ctmchain graph P77_INGEST_DAILY --repo ./my-chains --format mermaid # the chain of one folder
ctmchain export --env uat -o uat.xml --repo ./my-chains             # byte-identical to the import
ctmchain export --env prod -o prod.xml --repo ./my-chains           # same chain, prod letters
ctmchain serve --repo ./my-chains                                   # local web UI
ctmchain compare main release/2026-11 --repo ./my-chains            # what the release changed
ctmchain package main release/2026-11 --env uat --repo ./my-chains  # import file, changed folders
ctmchain release installed uat --repo ./my-chains                   # tag uat/2026-11-1
ctmchain receive delivery.xml --repo ./my-chains                    # a team's folders, made neutral
ctmchain receive uat_full.xml --full --repo ./my-chains             # all of uat: constants, what only uat has
ctmchain receive uat_full.xml --values-only --repo ./my-chains      # only uat's machines, users, mails
ctmchain check uat_full.xml --env uat --repo ./my-chains            # what our uat export still differs in
ctmchain take release/2026-10 --list --repo ./my-chains             # what another release changed
ctmchain take release/2026-10 --item job:P77_CHAIN/P77_D --repo ./my-chains   # one job of it; --apply
ctmchain release close --repo ./my-chains                           # once installed in prod

Refactorings preview a change set and write only with --apply:

ctmchain rename-job P77_INGEST_DAILY/P77_INGEST_LOAD P77_INGEST_POSITIONS   # diff only
ctmchain rename-subapp P77_BATCH P77_CORE --folder P77_INGEST_DAILY --apply
ctmchain insert-job P77_INGEST_DAILY/P77_CHECK --after P77_INGEST_DAILY/P77_INGEST_INIT \
    --before P77_INGEST_DAILY/P77_INGEST_LOAD --apply

Also rename-folder, move-job, extract-variable, map, env constants, show FOLDER/JOB, links FOLDER/JOB, links --name <condition>. Every command takes --format json where a report is produced. All examples use the fictional application P77; the repository never contains real exports.

Development

pip install -e ".[dev,web]"
pytest                                   # synthetic fixtures
cd web && npm ci && npm run build        # builds the web UI into the package
.claude/skills/verify/verify.sh          # the whole quality gate

Concepts

Term Meaning
Chain repository A git repository with the environment-neutral base plus one small directory per environment
Node A folder or a job, identified as FOLDER/JOB without the environment letter
Link A dependency edge: producer OUTCOND + → consumer INCOND with the same condition name
Constant A logical value @{name} resolved per environment (hosts, users, recipients)
Exception A per-job, per-environment whole-value replacement (envs/<env>/overrides.json)
Environments of a node "envs": [...] on a folder or job that exists in some environments only
Release A branch release/<name> started from the trunk (production), installed per environment, closed into the trunk

Contributing

See CONTRIBUTING.md. The project is developed test-first; the quality gate is .claude/skills/verify/verify.sh.

License

MIT — see LICENSE.

Metadata

Release files for controlm-chain-admin 0.1.3

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

Source distribution (sdist)

Source distribution for controlm-chain-admin 0.1.3
File Size Uploaded Provenance Actions
controlm_chain_admin-0.1.3.tar.gz 654.6 kB With provenance Details for controlm_chain_admin-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for controlm-chain-admin 0.1.3
File Interpreter ABI Platform Actions
controlm_chain_admin-0.1.3-py3-none-any.whl Python 3 none any Details for controlm_chain_admin-0.1.3-py3-none-any.whl

Total release size: 1.0 MB

Release files / controlm_chain_admin-0.1.3.tar.gz

Download URL controlm_chain_admin-0.1.3.tar.gz
Size 654.6 kB
Tags Source
SHA-256 checksum
How to use checksums
03120382614f333a72ef3d18987b7032ba528cb453fa833a348e916c96beb578
BLAKE2b-256 checksum
How to use checksums
9c82a4d28aa2e4c15608f5c1a4065f24a6cfc71088e12964f657d8f607d7943d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Release files / controlm_chain_admin-0.1.3-py3-none-any.whl

Download URL controlm_chain_admin-0.1.3-py3-none-any.whl
Size 386.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e410cad6a523b99e1b912e91dbe30151df697ab67fa5fa2c127a18c36592006b
BLAKE2b-256 checksum
How to use checksums
e98ed992fb22ee54d1c9f8c96120fe45a8897f6eb04263fe08406fe31efdb149
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

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.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

Security for controlm-chain-admin 0.1.3

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.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for controlm_chain_admin-0.1.3.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 3, 2026.

Transparency log

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