🎯 Goal
Convert the kdm serve command from a headless daemon start into an interactive server control dashboard with live request logging, server controls, and resource metrics.
📌 Current Behavior
kdm serve starts the KDM server daemon in either REST API mode or JSON-RPC Model Context Protocol (MCP) mode.
Options:
| Flag |
Description |
-p, --port <port> |
HTTP server port (default: 8080) |
--metrics-port <port> |
Metrics server port |
-b, --backend <backend> |
Default active AI backend |
-f, --filter <filter> |
Default analyzer filter |
--http |
Force HTTP mode (default) |
--mcp |
Start in MCP mode (JSON-RPC stdio) |
Example usage:
kdm serve --port 8080
kdm serve --mcp
🚀 Proposed Interactive Dashboard
Layout
KDM Server Dashboard ● RUNNING
──────────────────────────────────────────────────────
Host: localhost CPU: 20%
Port: 8080 RAM: 150MB
Mode: HTTP Uptime: 2h 15m
──────────────────────────────────────────────────────
Request Log
──────────────────────────────────────────────────────
12:01:02 GET /health 200 12ms
12:01:05 POST /analyze 200 1.2s
12:02:10 POST /rpc 200 340ms
12:03:01 GET /health 200 8ms
──────────────────────────────────────────────────────
[S] Stop/Start [R] Restart [P] Change Port [C] Clear Log [Q] Quit
User Flow
- User runs
kdm serve → server starts, dashboard appears with live metrics.
- Incoming HTTP requests scroll in the request log panel in real time.
- Press
s to stop/start the server (status toggles between ● RUNNING and ● STOPPED).
- Press
r to restart the server.
- Press
p to open an inline input to change the port:
- Press
c to clear the request log.
- Press
Q to quit and stop the server.
Keyboard Shortcuts
| Key |
Action |
s |
Toggle server start/stop |
r |
Restart server |
p |
Change port (inline input) |
c |
Clear request log |
Q |
Quit |
Recommended Libraries
📋 Contribution Workflow
- Fork the repo and create a feature branch (e.g.,
feature/interactive-kdm-serve).
- Implement the interactive TUI for
kdm serve using the layout and flow described above.
- Submit a PR explicitly linked to this issue (e.g.,
Closes #144).
- 📸 Include a screenshot or recording of the implemented UI in your PR to verify the new dashboard experience.
🎯 Goal
Convert the
kdm servecommand from a headless daemon start into an interactive server control dashboard with live request logging, server controls, and resource metrics.📌 Current Behavior
kdm servestarts the KDM server daemon in either REST API mode or JSON-RPC Model Context Protocol (MCP) mode.Options:
-p, --port <port>8080)--metrics-port <port>-b, --backend <backend>-f, --filter <filter>--http--mcpExample usage:
🚀 Proposed Interactive Dashboard
Layout
User Flow
kdm serve→ server starts, dashboard appears with live metrics.sto stop/start the server (status toggles between● RUNNINGand● STOPPED).rto restart the server.pto open an inline input to change the port:cto clear the request log.Qto quit and stop the server.Keyboard Shortcuts
srpcQRecommended Libraries
ink-gradientink-spinnerchalkink-text-input📋 Contribution Workflow
feature/interactive-kdm-serve).kdm serveusing the layout and flow described above.Closes #144).