Quick start with mjviser CLI
mainYou can run the mjviser web-based viewer directly from the command line. It supports fuzzy path matching to find XML models in your current directory.
Installation options
- Using
uvx(no installation required):uvx mjviser path/to/model.xml - Using
pip:pip install mjviser mjviser path/to/model.xml
Common CLI usage
- Fuzzy matching: If you provide a partial name, it searches for matching
.xmlfiles (e.g.,mjviser humanoidfinds**/humanoid*.xml). - Custom port: Use
--portto change the binding port (default is 8080). - Loading robot_descriptions models: If
robot_descriptionsis installed, you can load models by name usinguvxwith the--withflag.
NOTE If your system Python is 3.14+ and you encounter build issues, explicitly specify a compatible Python version with
uvx -p 3.13.
# Run with a specific model
uvx mjviser path/to/model.xml
# Run with a specific port
mjviser model.xml --port 7070
# Load a model from robot_descriptions by name
uvx --with robot_descriptions mjviser go1