Skip to content

Feature: Update kdm filters command to be interactive #142

@utkarsh232005

Description

@utkarsh232005

🎯 Goal

Convert the kdm filters command from a plain add/remove/list CLI into an interactive multi-select checklist where users can toggle analyzers on and off with instant persistence.


📌 Current Behavior

kdm filters configures default active analyzers to filter what kdm analyze checks.

Subcommands:

Subcommand Description
kdm filters list List active and inactive analyzers
kdm filters add <name> Add an analyzer to the active list
kdm filters remove <name> Remove an analyzer from the active list

Example usage:

kdm filters list
kdm filters add Ingress

🚀 Proposed Interactive Dashboard

Layout

  Analyzer Filters                    Active: 5 / 12
  ──────────────────────────────────────────────────────

  [x] Pod
  [x] Deployment
  [x] Service
  [ ] Ingress
  [x] CronJob
  [ ] StatefulSet
  [ ] DaemonSet
  [x] ReplicaSet
  [ ] PersistentVolumeClaim
  [ ] NetworkPolicy
  [ ] HPA
  [ ] Node

  ──────────────────────────────────────────────────────
  SPACE:Toggle  ↑↓:Navigate  Q:Quit (changes auto-saved)

User Flow

  1. User runs kdm filters → checklist loads with current active/inactive state.
  2. Use / to move cursor.
  3. Press Space to toggle a checkbox on/off.
  4. The header counter updates instantly (e.g., Active: 5 / 12Active: 6 / 12).
  5. Changes auto-save — no explicit save step needed.
  6. Press Q to quit.

Keyboard Shortcuts

Key Action
/ Navigate analyzer list
Space Toggle analyzer on/off
Q Quit

Recommended Libraries

Component Library
Checkbox Custom Ink component using [ ] / [x] with useState
Colors chalk

📋 Contribution Workflow

  1. Fork the repo and create a feature branch (e.g., feature/interactive-kdm-filters).
  2. Implement the interactive TUI for kdm filters using the layout and flow described above.
  3. Submit a PR explicitly linked to this issue (e.g., Closes #142).
  4. 📸 Include a screenshot or recording of the implemented UI in your PR to verify the new dashboard experience.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions