AI Chat
grüt includes an interactive AI chat panel that lets you have multi-turn conversations with an AI assistant directly inside the terminal — ask questions about your repository, generate commit messages, resolve conflicts, and execute tools.
Overview
The chat panel appears as a collapsible footer at the bottom of the interface. When collapsed it occupies a single row showing the input prompt. Expand it to see the full conversation history with streaming responses, tool calls, and markdown-formatted output.
Focus the chat panel and start typing to send a message. The AI streams its response in real time with an animated spinner. Previous messages stay visible so you can scroll back through the conversation.
Key Features
- Multi-turn conversations — the chat retains full conversation history so the AI understands context from earlier messages.
- Streaming responses — answers appear token-by-token as the AI generates them, so you see progress immediately.
- Tool calling — the AI can invoke built-in tools (file reads, git operations, GitHub queries) and show results inline. Destructive operations require confirmation before executing.
- Markdown rendering — responses are formatted with headings, code blocks, lists, and inline code for readability.
- Full-screen overlay — expand the chat to an overlay mode for longer conversations where you need more screen space.
Keybindings
| Key | Action |
|---|---|
| Enter | Send message |
| Esc | Exit chat / collapse panel |
| Up / Down | Scroll conversation history |
| Ctrl+L | Clear conversation |
Supported Providers
The chat panel works with any configured AI provider:
- GitHub Copilot — uses your existing Copilot subscription. No additional API key required.
- Claude (Anthropic) — requires an
ANTHROPIC_API_KEYenvironment variable.
Tool Execution
When the AI decides a tool call is needed, grüt executes it automatically and feeds the result back into the conversation. Tools include:
- File operations — read file contents within the repository
- Git operations — check status, view diffs, read logs
- GitHub operations — list issues, pull requests, workflows
Destructive operations (writes, deletes, pushes) always prompt for confirmation before executing.
Security
All data sent to the AI provider is subject to grüt's security pipeline:
- PII and secrets are redacted before transmission
- Every interaction is logged locally with timestamps and a summary
- Chat is opt-in — it never activates without explicit user action
Configuration Reference
[ai]
enabled = true # Enable AI features globally
provider = "copilot" # "copilot" | "claude" | "none"
[ai.chat]
enabled = true # Enable the chat panel
collapsed_height = 1 # Height in rows when collapsed
expanded_height = 20 # Height in rows when expanded
render_markdown = true # Format responses as markdown
system_prompt = "" # Custom system prompt override Related
- AI Integration — AI middleware for git operations
- Context Builder — select files for AI context
- Configuration — full config reference