feat: add AI assistant command with streaming output#139
feat: add AI assistant command with streaming output#139bmertens-datum wants to merge 1 commit intomainfrom
Conversation
Introduces `datumctl ai` — a natural-language assistant for managing Datum Cloud resources. Users can describe what they want in plain English and the assistant translates it into API operations, with confirmation gates before any write. NOTE: This is an early proof-of-concept shared to gather team feedback — not intended for production use yet. We'd love thoughts on the approach, tool design, and what you'd want to see next. Key capabilities: - Multi-provider LLM support: Anthropic Claude, OpenAI GPT, Google Gemini - Agentic loop with 7 built-in tools (list, get, apply, delete, validate, schema inspection, context switching) - Streaming responses with animated spinner: tokens are written to the terminal as they arrive rather than waiting for the full response - Interactive REPL mode and single-query / pipe mode - Confirmation gate for all mutating operations (apply, delete) - MCP server integration: same tools exposed via Model Context Protocol for use with Claude Desktop and other MCP clients - Per-user config at ~/.config/datumctl/ai.yaml (API keys, default model, default org/project) Supporting changes: - Extract RestConfigForContext helper from mcp command into client package - Add DiscoverResourceTypes and GetOpenAPISchema to K8sClient for environments where CRD access is restricted - Add CLI examples to auth and docs command groups Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@gianarb Here's what kubectl-ai does that datumctl ai currently doesn't: Session persistence Markdown rendering Raw shell/bash access User-defined tools MCP as a client Web UI Agent state machine Local/private models Auto-confirm mode |
|
I am going to try this out tomorrow! but it looks great! I am wondering if we can take the opportunity here to add a datumctl subcommand experimental or alpha where we can move some of the commands that are "approach to validate" like this and mcp so we can merge it quickly and communicate that we are "trying it out" |
|
@gianarb I like the idea of having a way to enable experimental functionality like this within the CLI as long as we don't fully hide it from the user. |
Introduces
datumctl ai— a natural-language assistant for managing Datum Cloud resources. Users can describe what they want in plain English and the assistant translates it into API operations, with confirmation gates before any write.NOTE: This is an early proof-of-concept shared to gather team feedback — not intended for production use yet. We'd love thoughts on the approach, tool design, and what you'd want to see next.
Key capabilities:
Supporting changes: