feat: add pure-Python installer (pip install, no npm) - #2615
Conversation
Port the minimal non-interactive install to a `bmad` console entry point; output is byte-identical to the Node installer. Adds pyproject.toml (hatchling, payload bundled), CLI, and pytest coverage.
|
Hello again - I do not think we had a chance to chat in Discord, please ping me (bmadcode) int he discord and lets chat. Since all of our skills have standardized on using python scripts (and eventually all will use uv) we have discussed a few times replacing the current installer with python just to make it all a single dependency platform (barring any modules people may create for bmad in the future. I do not want to support 2 installers long term, and do not need both. Either installer can set up the skills and configs in any environment. So any contribution to the open source or helping us is appreciated of course, but there are other planned changes to the installer, so it might make sense to just do the fresh rewrite in python to start with the improvements in mind from the beginning. |
Hiii @bmadcode! TYSM for your reply. I will login and ping you in Discord.
Totally fair point. I wasn't aware that a Python rewrite of the installer was already something that has been discussed. Makes a lot of sense to not carry two installers in the long term, especially with everything else on skills standardizing on Python/uv anyway. I'll find you on Discord so we can talk through what you have planned before I put more time into this. Meanwhile, happy to let this PR sit as more of a reference/PoC. Personally, I'd also prefer to build the thing that the community actually wants. Appreciate you taking the time to explain the context, talk to you soon (probably a ping by today EOD)! |
As suggested in #2504 (comment). If I made any mistake please feel free to point out in the diff here. I will quickly correct it. If you need any clarification on the work here, please let me know, I will provide one.
Proof of concept (open to review)
Proof of concept for packaging BMAD for the Python ecosystem: a pure-Python installer so that
pip install bmad-methodgives a workingbmadcommand that scaffolds BMAD into a project - with no npm / Node toolchain required.AFAIK, BMAD's payload (skills, agents, modules, runtime scripts) is just data files (Markdown / YAML / Python); only the installer CLI was Node. Please correct me if I'm wrong.
This PR reimplements the install actions in Python and ships the payload as package data. The output is validated byte-for-byte against the existing Node installer.
Nothing in the existing Node tooling is touched.
How it works
Given
bmad install --directory . --modules bmm --tools claude-code --yes:_bmad/<module>/;_bmad/config.toml,_bmad/config.user.toml), per-moduleconfig.yaml, and the manifests (_bmad/_config/*);.claude/skills/<id>/);_bmad/.Design decisions
nodejsruntime dependency. This is the actual value proposition ofpip install, and it keeps the eventual conda recipenoarch: pythonwith nonodejsrun dep.requires-python = ">=3.11". BMAD's bundled runtime scripts (resolve_config.py,resolve_customization.py) use stdlibtomllib(3.11+).PyYAML, used solely to parsemodule.yaml/SKILL.mdfrontmatter at install time.config.tomlcarries hand-authored comment headers a serializer can't reproduce, and the whole point is byte-identical output.Try it / review locally
Shell output on my mac
Trademark / redistribution gate
A PyPI package named
bmad-methoduses the BMad trademark - the redistribution / attribution question flagged in the proposal. This will stay a draft and must not be published to a real index under abmad-*name until BMAD upstream rules on redistribution and states any required attribution.LICENSEandTRADEMARK.mdare bundled in the package.