Problem
Current table-formatted output is optimized for human reading but inefficient for programmatic/AI consumption:
- Truncation — Column values get truncated (
...) when they exceed display width, requiring multiple follow-up queries to get full qualified names
- Parsing overhead — Table borders (
│, ─, ┼) waste tokens and require error-prone parsing
- No machine-readable format — No way to pipe output into other tools reliably
Proposal
Add --json (or --format json) flag to all output commands:
./mxcli -p app.mpr -c "SHOW ENTITIES IN Sales" --json
./mxcli -p app.mpr -c "DESCRIBE MICROFLOW Sales.ACT_Save" --json
./mxcli -p app.mpr -c "SHOW STRUCTURE IN Sales DEPTH 2" --json
Benefits
- Eliminates truncation — JSON naturally includes full values
- Zero parsing cost for AI agents — structured data directly usable
- Composable — enables piping into
jq, other tools, or batch processing scripts
- Backward compatible — table format remains the default
Suggested output example
{
"command": "SHOW ENTITIES IN Sales",
"results": [
{"qualifiedName": "Sales.Customer", "persistent": true, "attributes": 5, "associations": 2},
{"qualifiedName": "Sales.Order", "persistent": true, "attributes": 8, "associations": 3}
]
}
Priority
High — this is a force multiplier for all other improvements. Without structured output, every other enhancement still requires table parsing.
Copied from engalar#49
Problem
Current table-formatted output is optimized for human reading but inefficient for programmatic/AI consumption:
...) when they exceed display width, requiring multiple follow-up queries to get full qualified names│,─,┼) waste tokens and require error-prone parsingProposal
Add
--json(or--format json) flag to all output commands:Benefits
jq, other tools, or batch processing scriptsSuggested output example
{ "command": "SHOW ENTITIES IN Sales", "results": [ {"qualifiedName": "Sales.Customer", "persistent": true, "attributes": 5, "associations": 2}, {"qualifiedName": "Sales.Order", "persistent": true, "attributes": 8, "associations": 3} ] }Priority
High — this is a force multiplier for all other improvements. Without structured output, every other enhancement still requires table parsing.
Copied from engalar#49