Skip to content

Feature: Update kdm auth command to be interactive #140

@utkarsh232005

Description

@utkarsh232005

🎯 Goal

Convert the kdm auth command from flag-based CLI operations into an interactive credential manager dashboard with a provider list, multi-step configuration wizard, and inline editing.


📌 Current Behavior

kdm auth manages credentials, models, and endpoints for AI backend providers. KDM supports 10+ AI providers.

Subcommands:

Subcommand Description
kdm auth add Register credentials for a provider
kdm auth list List all configured providers (API keys masked)
kdm auth default <backend> Set the active default AI provider
kdm auth remove <backend> Remove configured settings for a provider
kdm auth update <backend> Update settings on a registered provider

Example usage:

kdm auth add -b openai -m gpt-4o -p sk-...
kdm auth default ollama
kdm auth list

🚀 Proposed Interactive Dashboard

Layout

  AI Provider Manager
  ──────────────────────────────────

  Provider       Model          Status
  ─────────────────────────────────────
  > OpenAI       gpt-4o         ✔ Default
    Ollama       llama3.1       ✔ Configured
    Anthropic    —              ✖ Not configured
    Gemini       —              ✖ Not configured

  ──────────────────────────────────
  [A] Add  [E] Edit  [D] Set Default  [R] Remove  [Q] Quit

Add Provider Wizard (press A)

  ┌─ Add AI Provider ─────────────────────┐
  │                                       │
  │  Step 1/4 — Provider:  openai         │
  │  Step 2/4 — Model:     gpt-4o         │
  │  Step 3/4 — API Key:   ************   │
  │  Step 4/4 — Temp:      0.7            │
  │                                       │
  │  [ENTER] Next   [ESC] Cancel          │
  └───────────────────────────────────────┘

User Flow

  1. User runs kdm auth → provider list loads.
  2. Use / to highlight a provider.
  3. Press a to open the Add Provider Wizard — a step-by-step form overlay.
  4. Press e to edit the selected provider's settings.
  5. Press d to set the selected provider as default.
  6. Press r to remove the selected provider (with confirmation prompt).

Keyboard Shortcuts

Key Action
/ Navigate providers
a Add new provider (wizard)
e Edit selected provider
d Set as default
r Remove provider
Enter Next step in wizard
Esc Cancel wizard
Q Quit

Recommended Libraries

Component Library
Text input (masked) ink-text-input with mask="*"
Wizard state React useState / useReducer
List ink-select-input

📋 Contribution Workflow

  1. Fork the repo and create a feature branch (e.g., feature/interactive-kdm-auth).
  2. Implement the interactive TUI for kdm auth using the layout and flow described above.
  3. Submit a PR explicitly linked to this issue (e.g., Closes #140).
  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