# generate-maya-cmds-stubs

A tool that scrapes Autodesk Maya's API help documentation to generate Python IDE code-completion stubs for the maya.cmds module, whose commands are otherwise registered at runtime and invisible to static analysis.

Maya's `maya.cmds` module registers its commands, including those from plugins, at Maya startup, so a Python IDE cannot scrape them directly and offer completions or type hints the way it would for ordinary code. This project scrapes Maya's own API help documentation instead, which is kept up to date with each Maya release and SDK change, and generates a code stub file an IDE can read.

The generated stubs use native Python 3 type hints, so they work with modern IDEs such as PyCharm and VS Code, and capture details beyond a command's name and argument names, including long and short argument forms and how expected data types change between a command's query and edit modes.

It was built to support any release of Maya and to be kept current as Maya's API changes, rather than depending on a bundled or unmaintained set of stubs.

Website: https://github.com/nicholas-stevenson/generate-maya-cmds-stubs
