🎯 Goal
Convert the kdm analyze command from static text output into a split-pane diagnostic dashboard with an error list, AI-powered explanations, and executable fix suggestions.
📌 Current Behavior
kdm analyze scans Kubernetes resources for configuration errors and operational problems. Supports AI-powered troubleshooting explanations.
Key Options:
| Flag |
Description |
-n, --namespace <ns> |
Limit to a specific namespace |
-f, --filter <filter> |
Run a specific analyzer (e.g., Pod, Ingress) |
-e, --explain |
AI-powered diagnosis explanations |
-b, --backend <backend> |
Force a specific AI backend |
-o, --output <format> |
Output format: text or json |
-a, --anonymize |
Mask resource names in AI prompt |
Example usage:
kdm analyze
kdm analyze -n default --explain
kdm analyze --explain --backend ollama --language spanish
🚀 Proposed Interactive Dashboard
Layout
┌───────────────────┬──────────────────────────────────────┐
│ Errors (3) │ AI Explanation │
├───────────────────┼──────────────────────────────────────┤
│ │ │
│ > ✖ CrashLoop │ Cause: │
│ ✖ DNS Error │ Container exceeded memory limit. │
│ ✖ OOMKilled │ │
│ │ Fix: │
│ │ kubectl edit deployment app │
│ │ │
│ │ Increase memory: │
│ │ 512Mi -> 1Gi │
│ │ │
│ │ Press ENTER to execute fix. │
├───────────────────┴──────────────────────────────────────┤
│ N:Namespace B:Backend ENTER:Execute Fix Q:Quit │
└──────────────────────────────────────────────────────────┘
User Flow
- User runs
kdm analyze → left panel lists detected errors, right panel is empty.
- Use
↑ / ↓ to select an error on the left.
- The right panel asynchronously loads the AI explanation (loading spinner while fetching).
- If a fix command is suggested, highlight it and press
Enter to execute it directly.
- Press
n to open a namespace selector popup:
Select namespace:
> default
production
staging
- Press
b to switch the AI backend provider.
Keyboard Shortcuts
| Key |
Action |
↑ / ↓ |
Navigate error list |
Enter |
Execute suggested fix command |
n |
Switch namespace |
b |
Change AI backend |
Q |
Quit |
Recommended Libraries
📋 Contribution Workflow
- Fork the repo and create a feature branch (e.g.,
feature/interactive-kdm-analyze).
- Implement the interactive TUI for
kdm analyze using the layout and flow described above.
- Submit a PR explicitly linked to this issue (e.g.,
Closes #139).
- 📸 Include a screenshot or recording of the implemented UI in your PR to verify the new dashboard experience.
🎯 Goal
Convert the
kdm analyzecommand from static text output into a split-pane diagnostic dashboard with an error list, AI-powered explanations, and executable fix suggestions.📌 Current Behavior
kdm analyzescans Kubernetes resources for configuration errors and operational problems. Supports AI-powered troubleshooting explanations.Key Options:
-n, --namespace <ns>-f, --filter <filter>Pod,Ingress)-e, --explain-b, --backend <backend>-o, --output <format>textorjson-a, --anonymizeExample usage:
🚀 Proposed Interactive Dashboard
Layout
User Flow
kdm analyze→ left panel lists detected errors, right panel is empty.↑/↓to select an error on the left.Enterto execute it directly.nto open a namespace selector popup:bto switch the AI backend provider.Keyboard Shortcuts
↑/↓EnternbQRecommended Libraries
marked+ custom terminal rendererterminal-linkink-spinner<Box>flexbox📋 Contribution Workflow
feature/interactive-kdm-analyze).kdm analyzeusing the layout and flow described above.Closes #139).