Skip to content

IgnacioPro/lumo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

523 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
Lumo Logo

๐Ÿ”ฆ Lumo

Intelligent SRE/DevOps Automation Agent

CI CircleCI Go Version License Coverage Release Platform

AI-powered diagnostics + SSH automation + Kubernetes monitoring = Better SRE workflows

Features โ€ข Quick Start โ€ข Installation โ€ข Documentation โ€ข Contributing


๐Ÿ“– Overview

Lumo is a modern, intelligent automation agent that connects to your infrastructure, performs comprehensive diagnostics, and leverages AI to help you understand and fix issues faster. Think of it as your AI-powered SRE companion.

What Makes Lumo Different?

  • ๐Ÿค– Multi-Provider AI Analysis - Claude, GPT-4, Gemini, Ollama, or OpenRouter
  • ๐Ÿ”Œ Zero-Config Localhost - Instant diagnostics without SSH overhead
  • โ˜ธ๏ธ Native Kubernetes - Direct API integration (no kubectl required)
  • ๐Ÿ—๏ธ Agent Architecture - REST API + Agent daemon with hybrid push/pull model (Phases 7-8)
  • ๐Ÿ” Security-First - Built-in security diagnostics and audit trails
  • ๐ŸŽฏ Token-Optimized - TOON format reduces AI costs by 30-60%
  • ๐Ÿš€ Production-Ready - 66%+ test coverage, CI/CD, cross-platform

โœจ Features

Core Capabilities

๐Ÿ” Comprehensive Diagnostics

6 Core Checks

  • CPU (load average, usage, cores)
  • Memory (usage, pressure, top consumers)
  • Disk (space, inodes, multi-filesystem)
  • Processes (count, zombies, resource hogs)
  • Services (systemd, init, launchd)
  • Network (interfaces, connectivity, latency)

4 Security Checks

  • Patch status (security updates)
  • Open ports (unexpected listeners)
  • SSH security (config audit)
  • Auth failures (brute force detection)

๐Ÿค– AI-Powered Analysis

5 Provider Support

  • Anthropic Claude (Sonnet 4.5)
  • OpenAI (GPT-4 Turbo, o1, o3)
  • Google Gemini (2.0 Flash)
  • Ollama (local models)
  • OpenRouter (multi-model routing)

Smart Features

  • Streaming responses
  • Token usage tracking
  • TOON format (30-60% cost savings)
  • Reasoning effort control (OpenAI)

Platform Support

Platform SSH Diagnostics Kubernetes Proxmox VE
Linux โœ… Full support โœ… Native client โœ… Cluster monitoring
macOS โœ… Full support โœ… Native client โŒ N/A
BSD โœ… Full support โœ… Native client โŒ N/A
Windows โณ Planned โœ… Native client โŒ N/A

Kubernetes Diagnostics

por_escrito

Native cluster monitoring using k8s.io/client-go:

  • โœ… 8 Resource Types - Nodes, Pods, Deployments, StatefulSets, DaemonSets, Services, PVCs, Events
  • โœ… Read-Only - No modifications to your cluster
  • โœ… Namespace Filtering - Check all or specific namespaces
  • โœ… RBAC-Aware - Minimal permissions required (get/list)
  • โœ… Context Switching - Work with multiple clusters

Reliability & Observability

  • ๐Ÿ›ก๏ธ Circuit Breakers - Automatic failure protection for AI providers
  • ๐Ÿ” Distributed Tracing - OpenTelemetry integration for request visibility
  • ๐Ÿ“Š Load Tested - Verified stability under high concurrency
  • ๐Ÿšฆ Rate Limiting - Configurable per-IP and per-user limits

๐Ÿš€ Quick Start

Prerequisites

  • Go 1.25+ (for building from source)
  • SSH access to target servers (or use localhost)
  • Optional: AI provider API key for analysis
  • Optional: kubeconfig for Kubernetes diagnostics

Installation

Option 1: Go Install (Recommended)

go install github.com/ignacio/lumo/cmd/lumo@latest

Option 2: Build from Source

git clone https://github.com/IgnacioPro/lumo.git
cd lumo
go build -o lumo ./cmd/lumo

# Optional: Install globally
sudo mv lumo /usr/local/bin/

Option 3: Download Binary (Coming Soon)

Pre-built binaries for Linux, macOS, and Windows will be available in Releases.

First Run

# 1. Diagnose your local machine (no configuration needed)
lumo diagnose localhost

# 2. Connect to a remote server
lumo connect user@server.com

# 3. Run remote diagnostics
lumo diagnose user@server.com

# 4. Add AI-powered analysis
export LUMO_ANTHROPIC_API_KEY=sk-ant-...
lumo diagnose localhost --analyze

Example Output

=== System Diagnostics for localhost ===

[โœ“] CPU Check (OK)
    Load Average: 1.23, 1.45, 1.67 (8 cores)
    Usage: 15.3%

