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: implement CLI output formatting system (Spec 014)
Add unified output formatting for CLI commands with support for
table, JSON, and YAML formats.
Key features:
- Global `-o/--output` flag for format selection (table/json/yaml)
- `--json` shorthand for `-o json`
- `--help-json` flag for machine-readable command discovery
- `MCPPROXY_OUTPUT` environment variable for default format
- Structured error output with recovery hints
Implementation:
- New `internal/cli/output/` package with OutputFormatter interface
- JSONFormatter: pretty-printed, snake_case fields, empty arrays as []
- TableFormatter: aligned columns, Unicode indicators, NO_COLOR support
- YAMLFormatter: using yaml.v3
- HelpInfo types for structured help output
Migrated commands:
- upstream list: full format support
- tools list: full format support
- secrets list: full format support (removed local --json flag)
- call tool: JSON formatter for -o json
Documentation:
- docs/cli-output-formatting.md: complete usage guide
- Updated CLAUDE.md with output formatting section
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
0 commit comments