Submit an issue View all issues Source
MIR-662

Audit CLI commands for consistent --json output support

Done public
phinze phinze Opened Feb 5, 2026 Updated Mar 23, 2026

Several CLI commands output lists/tables but don't support --json for machine-readable output. We should audit and standardize this.

Pattern

Commands that output lists should use:

  • FormatOptions embedded struct (provides --json flag)
  • opts.IsJSON() check with structured output via PrintJSON()

Current gaps

Commands using ui.NewTable but missing JSON support:

  • app_history.go
  • debug_lsvd.go
  • debug_netdb.go
  • doctor_config.go

Tasks

  • Add JSON output to app_history.go (user-facing command)
  • Evaluate if debug/doctor commands need JSON (probably low priority)
  • Add CLAUDE.md guidance for this pattern so new commands follow it