[!] Memory Check (WARNING)
    RAM: 71.2% used (22.7/31.9 GB)
    Swap: 12.4% used (2.0/16.0 GB)
    Top Consumers:
      1. chrome (3.2 GB)
      2. docker (2.1 GB)
      3. postgres (1.8 GB)

[โœ“] Disk Check (OK)
    /: 45% used (225/500 GB)
    /home: 62% used (310/500 GB)

[โœ“] Network Check (OK)
    Interfaces: eth0 (UP), lo (UP)
    Connectivity: All targets reachable

Overall Status: WARNING (1 check needs attention)

๐Ÿค– AI Analysis:
Your system is healthy overall, but memory usage is approaching 75%.
Consider:
1. Closing unnecessary Chrome tabs (3.2 GB usage)
2. Reviewing Docker container memory limits
3. Tuning PostgreSQL shared_buffers if not needed

Estimated Impact: Moderate
Risk Level: Low

๐Ÿ“š Documentation

Command Reference

diagnose - Run System Diagnostics

# Localhost (no SSH)
lumo diagnose localhost

# Remote server
lumo diagnose user@server.com

# Specific checks only
lumo diagnose localhost --checks cpu,memory,disk

# With AI analysis
lumo diagnose localhost --analyze

# Different AI provider
lumo diagnose localhost --analyze --ai-provider openai

# JSON output
lumo diagnose localhost --format json

# TOON format (AI-optimized, 30-60% token reduction)
lumo diagnose localhost --format toon

# Kubernetes cluster
lumo diagnose --checks kubernetes

connect - Establish SSH Connection

# Auto-discover authentication
lumo connect user@server.com

# Specific key file
lumo connect user@server.com --key ~/.ssh/id_ed25519

# Custom port
lumo connect user@server.com --port 2222

# Skip test commands
lumo connect user@server.com --test=false

Configuration

Configuration File Locations (searched in order)

  1. --config flag path
  2. ./config.yaml
  3. ~/.lumo/config.yaml

Quick Setup

# Copy example configuration
mkdir -p ~/.lumo
cp configs/config.example.yaml ~/.lumo/config.yaml

# Edit with your preferences
vim ~/.lumo/config.yaml

Environment Variables

# SSH Configuration
export LUMO_SSH_PORT=2222
export LUMO_SSH_STRICT_HOST_KEY_CHECKING=true

# AI Provider Selection
export LUMO_AI_PROVIDER=openai  # anthropic, openai, ollama, gemini, openrouter

# AI API Keys (Provider-Specific)
export LUMO_ANTHROPIC_API_KEY=sk-ant-...
export LUMO_OPENAI_API_KEY=sk-...
export LUMO_GEMINI_API_KEY=...
export LUMO_OPENROUTER_API_KEY=sk-or-...

# AI Settings
export LUMO_AI_TEMPERATURE=1.0
export LUMO_AI_MAX_TOKENS=4096
export LUMO_AI_REASONING_EFFORT=medium  # low, medium, high (OpenAI reasoning models)

# Logging
export LUMO_LOGGING_LEVEL=debug

# Kubernetes
export LUMO_DIAGNOSTICS_KUBERNETES_ENABLED=true
export LUMO_DIAGNOSTICS_KUBERNETES_CONTEXT=production

SSH Authentication Methods

Lumo tries authentication methods in this order:

  1. SSH Agent (most secure) โ†’ Uses ssh-agent with loaded keys
  2. Private Keys โ†’ Auto-discovers: id_ed25519, id_ecdsa, id_rsa, id_dsa
  3. Password โ†’ Interactive prompt (secure, not stored)
  4. Keyboard-Interactive โ†’ Supports 2FA/MFA
# Ensure SSH agent is running
eval $(ssh-agent)
ssh-add ~/.ssh/id_ed25519

# Verify keys loaded
ssh-add -l

Kubernetes Setup

# 1. Enable Kubernetes diagnostics
export LUMO_DIAGNOSTICS_KUBERNETES_ENABLED=true

# 2. (Optional) Use specific kubeconfig
export LUMO_DIAGNOSTICS_KUBERNETES_KUBECONFIG_PATH=/path/to/kubeconfig

# 3. (Optional) Use specific context
export LUMO_DIAGNOSTICS_KUBERNETES_CONTEXT=production

# 4. Run diagnostics
lumo diagnose --checks kubernetes

# 5. With AI analysis
lumo diagnose --checks kubernetes --analyze

RBAC Requirements

Lumo needs minimal read-only permissions:

apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRole
metadata:
  name: lumo-reader
rules:
- apiGroups: [""]
  resources: ["nodes", "pods", "services", "persistentvolumeclaims", "events"]
  verbs: ["get", "list"]
- apiGroups: ["apps"]
  resources: ["deployments", "statefulsets", "daemonsets"]
  verbs: ["get", "list"]

