bmaya is a command-line tool that lets an AI agent or a script work in Autodesk Maya: inspect the scene, run maya.cmds, look at a screenshot, audit meshes, export FBX. Anything with a shell can use it: Claude Code, Codex, Cursor, CI.
- Each command prints one line of JSON and exits. No server to run, no dependencies.
- Little sits in the agent's context: a short
bmaya guide, then one topic (modeling, skin, animation, export...) only when the work needs it. - Works in the Maya you have open, or starts one without a window when none is running.
- Several agents can share one Maya: each undoes only its own steps.
- Errors say what to try next, and every command is journaled before it runs, so a crash leaves a trace.
You need Autodesk Maya (tested on 2027) and uv. Only Windows is tested.
git clone https://github.com/Snuux/bmaya-cli.git
uv tool install ./bmaya-cliThat is enough for a Maya without a window. To also use a Maya you open yourself, copy the bridge into it and restart Maya:
bmaya installFor .glb and .gltf export and import, also run bmaya install --gltf. It adds the optional maya-glb-io library; everything else works without it. bmaya install --draco also adds the decoder for Draco-compressed files.
bmaya doctor checks the result. To update: git pull, uv tool install --reinstall ./bmaya-cli, bmaya install, restart Maya.
No Maya needs to be open. The first command starts one without a window, which takes 10 to 20 seconds.
bmaya scene
bmaya exec "result = cmds.polyCube(name='crate')"
bmaya shot -o shot.png
bmaya undoEach prints one line (the first is shortened here):
{"file":"untitled","unit":"cm","up":"y","fps":24,"nodes":[],"shown":0,"total":0}
{"stdout":"","result":["crate","polyCube1"],"truncated":false}
{"path":"C:/work/shot.png","width":800,"height":450,"frames":[1],"offscreen":true}
{"undone":1}A Maya without a window runs until you stop it:
bmaya file save crate.ma
bmaya stopbmaya demo runs the whole loop (build, animate, audit, export, screenshot) in a running Maya and writes the results to demo/.
An agent does not know the tool exists until told. Paste this into your project's CLAUDE.md or AGENTS.md:
## Maya
Autodesk Maya is driven with the `bmaya` command in the shell.
Run `bmaya guide` once before the first use: a short manual, with `bmaya guide TOPIC` for modeling, skinning, animation, export and the rest. `bmaya --help` lists the commands by group.
Every command prints one line of JSON on stdout. Errors go to stderr as `error:` and `hint:` lines; follow the hint.
Exit code 3 means Maya is still starting or still busy: wait and check `bmaya sessions`, do not send the command again.
Pass multi-line code through stdin (`bmaya exec <<'PY' ... PY`) or `bmaya exec -f FILE`, not as an argument.
Look at your work with `bmaya shot -o shot.png`, or `bmaya views NAME -o views.png` for a model, and open that file.
If a `note:` line says a Maya was started for you, save with `bmaya file save PATH` and run `bmaya stop` when the work is done.| Commands | Read more | |
|---|---|---|
| Look | scene object shot views playblast |
Modeling, Animation |
| Change | exec undo file file status wait |
Scene changes |
| Model | audit diff remesh reduce cleanup mirror |
Modeling |
| UVs and edge flow | uv topo |
UVs and textures, Topology |
| Skin and skeleton | skin bones pose rig transfer |
Skin weights, Skeletons and mirroring |
| Animate | anim clip motion |
Animation |
| Export | export inspect |
Export: FBX presets for Unity, Unreal and Godot, glTF, the Game Exporter |
| Run Maya | sessions use start stop doctor logs |
Sessions, Troubleshooting |
Pictures are PNG files an agent opens and reads: viewport shots and contact sheets, a model from several sides, skin weights, UV layouts, edge loops, animation curves. Checks answer with numbers and a list of issues. Exports are read back from disk and compared with the scene.
That sheet is bmaya views --style influence --views front,right,persp -o views.png, drawn in a Maya without a window: a color per joint of the skin. The character is from Kenney's Animated Characters (CC0).
All commands with their options are on one page, with the exit codes. bmaya COMMAND --help explains each one with examples, and bmaya guide prints the manual for agents, one topic at a time.
The bridge listens on 127.0.0.1 only, on a random port, and every request carries a per-session token kept in ~/.bmaya/sessions/. This is not a sandbox: bmaya exec runs arbitrary Python in Maya with your user rights, and any local process that can read your home folder can read the token.
bmaya uninstall
uv tool uninstall bmaya-cliDelete ~/.bmaya/ if you don't need the logs.
uv sync
uv run pytest
uv run ruff check
"C:\Program Files\Autodesk\Maya2027\bin\mayapy.exe" tests/maya/check_handlers.pyThe tests don't need Maya. The last command checks the Maya-side handlers in Maya's own Python.
MIT, see LICENSE.
