Skip to content

CLI name collision: mex conflicts with TeX Live's mex binary on macOS #223

Description

@theDakshJaitly

Describe the bug
On macOS machines with TeX Live installed, command -v mex resolves to TeX Live's mex binary instead of our CLI. The lookup returns cleanly - but for the wrong program. Any setup step, doc, or script that checks for mex by name can pass while mex-agent isn't actually installed or runnable, and users can invoke the wrong binary without an obvious error. Reported by Jang Young Jeong (@akillness) in a hands-on audit: https://akillness.github.io/posts/mex-macos-command-collision/

To Reproduce

  1. On macOS with TeX Live installed, run command -v mex
  2. It resolves to the TeX Live binary, not mex-agent
  3. Install/verify steps that check mex by name pass incorrectly

Expected behavior
Install verification and docs should verify capability (the resolved binary actually responds as mex-agent, e.g. via mex --version signature), not just the name - or at minimum detect the collision and warn with the exact path conflict.

Command output
See the audit above for the reporter's exact output and his capability-check wrapper.

Environment

  • mex version: 0.7.1 runtime (0.8.2 source inspected separately in the audit)
  • Node.js version: see audit
  • OS: macOS with TeX Live installed
  • Install method: npm global

Additional context
Possible directions (open to discussion): collision detection + warning at install/first run; capability-based verification in setup and docs; README troubleshooting entry (alias / PATH ordering / wrapper); longer-term evaluation of the CLI name or an alternate alias (breaking-change territory, separate discussion). The same audit flags two other things worth their own issues if confirmed: a stale graph line-range until clean rebuild, and mex-mcp source present with no published npm package. Thanks @akillness for the careful writeup.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

bugSomething isn't workingcliRelated to CLI commandsdocumentationImprovements or additions to documentationgood first issueGood for newcomers

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions