You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
feat: add unified --json output format for all commands (#134)
Add a global --json flag that produces machine-readable JSON output from
any SHOW or DESCRIBE command, eliminating truncation and table parsing
overhead for programmatic/AI consumption.
- Add OutputFormat type, TableResult struct, and writeResult/writeDescribeJSON
helpers in mdl/executor/format.go
- Convert ~30 SHOW handlers to use writeResult() instead of inline fprintf
- Wrap all DESCRIBE handlers with writeDescribeJSON() at the dispatch level
- Wire --json persistent flag in CLI, with resolveFormat() for commands
that already have --format flags (search, lint, check, report, describe)
- Add format_test.go with table, JSON, empty, and describe passthrough tests
- Update MDL_QUICK_REFERENCE.md with --json usage
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
0 commit comments