๐Ÿ—๏ธ Architecture

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                    CLI Interface                        โ”‚
โ”‚         (connect, diagnose, fix, report, serve)         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”
                    โ”‚ Config  โ”‚  YAML + Environment Variables
                    โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
                         โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚                โ”‚                โ”‚
   โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
   โ”‚  Local  โ”‚    โ”‚     SSH     โ”‚   โ”‚ Kubernetes  โ”‚
   โ”‚Executor โ”‚    โ”‚  Executor   โ”‚   โ”‚   Client    โ”‚
   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”˜
        โ”‚                โ”‚                 โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
        โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
        โ”‚    Diagnostics Runner (12)       โ”‚
        โ”‚  โ€ข 6 Core (CPU, Mem, Disk...)   โ”‚
        โ”‚  โ€ข 4 Security (Patches, Ports...)โ”‚
        โ”‚  โ€ข 2 Specialized (K8s, Proxmox) โ”‚
        โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”
                    โ”‚Formattersโ”‚  Text, JSON, TOON
                    โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”˜
                         โ”‚
                    โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                    โ”‚AI Analysis  โ”‚  5 Providers
                    โ”‚ (Optional)  โ”‚  Streaming
                    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐Ÿงช Testing

Overall Coverage: 66.7% (52 test files)

Coverage by Package

Package Coverage Status
internal/diagnostics/formatters 98.1% โœ… Excellent
internal/diagnostics 87.6% โœ… Excellent
internal/config 68.8% โœ… Good
internal/diagnostics/checkers 61.4% โœ… Good
cmd/lumo 61.6% โœ… Good
internal/ssh 30.5% โš ๏ธ In Progress
internal/ai 27.1% โš ๏ธ In Progress

Run Tests

# All tests
go test ./...

# With coverage
go test -cover ./...

# Specific package with verbose output
go test -v ./internal/diagnostics

# HTML coverage report
go test -coverprofile=coverage.out ./...
go tool cover -html=coverage.out

๐Ÿ—บ๏ธ Roadmap

โœ… Completed Phases

  • Phase 1-2: Foundation & SSH (CLI framework, 4 auth methods, health monitoring)
  • Phase 3: Core Diagnostics (6 checkers: CPU, Memory, Disk, Process, Service, Network)
  • Phase 4: AI Integration (5 providers: Claude, GPT-4, Gemini, Ollama, OpenRouter)
  • Phase 5: Security & Specialized Diagnostics (4 security checkers + Kubernetes + Proxmox)
  • Phase 6: Auto-Remediation (Human-in-the-loop approval, risk classification, audit logging)
  • Phase 7: API Server Foundation (REST API, PostgreSQL, Redis, Agent registration)
  • Phase 8: Agent Daemon (Scheduled diagnostics, API reporter, offline mode, health/metrics)
  • Phase 9: Kubernetes Deployment (DaemonSet, Deployment, Helm charts, RBAC, Kustomize)
  • Phase 10: VM Deployment (systemd units, RPM/DEB packages, installation scripts)
  • Usability Week 1: Installation & First-Run Experience (Quick start, init wizard, examples, docs) โœจ NEW

๐Ÿšง In Progress

  • Phase 11: Messaging Integration (NATS, Kafka, RabbitMQ, Redis)

๐Ÿ”ฎ Future Phases

  • Phase 12: Security Hardening (mTLS, JWT, cert rotation, penetration testing)
  • Phase 13: Production Readiness (Performance, monitoring, dashboards, load testing)
  • Phase 14: Advanced Reporting (Markdown, HTML, PDF, trends, forecasting)
  • Phase 15: Advanced Features (Multi-cluster, ML-based anomaly detection)

๐Ÿค Contributing

We welcome contributions! See our Contributing Guide for detailed instructions.

Quick Start

# Clone and setup
git clone https://github.com/IgnacioPro/lumo.git
cd lumo
make setup    # Install deps, start services, build

# Make changes
git checkout -b feature/my-feature
# ... edit code ...
make ci       # Run all checks before committing

# Submit PR
git push origin feature/my-feature

Ways to Contribute

  • ๐Ÿ› Report bugs - Use the bug report template
  • ๐Ÿ’ก Suggest features - Use the feature request template
  • ๐Ÿ“– Improve docs - Fix typos, add examples, clarify usage
  • ๐Ÿงช Write tests - Help us improve coverage
  • ๐Ÿ”ง Submit PRs - Fix bugs or implement features

Development Resources


๐Ÿ” Security

Security Practices

  • โœ… Host Key Verification - Enabled by default (StrictHostKeyChecking: true)
  • โœ… No Password Flags - Passwords only via secure prompts
  • โœ… API Keys - Environment variables only, never in config files
  • โœ… Command Injection Prevention - Path sanitization and validation
  • โœ… File Permissions - Validates SSH key permissions (600/400)

Reporting Security Issues

Please report security vulnerabilities privately according to SECURITY.md (GitHub Security Advisories).


๐Ÿ“œ License

MIT License - See LICENSE file for details.

Copyright (c) 2025 Lumo Contributors


๐Ÿ™ Acknowledgments

Built with these amazing technologies:

AI Providers:


๐Ÿ“ž Support


โฌ† Back to Top

Made with โค๏ธ by the Lumo community