Description
Running mlx-stack config set memory-budget-pct -5 produces:
Error: No such option: -5
Click interprets -5 as a CLI flag instead of a value argument. This is a known Click limitation when positional arguments start with -.
Steps to Reproduce
mlx-stack config set memory-budget-pct -5
# Expected: "Invalid memory budget '-5'. Must be between 1 and 100."
# Actual: "Error: No such option: -5"
Expected Behavior
Negative values should be passed through to the validation layer, which already correctly rejects out-of-range values (tested: 200 correctly produces "Must be between 1 and 100").
Possible Fixes
- Use Click's
nargs or type handling to prevent flag interpretation
- Add
context_settings=dict(ignore_unknown_options=True)
- Document that
-- separator can be used: mlx-stack config set -- memory-budget-pct -5
Impact
Low — edge case, but the error message is confusing and misleading.
Description
Running
mlx-stack config set memory-budget-pct -5produces:Click interprets
-5as a CLI flag instead of a value argument. This is a known Click limitation when positional arguments start with-.Steps to Reproduce
Expected Behavior
Negative values should be passed through to the validation layer, which already correctly rejects out-of-range values (tested:
200correctly produces "Must be between 1 and 100").Possible Fixes
nargsor type handling to prevent flag interpretationcontext_settings=dict(ignore_unknown_options=True)--separator can be used:mlx-stack config set -- memory-budget-pct -5Impact
Low — edge case, but the error message is confusing and misleading.