| name | mx-version |
| description | Resolve the Mendix Studio Pro version a project was last opened with, and detect mismatches against installed Studio Pro / mx CLI / mxcli binaries on this machine. Read-only. Auto-invoke at the start of any Mendix session in a project, before running mx convert, and when a build/check produces unexplained errors. Also invocable as /mx-version. |
mx-version
Version triage. Catches "wrong-Studio-Pro-version" errors before they waste an hour. Wraps mx show-version and inspects the local toolchain.
When to invoke
Auto-invoke when:
- First Mendix command of a session in a project.
- About to run
mx convert (one-way operation -- know what you're converting from).
- An error mentions a version, version mismatch, or model schema.
- A teammate sends a project and you don't yet know which Studio Pro to open it with.
Do not invoke for:
- Repeated calls inside a session that already established the version.
What it does
- Locate
mx.exe. It's bundled with Studio Pro under <modeler>\mx.exe. The modeler can live in several roots — probe in this order:
C:\Program Files\Mendix\<version>\modeler\mx.exe (default vendor install)
C:\DevTools\Mendix\<version>\modeler\mx.exe (observed on this machine 2026-04-27 — the only install location)
(Get-Process studiopro -ErrorAction SilentlyContinue).Path | Split-Path -Parent then \mx.exe (cheap fallback when Studio Pro is currently running)
- Portable installs under
C:\workspace\ or wherever Neo's portable Mendix lives
If none of the above resolve, refuse and report the gap — do not guess.
- Read project version:
& <resolved-mx-path> show-version <project>.mpr.
- Inventory installed Mendix versions on this machine: scan all roots from step 1 for
*\<ver>\modeler\mx.exe patterns.
- Match: does an installed Studio Pro match the project's recorded version exactly?
- Inventory
mx and mxcli binaries on PATH:
mx is verb-based — there is no --version flag. Read FileVersion via Get-Item <mx.exe> | Select-Object -Expand VersionInfo instead.
mxcli --version (mendixlabs CLI).
- Synthesize the report:
## /mx-version
**Project recorded version:** <e.g., 11.6.0.4321> (from mx show-version)
**Studio Pro installs on this machine:**
- 11.9.1 -- C:\DevTools\Mendix\11.9.1\
- 11.6.0.4321 -- C:\Program Files\Mendix\11.6.0.4321\
- (portable) 11.7.0 -- <path>
**Match:** EXACT / NEAREST (11.6.0.4321 -> 11.6.x available) / MISSING (no compatible Studio Pro installed)
**`mx` on PATH:** version <X> (from <path>)
- Matches project: YES / NO -- if NO, prefix `mx` invocations with the matching install's path
**`mxcli` on PATH:** version <Y> -- validated for Mendix 11.6+ (project version: <ok|below floor>)
**Recommended command prefix for this session:**
- mx: `& "<resolved-mx-path>"` (e.g. `& "C:\DevTools\Mendix\11.9.1\modeler\mx.exe"`)
- mxcli: `mxcli` (PATH-resolved, fine)
**Action items:**
- (none) | Install Studio Pro <version> | Run `mx convert` to upgrade (irreversible -- pillar gates from mendix-safety.md apply)
- Stop. Read-only. No writes, no installs.
Hard rules
- Never auto-run
mx convert. It's irreversible. Report the conversion as an action item; let Neo trigger it through a write-tier skill that enforces the safety pillars.
- Prefer the exact-version
mx when calling mx check etc. from other skills. Pass the resolved binary path through.
- If multiple Studio Pro installs match, prefer the highest patch version of the same major.minor.
- Read-only, period.
Cross-reference
- Safety pillars:
~/.claude/rules/mendix-safety.md (esp. pillar 4 -- version >= 11.6 for mxcli writes).
- mxcli installer:
~/.claude/lib/Setup-Mxcli.ps1.