[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-73266":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":15,"contributorsCount":16,"subscribersCount":16,"size":16,"stars1d":17,"stars7d":18,"stars30d":19,"stars90d":16,"forks30d":16,"starsTrendScore":20,"compositeScore":21,"rankGlobal":10,"rankLanguage":10,"license":22,"archived":23,"fork":23,"defaultBranch":24,"hasWiki":25,"hasPages":25,"topics":26,"createdAt":10,"pushedAt":10,"updatedAt":37,"readmeContent":38,"aiSummary":39,"trendingCount":16,"starSnapshotCount":16,"syncStatus":40,"lastSyncTime":41,"discoverSource":42},73266,"gonzo","control-theory\u002Fgonzo","control-theory","Gonzo! The Go based TUI log analysis tool","https:\u002F\u002Fwww.controltheory.com\u002Fgonzo\u002F",null,"Go",2679,96,13,18,0,3,10,34,9,27.96,"MIT License",false,"main",true,[27,28,29,30,31,32,33,34,35,36],"ai","golang","logs","ollama","openai","opentelemetry","otel","otlp","terminal","tui","2026-06-12 02:03:11","\n\u003Cp align=\"center\">\n\u003Ca href=\"https:\u002F\u002Fcontroltheory.com\">\u003Cimg src=\"docs\u002Fsponsor-controltheory-dstl8.png\" alt=\"Sponsored by ControlTheory: Dstl8\">\u003C\u002Fa>\n\u003C\u002Fp>\n\n# Gonzo - The Go based TUI for log analysis\n\n🆕 **NEW:** Press `d` from any Gonzo view to launch [Dstl8.Lite](#dstl8-lite) ↓ - a local browser-based dashboard with workspaces, log search, and severity heatmaps.\n\n\u003Cp align=\"center\">\u003Cimg src=\"docs\u002Fgonzo-mascot-smaller.png\" width=\"250\" alt=\"Gonzo Mascot\">\u003C\u002Fp>\n\n[![Go Version](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fgo-%3E%3D1.21-blue)](https:\u002F\u002Fgo.dev\u002F)\n[![License: MIT](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FLicense-MIT-yellow.svg)](https:\u002F\u002Fopensource.org\u002Flicenses\u002FMIT)\n[![PRs Welcome](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FPRs-welcome-brightgreen.svg)](.\u002FCONTRIBUTING.md)\n[![Docs](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FDocs-Getting%20Started-cyan.svg)](https:\u002F\u002Fdocs.controltheory.com\u002F)\n[![skills.sh](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002Fskills.sh-listed-blue)](https:\u002F\u002Fskills.sh\u002Fcontrol-theory\u002Fgonzo)\n\n\nA powerful, real-time log analysis terminal UI inspired by k9s. Analyze log streams with beautiful charts, AI-powered insights, and advanced filtering.\n\nHere are some references to get you started:\n\n- **[Documentation](https:\u002F\u002Fdocs.controltheory.com\u002F)** - Complete docs, getting started, reference guide\n- **[Usage Guide](USAGE_GUIDE.md)** - Detailed usage instructions and examples\n- **[Contributing Guide](CONTRIBUTING.md)** - How to contribute to the project\n- **[Integration Examples](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples)** - Works with [Vercel](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Fvercel-logs), [Supabase](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Fsupabase-logs), [Railway](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Frailway-logs), [Cloudflare Workers](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Fcloudflare-logs), [Netlify](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Fnetlify-logs), [Fly.io](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Ffly.io-logs), [Render](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Frender-logs), [AWS CloudWatch](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples\u002Faws-cloudwatch-logs), and [more](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fintegration-examples).\n- **[Advanced Features](https:\u002F\u002Fdocs.controltheory.com\u002Fcontroltheory-documentation\u002Fgonzo-docs\u002Fadvanced-features)** - AI, OTel, Custom Log Formats\n- **[Releases](https:\u002F\u002Fgithub.com\u002Fcontrol-theory\u002Fgonzo\u002Freleases)** - Download the latest version\n\n### See it in action\n\n![Gonzo Walkthrough](docs\u002Fgonzo_video_walkthrough.gif)\n\n### Main Dashboard\n\n![Gonzo Main Dashboard](docs\u002Fgonzo-main.png)\n\n### Stats and Info\n\n![Gonzo Stats](docs\u002Fgonzo-stats.png)\n\n### Everyone loves a heatmap\n\n![Gonzo Heatmap](docs\u002Fgonzo-heatmap.png)\n\n\u003Ca id=\"dstl8-lite\">\u003C\u002Fa>\n\n### Press `d` for Dstl8.Lite\n\nHit `d` from any Gonzo view to launch Dstl8.Lite - a local GUI that streams the same logs Gonzo is analyzing into a richer, browser-based dashboard with workspaces, pattern detection, severity heatmaps, and live log search. All running locally and powered by Gonzo under the hood.\n\n\u003Cp align=\"center\">\n  \u003Cimg src=\"docs\u002Fdstl8-lite-live-logs.gif\" alt=\"Dstl8.Lite Live Logs\">\n\u003C\u002Fp>\n\n#### Log viewer with severity filtering and live search\n\n![Dstl8.Lite Logs](docs\u002Fdstl8-lite-logs.png)\n\n#### Severity heatmap across pods\n\n![Dstl8.Lite Heatmap](docs\u002Fdstl8-lite-heatmap-by-pod.png)\n\n## ✨ Features\n\n### 🎯 Real-Time Analysis\n\n- **Live streaming** - Process logs as they arrive from stdin, files, or network\n- **Kubernetes native** - Direct integration with Kubernetes clusters for pod log streaming\n- **OTLP native** - First-class support for OpenTelemetry log format\n- **OTLP receiver** - Built-in gRPC server to receive logs via OpenTelemetry protocol\n- **Format detection** - Automatically detects JSON, logfmt, and plain text\n- **Custom formats** - Define your own log formats with YAML configuration\n- **Severity tracking** - Color-coded severity levels with distribution charts\n\n### 📈 Interactive Dashboard\n\n- **k9s-inspired layout** - Familiar 2x2 grid interface\n- **Real-time charts** - Word frequency, attributes, severity distribution, and time series\n- **Keyboard + mouse navigation** - Vim-style shortcuts plus click-to-navigate and scroll wheel support\n- **Smart log viewer** - Auto-scroll with intelligent pause\u002Fresume behavior\n- **Fullscreen log viewer** - Press `f` to open a dedicated fullscreen modal for log browsing with all navigation features\n- **Global pause control** - Spacebar pauses entire dashboard while buffering logs\n- **Modal details** - Deep dive into individual log entries with expandable views\n- **Log Counts analysis** - Detailed modal with heatmap visualization, pattern analysis by severity, and service distribution\n- **AI analysis** - Get intelligent insights about log patterns and anomalies with configurable models\n\n### 🌐 Web Dashboard (Dstl8 Lite)\n\n- **Embedded React UI** - Full web dashboard served directly from the Gonzo binary (no external dependencies)\n- **Real-time updates** - WebSocket-powered live streaming with 1-second refresh\n- **Severity distribution** - Interactive time-series severity charts with stream-level filtering\n- **Sentiment heatmap** - Color-coded heatmap visualization grouped by pod, namespace, service, host, or deployment\n- **Pattern analysis** - Drain3-powered log pattern detection and classification\n- **Log viewer** - Searchable, auto-scrolling log viewer with click-to-expand details\n- **Source browser** - Explore log sources with dimension breakdowns\n- **Light\u002Fdark mode** - Automatic theme support\n\n### 🔍 Advanced Filtering\n\n- **Regex support** - Filter logs with regular expressions\n- **Attribute search** - Find logs by specific attribute values\n- **Severity filtering** - Interactive modal to select specific log levels (Ctrl+f)\n- **Kubernetes filtering** - Filter by namespace and pod with interactive selection (Ctrl+k)\n- **Multi-level selection** - Enable\u002Fdisable multiple severity levels at once\n- **Interactive selection** - Click or keyboard navigate to explore logs\n\n### 🎨 Customizable Themes\n\n- **Built-in skins** - 11+ beautiful themes including Dracula, Nord, Monokai, GitHub Light, and more\n- **Light and dark modes** - Themes optimized for different lighting conditions\n- **Custom skins** - Create your own color schemes with YAML configuration\n- **Semantic colors** - Intuitive color mapping for different UI components\n- **Professional themes** - ControlTheory original themes included\n\n### 🤖 AI-Powered Insights\n\n- **Pattern detection** - Automatically identify recurring issues\n- **Anomaly analysis** - Spot unusual patterns in your logs\n- **Root cause suggestions** - Get AI-powered debugging assistance\n- **Configurable models** - Choose from GPT-4, GPT-3.5, Claude Sonnet\u002FHaiku\u002FOpus, or any custom model\n- **Multiple providers** - Works with OpenAI, Claude Code, LM Studio, Ollama, or any OpenAI-compatible API\n- **Local AI support** - Run completely offline with local models\n\n## 🚀 Quick Start\n\n### Installation\n\n#### Using Go\n\n```bash\ngo install github.com\u002Fcontrol-theory\u002Fgonzo\u002Fcmd\u002Fgonzo@latest\n```\n\n#### Using Homebrew (macOS\u002FLinux)\n\n```bash\nbrew install gonzo\n```\n\n#### Download Binary\n\nDownload the latest release for your platform from the [releases page](https:\u002F\u002Fgithub.com\u002Fcontrol-theory\u002Fgonzo\u002Freleases).\n\n#### Using Nix package manager (beta support)\n\n```bash\nnix run github:control-theory\u002Fgonzo\n```\n\n#### Build from Source\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fcontrol-theory\u002Fgonzo.git\ncd gonzo\nmake build\n```\n\n#### Using with Claude Code (plugin and skill)\n\nThis repo includes a Claude Code plugin with a guided log-analysis skill. Inside Claude Code:\n\n```\n\u002Fplugin marketplace add control-theory\u002Fgonzo\n\u002Fplugin install gonzo@gonzo\n```\n\nThen ask Claude to \"tail my logs\", \"watch my Vercel logs\", or \"analyze my Kubernetes logs\". The skill detects your deployment platform, installs Gonzo if needed, configures AI analysis, and generates the right pipe command with platform-specific normalizers. See `skills\u002Fgonzo\u002F` for the skill content.\n\n## 📖 Usage\n\n### Basic Usage\n\n```bash\n# Read logs directly from files\ngonzo -f application.log\n\n# Read from multiple files\ngonzo -f application.log -f error.log -f debug.log\n\n# Use glob patterns to read multiple files\ngonzo -f \"\u002Fvar\u002Flog\u002F*.log\"\ngonzo -f \"\u002Fvar\u002Flog\u002Fapp\u002F*.log\" -f \"\u002Fvar\u002Flog\u002Fnginx\u002F*.log\"\n\n# Follow log files in real-time (like tail -f)\ngonzo -f \u002Fvar\u002Flog\u002Fapp.log --follow\ngonzo -f \"\u002Fvar\u002Flog\u002F*.log\" --follow\n\n# Analyze logs from stdin (traditional way)\ncat application.log | gonzo\n\n# Stream logs directly from Kubernetes clusters\ngonzo --k8s-enabled=true --k8s-namespaces=default\ngonzo --k8s-enabled=true --k8s-namespaces=production --k8s-namespaces=staging\ngonzo --k8s-enabled=true --k8s-selector=\"app=my-app\"\n\n# Stream logs from kubectl (traditional way)\nkubectl logs -f deployment\u002Fmy-app | gonzo\n\n# Follow system logs\ntail -f \u002Fvar\u002Flog\u002Fsyslog | gonzo\n\n# Analyze Docker container logs\ndocker logs -f my-container 2>&1 | gonzo\n\n# With AI analysis (requires API key)\nexport OPENAI_API_KEY=sk-your-key-here\ngonzo -f application.log --ai-model=\"gpt-4\"\n\n# Press `d` once Gonzo is running to launch the Dstl8.Lite GUI in your browser\n```\n\n### Custom Log Formats\n\nGonzo supports custom log formats through YAML configuration files. This allows you to parse any structured log format without modifying the source code.\n\nSome example custom formats are included in the repo, simply download, copy, or modify as you like!\nIn order for the commands below to work, you must first download them and put them in the Gonzo config directory.\n\n```bash\n# Use a built-in custom format\ngonzo --format=loki-stream -f loki_logs.json\n\n# List available custom formats\nls ~\u002F.config\u002Fgonzo\u002Fformats\u002F\n\n# Use your own custom format\ngonzo --format=my-custom-format -f custom_logs.txt\n```\n\nCustom formats support:\n- **Flexible field mapping** - Map any JSON\u002Ftext fields to timestamp, severity, body, and attributes\n- **Batch processing** - Automatically expand batch formats (like Loki) into individual log entries\n- **Auto-mapping** - Automatically extract all unmapped fields as attributes\n- **Nested field extraction** - Extract fields from deeply nested JSON structures\n- **Pattern-based parsing** - Use regex patterns for unstructured text logs\n\nFor detailed information on creating custom formats, see the [Custom Formats Guide](guides\u002FCUSTOM_FORMATS.md).\n\n### OTLP Network Receiver\n\nGonzo can receive logs directly via OpenTelemetry Protocol (OTLP) over both gRPC and HTTP:\n\n```bash\n# Start Gonzo as an OTLP receiver (both gRPC on port 4317 and HTTP on port 4318)\ngonzo --otlp-enabled\n\n# Use custom ports\ngonzo --otlp-enabled --otlp-grpc-port=5317 --otlp-http-port=5318\n\n# gRPC endpoint: localhost:4317\n# HTTP endpoint: http:\u002F\u002Flocalhost:4318\u002Fv1\u002Flogs\n```\n\n#### Example: OpenTelemetry Collector Configuration\n\n**Using gRPC:**\n\n```yaml\nexporters:\n  otlp\u002Fgonzo_grpc:\n    endpoint: localhost:4317\n    tls:\n      insecure: true\n\nservice:\n  pipelines:\n    logs:\n      receivers: [your_receivers]\n      processors: [your_processors]\n      exporters: [otlp\u002Fgonzo_grpc]\n```\n\n**Using HTTP:**\n\n```yaml\nexporters:\n  otlphttp\u002Fgonzo_http:\n    endpoint: http:\u002F\u002Flocalhost:4318\u002Fv1\u002Flogs\n\nservice:\n  pipelines:\n    logs:\n      receivers: [your_receivers]\n      processors: [your_processors]\n      exporters: [otlphttp\u002Fgonzo_http]\n```\n\n#### Example: Python Application\n\n**Using gRPC:**\n\n```python\nfrom opentelemetry.exporter.otlp.proto.grpc._log_exporter import OTLPLogExporter\n\nexporter = OTLPLogExporter(\n    endpoint=\"localhost:4317\",\n    insecure=True\n)\n```\n\n**Using HTTP:**\n\n```python\nfrom opentelemetry.exporter.otlp.proto.http._log_exporter import OTLPLogExporter\n\nexporter = OTLPLogExporter(\n    endpoint=\"http:\u002F\u002Flocalhost:4318\u002Fv1\u002Flogs\",\n)\n```\n\nSee `examples\u002Fsend_otlp_logs.py` for a complete example.\n\n### With AI Analysis\n\n```bash\n# Auto-select best available model (recommended) - file input\nexport OPENAI_API_KEY=sk-your-key-here\ngonzo -f logs.json\n\n# Or specify a particular model - file input\nexport OPENAI_API_KEY=sk-your-key-here\ngonzo -f logs.json --ai-model=\"gpt-4\"\n\n# Follow logs with AI analysis\nexport OPENAI_API_KEY=sk-your-key-here\ngonzo -f \"\u002Fvar\u002Flog\u002Fapp.log\" --follow --ai-model=\"gpt-4\"\n\n# Using local LM Studio (auto-selects first available)\nexport OPENAI_API_KEY=\"local-key\"\nexport OPENAI_API_BASE=\"http:\u002F\u002Flocalhost:1234\u002Fv1\"\ngonzo -f logs.json\n\n# Using Ollama (auto-selects best model like gpt-oss:20b)\nexport OPENAI_API_KEY=\"ollama\"\nexport OPENAI_API_BASE=\"http:\u002F\u002Flocalhost:11434\"\ngonzo -f logs.json --follow\n\n# Using Claude Code (uses sonnet by default)\ngonzo --ai-provider=claude-code -f logs.json\n\n# Claude Code with specific model\ngonzo --ai-provider=claude-code --ai-model=haiku -f \u002Fvar\u002Flog\u002Fapp.log --follow\n\n# Traditional stdin approach still works\nexport OPENAI_API_KEY=sk-your-key-here\ncat logs.json | gonzo --ai-model=\"gpt-4\"\n```\n\n### Web Dashboard (Dstl8 Lite)\n\nGonzo includes an embedded web dashboard that runs alongside the TUI. It starts automatically on port 5718.\n\n```bash\n# Gonzo starts the web dashboard automatically\ngonzo -f application.log --follow\n# Open http:\u002F\u002Flocalhost:5718 in your browser\n\n# Use a custom port\ngonzo -f application.log --web-port=3000\n\n# Disable the web dashboard\ngonzo -f application.log --web-disabled\n```\n\nThe dashboard includes:\n- **Workspaces** - Overview of all active log streams with sparkline previews\n- **Stream Details** - Severity distribution, top attributes, pattern analysis, and live log viewer per stream\n- **Sentiment Heatmap** - Real-time heatmap grouped by pod, namespace, service, host, or deployment with auto-detection of available dimensions\n- **Sources** - Browse log sources with dimension breakdowns\n\nAll data updates in real-time via WebSocket, matching what you see in the TUI.\n\n### Keyboard Shortcuts\n\n#### Navigation\n\n| Key\u002FMouse           | Action                                                   |\n| ------------------- | -------------------------------------------------------- |\n| `Tab` \u002F `Shift+Tab` | Navigate between panels                                  |\n| `Mouse Click`       | Click on any section to switch to it                     |\n| `↑`\u002F`↓` or `k`\u002F`j`  | Move selection up\u002Fdown                                   |\n| `Mouse Wheel`       | Scroll up\u002Fdown to navigate selections                    |\n| `←`\u002F`→` or `h`\u002F`l`  | Horizontal navigation                                    |\n| `Enter`             | View log details or open analysis modal (Counts section) |\n| `ESC`               | Close modal\u002Fcancel                                       |\n\n#### Actions\n\n| Key            | Action                                    |\n| -------------- | ----------------------------------------- |\n| `Space`        | Pause\u002Funpause entire dashboard            |\n| `\u002F`            | Enter filter mode (regex supported)       |\n| `s`            | Search and highlight text in logs         |\n| `d`            | Launch Dstl8.Lite GUI in browser          |\n| `Ctrl+f`       | Open severity filter modal                |\n| `Ctrl+k`       | Open Kubernetes filter modal (k8s mode)   |\n| `f`            | Open fullscreen log viewer modal          |\n| `c`            | Toggle columns (Host\u002FService ↔ Namespace\u002FPod in k8s mode) |\n| `C`            | Configure visible columns (column picker) |\n| `r`            | Reset all data (manual reset)             |\n| `u` \u002F `U`      | Cycle update intervals (forward\u002Fbackward) |\n| `i`            | AI analysis (in detail view)              |\n| `m`            | Switch AI model (shows available models)  |\n| `?` \u002F `h`      | Show help                                 |\n| `q` \u002F `Ctrl+C` | Quit                                      |\n\n#### Log Viewer Navigation\n\n| Key                | Action                                        |\n| ------------------ | --------------------------------------------- |\n| `Home`             | Jump to top of log buffer (stops auto-scroll) |\n| `End`              | Jump to latest logs (resumes auto-scroll)     |\n| `PgUp` \u002F `PgDn`    | Navigate by pages (10 entries at a time)      |\n| `↑`\u002F`↓` or `k`\u002F`j` | Navigate entries with smart auto-scroll       |\n\n#### AI Chat (in log detail modal)\n\n| Key   | Action                                   |\n| ----- | ---------------------------------------- |\n| `c`   | Start chat with AI about current log     |\n| `Tab` | Switch between log details and chat pane |\n| `m`   | Switch AI model (works in modal too)     |\n\n#### Severity Filter Modal\n\nThe severity filter modal (`Ctrl+f`) provides fine-grained control over which log levels to display:\n\n| Key                | Action                                            |\n| ------------------ | ------------------------------------------------- |\n| `↑`\u002F`↓` or `k`\u002F`j` | Navigate severity options                         |\n| `Space`            | Toggle selected severity level on\u002Foff             |\n| `Enter`            | Apply filter and close modal (or select All\u002FNone) |\n| `ESC`              | Cancel changes and close modal                    |\n\n**Features:**\n- **Select All** - Quick option to enable all severity levels (Enter to apply and close)\n- **Select None** - Quick option to disable all severity levels (Enter to apply and close)\n- **Individual toggles** - Enable\u002Fdisable specific levels (FATAL, ERROR, WARN, INFO, DEBUG, TRACE, etc.)\n- **Color-coded display** - Each severity level shows in its standard color\n- **Real-time count** - Header shows how many levels are currently active\n- **Persistent filtering** - Applied filters remain active until changed\n- **Quick shortcuts** - Press Enter on Select All\u002FNone to apply immediately\n\n#### Column Picker Modal\n\nThe column picker modal (`C` key) lets you configure which columns are visible in the log viewer:\n\n| Key                | Action                              |\n| ------------------ | ----------------------------------- |\n| `↑`\u002F`↓` or `k`\u002F`j` | Navigate column options             |\n| `Space`            | Toggle selected column on\u002Foff       |\n| `Enter`            | Apply changes and close modal       |\n| `ESC`              | Discard changes and close modal     |\n\n**Features:**\n- **Default Columns** - Built-in columns like Timestamp, Severity, Host, Service, and Message\n- **Discovered Attributes** - Dynamically detected attribute keys from incoming log data\n- **Active counter** - Header shows `(N\u002FM active)` indicating how many columns are currently enabled\n\n### Log Counts Analysis Modal\n\nPress `Enter` on the Counts section to open a comprehensive analysis modal featuring:\n\n#### 🔥 Real-Time Heatmap Visualization\n\n- **Time-series heatmap** showing severity levels vs. time (1-minute resolution)\n- **60-minute rolling window** with automatic scaling per severity level\n- **Color-coded intensity** using ASCII characters (░▒▓█) with gradient effects\n- **Precise alignment** with time headers showing minutes ago (60, 50, 40, ..., 10, 0)\n- **Receive time architecture** - visualization based on when logs were received for reliable display\n\n#### 🔍 Pattern Analysis by Severity\n\n- **Top 3 patterns per severity** using drain3 pattern extraction algorithm\n- **Severity-specific tracking** with dedicated drain3 instances for each level\n- **Real-time pattern detection** as logs arrive and are processed\n- **Accurate pattern counts** maintained separately for each severity level\n\n#### 🏢 Service Distribution Analysis\n\n- **Top 3 services per severity** showing which services generate each log level\n- **Service name extraction** from common attributes (service.name, service, app, etc.)\n- **Real-time updates** as new logs are processed and analyzed\n- **Fallback to host information** when service names are not available\n\n#### ⌨️ Modal Navigation\n\n- **Scrollable content** using mouse wheel or arrow keys\n- **ESC to close** and return to main dashboard\n- **Full-width display** maximizing screen real estate for data visualization\n- **Real-time updates** - data refreshes automatically as new logs arrive\n\nThe modal uses the same receive time architecture as the main dashboard, ensuring consistent and reliable visualization regardless of log timestamp accuracy or clock skew issues.\n\n## ⚙️ Configuration\n\n### Command Line Options\n\n```bash\ngonzo [flags]\ngonzo [command]\n\nCommands:\n  version     Print version information\n  help        Help about any command\n  completion  Generate shell autocompletion\n\nFlags:\n  -f, --file stringArray           Files or file globs to read logs from (can specify multiple)\n  --follow                         Follow log files like 'tail -f' (watch for new lines in real-time)\n  --format string                  Log format to use (auto-detect if not specified). Can be: otlp, json, text, or a custom format name\n  -u, --update-interval duration   Dashboard update interval (default: 1s)\n  -b, --log-buffer int             Maximum log entries to keep (default: 1000)\n  -m, --memory-size int            Maximum frequency entries (default: 10000)\n  --ai-provider string             AI provider to use: 'openai' (default), 'claude-code'\n  --ai-model string                AI model for analysis (auto-selects best available if not specified)\n  -s, --skin string                Color scheme\u002Fskin to use (default, or name of a skin file)\n  --stop-words strings             Additional stop words to filter out from analysis (adds to built-in list)\n\nWeb Dashboard Flags:\n  --web-port int                   Port for the Dstl8 Lite web dashboard (default: 5718)\n  --web-disabled                   Disable the web dashboard\n\nKubernetes Flags:\n  --k8s-enabled=true               Enable Kubernetes log streaming mode\n  --k8s-namespaces stringArray      Kubernetes namespace(s) to watch (can specify multiple, default: all)\n  --k8s-selector string            Kubernetes label selector for filtering pods\n  --k8s-tail int                   Number of previous log lines to retrieve (default: 10)\n  --k8s-since int                  Only return logs newer than relative duration in seconds\n  --k8s-kubeconfig string          Path to kubeconfig file (default: $HOME\u002F.kube\u002Fconfig)\n  --k8s-context string             Kubernetes context to use\n\n  -t, --test-mode                  Run without TTY for testing\n  -v, --version                    Print version information\n  --config string                  Config file (default: $HOME\u002F.config\u002Fgonzo\u002Fconfig.yml)\n  -h, --help                       Show help message\n```\n\n### Configuration File\n\nCreate `~\u002F.config\u002Fgonzo\u002Fconfig.yml` for persistent settings:\n\n```yaml\n# File input configuration\nfiles:\n  - \"\u002Fvar\u002Flog\u002Fapp.log\"\n  - \"\u002Fvar\u002Flog\u002Ferror.log\"\n  - \"\u002Fvar\u002Flog\u002F*.log\" # Glob patterns supported\nfollow: true # Enable follow mode (like tail -f)\n\n# Update frequency for dashboard refresh\nupdate-interval: 2s\n\n# Buffer sizes\nlog-buffer: 2000\nmemory-size: 15000\n\n# UI customization\nskin: dracula # Choose from: default, dracula, nord, monokai, github-light, etc.\n\n# Additional stop words to filter from analysis\nstop-words:\n  - \"log\"\n  - \"message\"\n  - \"debug\"\n\n# Development\u002Ftesting\ntest-mode: false\n\n# AI configuration\nai-provider: \"openai\"  # Options: \"openai\" (default), \"claude-code\"\nai-model: \"gpt-4\"\n\n# Web dashboard (Dstl8 Lite)\nweb-port: 5718       # Port for the web dashboard\nweb-disabled: false   # Set to true to disable\n```\n\nSee [examples\u002Fconfig.yml](examples\u002Fconfig.yml) for a complete configuration example with detailed comments.\n\n### AI Configuration\n\nGonzo supports multiple AI providers for intelligent log analysis. Configure using command line flags and environment variables. You can switch between available models at runtime using the `m` key.\n\n#### OpenAI\n\n```bash\n# Set your API key\nexport OPENAI_API_KEY=\"sk-your-actual-key-here\"\n\n# Auto-select best available model (recommended)\ncat logs.json | gonzo\n\n# Or specify a particular model\ncat logs.json | gonzo --ai-model=\"gpt-4\"\n```\n\n#### Claude Code (Anthropic Claude)\n\n```bash\n# 1. Install Claude Code CLI\n# Download from https:\u002F\u002Fclaude.ai\u002Fdownload\n\n# 2. Authenticate (if not already done)\nclaude auth login\n\n# 3. Run Gonzo with Claude Code (uses sonnet by default)\ngonzo --ai-provider=claude-code -f application.log\n\n# Specify a model\ngonzo --ai-provider=claude-code --ai-model=sonnet -f logs.json  # Default, balanced\ngonzo --ai-provider=claude-code --ai-model=haiku -f logs.json   # Faster, efficient\ngonzo --ai-provider=claude-code --ai-model=opus -f logs.json    # Most capable\n\n# Works with all input methods\ngonzo --ai-provider=claude-code --k8s-enabled\ncat logs.json | gonzo --ai-provider=claude-code\ntail -f \u002Fvar\u002Flog\u002Fapp.log | gonzo --ai-provider=claude-code --ai-model=haiku\n\n# Run Claude in a container (Podman\u002FDocker)\nexport GONZO_CLAUDE_PATH=\"podman exec -it claude-container claude\"\ngonzo --ai-provider=claude-code -f logs.json\n\nexport GONZO_CLAUDE_PATH=\"docker exec -it my-claude-container claude\"\ngonzo --ai-provider=claude-code --ai-model=haiku -f \u002Fvar\u002Flog\u002Fapp.log --follow\n```\n\n**Available Models:**\n- `sonnet` (default) - Claude Sonnet, balanced performance and capability\n- `haiku` - Fastest and most efficient, best for high-volume logs\n- `opus` - Most capable, best for complex analysis\n\n**Notes:**\n- Claude Code CLI manages authentication independently. The `OPENAI_API_KEY` environment variable is not needed.\n- Use `GONZO_CLAUDE_PATH` to specify a custom path or command (useful for running Claude in containers).\n\n#### LM Studio (Local AI)\n\n```bash\n# 1. Start LM Studio server with a model loaded\n# 2. Set environment variables (IMPORTANT: include \u002Fv1 in URL)\nexport OPENAI_API_KEY=\"local-key\"\nexport OPENAI_API_BASE=\"http:\u002F\u002Flocalhost:1234\u002Fv1\"\n\n# Auto-select first available model (recommended)\ncat logs.json | gonzo\n\n# Or specify the exact model name from LM Studio\ncat logs.json | gonzo --ai-model=\"openai\u002Fgpt-oss-120b\"\n```\n\n#### Ollama (Local AI)\n\n```bash\n# 1. Start Ollama: ollama serve\n# 2. Pull a model: ollama pull gpt-oss:20b\n# 3. Set environment variables (note: no \u002Fv1 suffix needed)\nexport OPENAI_API_KEY=\"ollama\"\nexport OPENAI_API_BASE=\"http:\u002F\u002Flocalhost:11434\"\n\n# Auto-select best model (prefers gpt-oss, llama3, mistral, etc.)\ncat logs.json | gonzo\n\n# Or specify a particular model\ncat logs.json | gonzo --ai-model=\"gpt-oss:20b\"\ncat logs.json | gonzo --ai-model=\"llama3\"\n```\n\n#### Custom OpenAI-Compatible APIs\n\n```bash\n# For any OpenAI-compatible API endpoint\nexport OPENAI_API_KEY=\"your-api-key\"\nexport OPENAI_API_BASE=\"https:\u002F\u002Fapi.your-provider.com\u002Fv1\"\ncat logs.json | gonzo --ai-model=\"your-model-name\"\n```\n\n#### Runtime Model Switching\n\nOnce Gonzo is running, you can switch between available AI models without restarting:\n\n1. **Press `m`** anywhere in the interface to open the model selection modal\n2. **Navigate** with arrow keys, page up\u002Fdown, or mouse wheel\n3. **Select** a model with Enter\n4. **Cancel** with Escape\n\nThe model selection modal shows:\n\n- All available models from your configured AI provider\n- Current active model (highlighted in green)\n- Dynamic sizing based on terminal height\n- Scroll indicators when there are many models\n\n**Note:** Model switching requires the AI service to be properly configured and running. The modal will only appear if models are available from your AI provider.\n\n**Provider-Specific Behavior:**\n- **OpenAI\u002FOllama\u002FLM Studio**: Shows all models available from the API\n- **Claude Code**: Shows sonnet, haiku, and opus (managed by Claude CLI)\n\n#### Auto Model Selection\n\nWhen you don't specify the `--ai-model` flag, Gonzo automatically selects the best available model:\n\n**Selection Priority:**\n\n1. **OpenAI**: Prefers `gpt-4` → `gpt-3.5-turbo` → first available\n2. **Claude Code**: Defaults to `sonnet` (haiku and opus also available)\n3. **Ollama**: Prefers `gpt-oss:20b` → `llama3` → `mistral` → `codellama` → first available\n4. **LM Studio**: Uses first available model from the server\n5. **Other providers**: Uses first available model\n\n**Benefits:**\n\n- ✅ No need to know model names beforehand\n- ✅ Works immediately with any AI provider\n- ✅ Intelligent defaults for better performance\n- ✅ Still allows manual model selection with `m` key\n\n**Example:** Instead of `gonzo --ai-model=\"llama3\"`, simply run `gonzo` and it will auto-select `llama3` if available.\n\n#### Troubleshooting AI Setup\n\n**LM Studio Issues:**\n\n- ✅ Ensure server is running and model is loaded\n- ✅ Use full model name: `--ai-model=\"openai\u002Fmodel-name\"`\n- ✅ Include `\u002Fv1` in base URL: `http:\u002F\u002Flocalhost:1234\u002Fv1`\n- ✅ Check available models: `curl http:\u002F\u002Flocalhost:1234\u002Fv1\u002Fmodels`\n\n**Ollama Issues:**\n\n- ✅ Start server: `ollama serve`\n- ✅ Verify model: `ollama list`\n- ✅ Test API: `curl http:\u002F\u002Flocalhost:11434\u002Fapi\u002Ftags`\n- ✅ Use correct URL: `http:\u002F\u002Flocalhost:11434` (no `\u002Fv1` suffix)\n- ✅ Model names include tags: `gpt-oss:20b`, `llama3:8b`\n\n**OpenAI Issues:**\n\n- ✅ Verify API key is valid and has credits\n- ✅ Check model availability (gpt-4 requires API access)\n\n**Claude Code Issues:**\n\n- ✅ Ensure Claude Code CLI is installed: `claude --version`\n- ✅ Authenticate with Claude: `claude auth login`\n- ✅ Test CLI access: `claude -p \"test prompt\"`\n- ✅ Available models: `sonnet` (default), `haiku`, `opus`\n- ✅ Use `--ai-provider=claude-code` flag when running Gonzo\n\n### Environment Variables\n\n| Variable                | Description                                                          |\n| ----------------------- | -------------------------------------------------------------------- |\n| `OPENAI_API_KEY`        | API key for AI analysis (required for OpenAI-based AI features)                   |\n| `OPENAI_API_BASE`       | Custom API endpoint (default: \u003Chttps:\u002F\u002Fapi.openai.com\u002Fv1>)             |\n| `GONZO_AI_PROVIDER`     | AI provider to use ('openai' or 'claude-code')                       |\n| `GONZO_CLAUDE_PATH`     | Custom path\u002Fcommand for Claude CLI (e.g., for container execution)   |\n| `GONZO_FILES`           | Comma-separated list of files\u002Fglobs to read (equivalent to -f flags) |\n| `GONZO_FOLLOW`          | Enable follow mode (true\u002Ffalse)                                      |\n| `GONZO_UPDATE_INTERVAL` | Override update interval                                             |\n| `GONZO_LOG_BUFFER`      | Override log buffer size                                             |\n| `GONZO_MEMORY_SIZE`     | Override memory size                                                 |\n| `GONZO_AI_MODEL`        | Override default AI model                                            |\n| `GONZO_WEB_PORT`        | Override web dashboard port (default: 5718)                          |\n| `GONZO_WEB_DISABLED`    | Disable web dashboard (true\u002Ffalse)                                   |\n| `GONZO_TEST_MODE`       | Enable test mode                                                     |\n| `NO_COLOR`              | Disable colored output                                               |\n\n### Shell Completion\n\nEnable shell completion for better CLI experience:\n\n```bash\n# Bash\nsource \u003C(gonzo completion bash)\n\n# Zsh\nsource \u003C(gonzo completion zsh)\n\n# Fish\ngonzo completion fish | source\n\n# PowerShell\ngonzo completion powershell | Out-String | Invoke-Expression\n```\n\nFor permanent setup, save the completion script to your shell's completion directory.\n\n### K9s Integration\n\nBy leveraging [K9s plugin system](https:\u002F\u002Fk9scli.io\u002Ftopics\u002Fplugins\u002F) Gonzo integrates seamlessly with K9s for real-time Kubernetes log analysis.\n\n#### Setup\n\nAdd this plugin to your `$XDG_CONFIG_HOME\u002Fk9s\u002Fplugins.yaml` file:\n\n```yaml\nplugins:\n  gonzo:\n    shortCut: Ctrl-L\n    description: \"Gonzo log analysis\"\n    scopes:\n      - po\n      - deploy\n      - sts\n      - ds\n      - svc\n      - job\n      - cj\n    command: sh\n    background: false\n    args:\n      - -c\n      - \"kubectl logs -f --tail=0 $RESOURCE_NAME\u002F$NAME -n $NAMESPACE --context $CONTEXT | gonzo\"\n```\n\n> ⚠️ NOTE: on `macOS` although it is not required, defining `XDG_CONFIG_HOME=~\u002F.config` is recommended in order to maintain consistency with Linux configuration practices.\n\n#### Usage\n\n1. Launch k9s and navigate to pods\n2. Select a pod and press `ctrl-l`\n3. Gonzo opens with live log streaming and analysis\n\n## 🏗️ Architecture\n\nGonzo is built with:\n\n- **[Bubble Tea](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fbubbletea)** - Terminal UI framework\n- **[Lipgloss](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Flipgloss)** - Styling and layout\n- **[Bubbles](https:\u002F\u002Fgithub.com\u002Fcharmbracelet\u002Fbubbles)** - TUI components\n- **[Cobra](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fcobra)** - CLI framework\n- **[Viper](https:\u002F\u002Fgithub.com\u002Fspf13\u002Fviper)** - Configuration management\n- **OpenTelemetry** - Native OTLP support\n- **Large amounts of** ☕️\n\nThe architecture follows a clean separation with a shared analysis engine:\n\n```\ncmd\u002Fgonzo\u002F              # Main application entry\ninternal\u002F\n├── engine\u002F            # Shared analysis engine (feeds TUI and web)\n├── tui\u002F               # Terminal UI implementation\n├── web\u002F               # Dstl8 Lite web dashboard (embedded React)\n├── analyzer\u002F          # Log analysis engine\n├── memory\u002F            # Frequency tracking\n├── otlplog\u002F           # OTLP format handling\n└── ai\u002F                # AI integration\nweb\u002F                    # React frontend source (Vite + TypeScript)\n```\n\n## 🧪 Development\n\n### Prerequisites\n\n- Go 1.25 or higher\n- Make (optional, for convenience)\n\n### Building\n\n```bash\n# Quick build (includes web dashboard)\nmake build\n\n# Build web dashboard only\nmake web-deps    # Install npm dependencies\nmake web-build   # Build React app\n\n# Run tests\nmake test\n\n# Build for all platforms\nmake cross-build\n\n# Development mode (format, vet, test, build)\nmake dev\n```\n\n### Testing\n\n```bash\n# Run unit tests\nmake test\n\n# Run with race detection\nmake test-race\n\n# Integration tests\nmake test-integration\n\n# Test with sample data\nmake demo\n```\n\n## 🎨 Customization & Themes\n\nGonzo supports beautiful, customizable color schemes to match your terminal environment and personal preferences.\n\n### Using Built-in Themes\n\nBe sure you download and place in the Gonzo config directory so Gonzo can find them.\n\n```bash\n# Use a dark theme\ngonzo --skin=dracula\ngonzo --skin=nord\ngonzo --skin=monokai\n\n# Use a light theme\ngonzo --skin=github-light\ngonzo --skin=solarized-light\ngonzo --skin=vs-code-light\n\n# Use Control Theory branded themes\ngonzo --skin=controltheory-light    # Light theme\ngonzo --skin=controltheory-dark     # Dark theme\n```\n\n### Available Themes\n\n**Dark Themes 🌙**: `default`, `controltheory-dark`, `dracula`, `gruvbox`, `monokai`, `nord`, `solarized-dark`\n\n**Light Themes ☀️**: `controltheory-light`, `github-light`, `solarized-light`, `vs-code-light`, `spring`\n\n### Creating Custom Themes\n\nSee **[SKINS.md](guides\u002FSKINS.md)** for complete documentation on:\n\n- 📖 How to create custom color schemes\n- 🎯 Color reference and semantic naming\n- 📦 Downloading community themes from GitHub\n- 🔧 Advanced customization options\n- 🎨 Design guidelines for accessibility\n\n## 🤝 Contributing\n\nWe love contributions! Please see [CONTRIBUTING.md](CONTRIBUTING.md) for details.\n\n1. Fork the repository\n2. Create your feature branch (`git checkout -b feature\u002Famazing-feature`)\n3. Commit your changes (`git commit -m 'Add amazing feature'`)\n4. Push to the branch (`git push origin feature\u002Famazing-feature`)\n5. Open a Pull Request\n\n## 📝 License\n\nThis project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.\n\n## 🙏 Acknowledgments\n\n- Inspired by [k9s](https:\u002F\u002Fk9scli.io\u002F) for the amazing TUI patterns\n- Built with [Charm](https:\u002F\u002Fcharm.sh\u002F) libraries for beautiful terminal UIs\n- OpenTelemetry community for the OTLP specifications\n\n## 📚 Documentation\n\n- [Docs](https:\u002F\u002Fdocs.controltheory.com\u002F) - Complete user guide, integration examples, advanced features (AI, OTel, custom log formats)\n- [Usage Guide](USAGE_GUIDE.md) - Detailed usage instructions\n- [Kubernetes Integration Guide](guides\u002FKUBERNETES_USAGE.md) - Direct Kubernetes cluster integration, filtering, and usage examples\n- [AWS CloudWatch Logs Usage Guide](guides\u002FCLOUDWATCH_USAGE_GUIDE.md) - Usage instructions for AWS CLI log tail and live tail with Gonzo\n- [Stern Usage Guide](guides\u002FSTERN_USAGE_GUIDE.md) - Usage and examples for using Stern with Gonzo\n- [Victoria Logs Integration](guides\u002FVICTORIA_LOGS_USAGE.md) - Using Gonzo with Victoria Logs API\n- [Web Dashboard](guides\u002FWEB_DASHBOARD_USAGE.md) - Dstl8 Lite web UI setup\n- [Contributing Guide](CONTRIBUTING.md) - How to contribute\n- [Changelog](CHANGELOG.md) - Version history\n\n## 🎥 Talks & Demos\n\n* **[Gonzo Roadmap & Pro Tips Live Demo with Maintainers](https:\u002F\u002Fwww.controltheory.com\u002Fvideos\u002Fgonzo-roadmap-and-pro-tips-live-demo-session\u002F)** - Live session covering the roadmap, advanced features, and Q&A with the maintainers\n\n## 💬 Community\n\n- [Discord](https:\u002F\u002Fdiscord.gg\u002FnRBUFYByta)\n- [Slack Invite\u002FJoin](https:\u002F\u002Fjoin.slack.com\u002Ft\u002Fctrltheorycommunity\u002Fshared_invite\u002Fzt-3dr6rke5w-GlcRaW2bvn4zcSaV8byZgA)\n- [Slack Channel Link](https:\u002F\u002Fctrltheorycommunity.slack.com)\n\n## 🐛 Reporting Issues\n\nFound a bug? Please [open an issue](https:\u002F\u002Fgithub.com\u002Fcontrol-theory\u002Fgonzo\u002Fissues\u002Fnew) with:\n\n- Your OS and Go version\n- Steps to reproduce\n- Expected vs actual behavior\n- Log samples (sanitized if needed)\n\n## ⭐ Star History\n\nIf you find this project useful, please consider giving it a star! It helps others discover the tool.\n\n[![Star History Chart](https:\u002F\u002Fapi.star-history.com\u002Fsvg?repos=control-theory\u002Fgonzo&type=Date)](https:\u002F\u002Fwww.star-history.com\u002F#control-theory\u002Fgonzo&Date)\n\n---\n\n\u003Cp align=\"center\">\nMade with ❤️ by \u003Ca href=\"https:\u002F\u002Fcontroltheory.com\">ControlTheory\u003C\u002Fa> and the Gonzo community\n\u003C\u002Fp>\n\u003Cimg referrerpolicy=\"no-referrer-when-downgrade\" src=\"https:\u002F\u002Fstatic.scarf.sh\u002Fa.png?x-pxid=acef447d-5cc3-4756-a46a-8c384b9babf2&page=README.md\" width=\"1\" height=\"1\" \u002F>\n","Gonzo 是一个基于 Go 语言的终端用户界面（TUI）日志分析工具。它提供实时日志流分析，支持通过精美的图表、AI 驱动的洞察和高级过滤功能来解析日志数据。该工具还集成了 OpenTelemetry 和 OTLP 等技术，使得日志处理更加高效且易于集成到现有的监控系统中。Gonzo 特别适合需要在命令行环境中快速查看和诊断日志文件的开发者或运维人员使用，同时也为那些希望通过 AI 技术获得更深层次日志理解的人提供了便利。",2,"2026-06-11 03:44:46","high_star"]