🎥 Watch EdgeCLI in Action!

See a live demonstration of EdgeCLI's AI-powered triage capabilities

▶️ View Demo Video

EdgeCLI Documentation

AI-powered CLI tool for intelligent log analysis and incident triage using Google Gemini API.

🌍 Language-Agnostic

EdgeCLI works with ANY programming language! Python, Java, Go, Rust, Ruby, PHP, C#, Elixir, and more. If your application writes to stdout/stderr, EdgeCLI can monitor it.

🔍

Real-time Monitoring

Watch log files or stdin streams with instant AI analysis

🤖

AI-Powered Triage

Automatic severity classification with confidence scoring

🔬

Deep Analysis

Root cause detection with automated patch generation

🎙️

Voice Alerts

AI voice notifications with 30+ professional voices

Installation

Requirements

Install from npm

Install EdgeCLI globally with a single command:

npm install -g @ceasermikes/edgecli

That's it! No cloning, no setup - just install and go.

📦 Package Information

EdgeCLI is published on npm as a scoped package under @ceasermikes/edgecli

View on npm: npmjs.com/package/@ceasermikes/edgecli

Getting Started

Step 1: Initial Setup

Run the interactive setup wizard to configure your API keys:

edgecli init

The wizard will guide you through:

Step 2: Test the Installation

Run the simulation mode to verify everything works:

edgecli simulate

Step 3: Start Monitoring

Watch a log file or pipe output from your application:

# Watch a log file
edgecli watch app.log

# Watch live output
npm run dev 2>&1 | edgecli watch --stdin

Language Support

EdgeCLI is language-agnostic - it works with ANY programming language!

How It Works

EdgeCLI analyzes text output, not code. It reads stdout/stderr from any application and uses AI to understand error patterns across all languages.

  • ✅ Reads stdout/stderr from any application
  • ✅ AI understands error patterns across all languages
  • ✅ Recognizes stack traces and exceptions universally
  • ✅ Automatically detects language and framework

Supported Languages

Language Frameworks Example Command
JavaScript/TypeScript Node.js, Express, NestJS, Next.js npm run dev 2>&1 | edgecli watch --stdin --voice
Python Django, Flask, FastAPI python manage.py runserver 2>&1 | edgecli watch --stdin --voice
Java Spring Boot, Micronaut ./mvnw spring-boot:run 2>&1 | edgecli watch --stdin --voice
Go Gin, Echo, Fiber go run main.go 2>&1 | edgecli watch --stdin --voice
Ruby Rails, Sinatra rails server 2>&1 | edgecli watch --stdin --voice
PHP Laravel, Symfony php artisan serve 2>&1 | edgecli watch --stdin --voice
Rust Actix, Rocket cargo run 2>&1 | edgecli watch --stdin --voice
C# / .NET ASP.NET Core dotnet run 2>&1 | edgecli watch --stdin --voice
Elixir Phoenix mix phx.server 2>&1 | edgecli watch --stdin --voice

Beyond Application Code

EdgeCLI also works with:

Container Platforms

  • Docker: docker logs -f container_name 2>&1 | edgecli watch --stdin
  • Kubernetes: kubectl logs -f pod-name 2>&1 | edgecli watch --stdin
  • Docker Compose: docker-compose logs -f 2>&1 | edgecli watch --stdin

System Logs

  • Syslog: tail -f /var/log/syslog | edgecli watch --stdin
  • Nginx: tail -f /var/log/nginx/error.log | edgecli watch --stdin
  • Apache: tail -f /var/log/apache2/error.log | edgecli watch --stdin

Database Logs

  • PostgreSQL: tail -f /var/log/postgresql/postgresql.log | edgecli watch --stdin
  • MySQL: tail -f /var/log/mysql/error.log | edgecli watch --stdin
  • MongoDB: tail -f /var/log/mongodb/mongod.log | edgecli watch --stdin

Build Tools

  • Webpack: webpack --watch 2>&1 | edgecli watch --stdin
  • Maven: mvn clean install 2>&1 | edgecli watch --stdin
  • Gradle: gradle build 2>&1 | edgecli watch --stdin

Real-World Examples

Python Django Error

$ python manage.py runserver 2>&1 | edgecli watch --stdin --voice

# Django outputs:
django.db.utils.OperationalError: FATAL: password authentication failed

# EdgeCLI triages:
SEVERITY: CRITICAL
Hypothesis: PostgreSQL authentication failure
Root Cause: Database password mismatch in settings.py
Suggested Fix: Update DATABASES configuration

Java Spring Boot Error

$ ./mvnw spring-boot:run 2>&1 | edgecli watch --stdin --voice

# Spring outputs:
NoSuchBeanDefinitionException: No qualifying bean of type 'UserService'

# EdgeCLI triages:
SEVERITY: HIGH
Hypothesis: Spring dependency injection failure
Root Cause: Missing @Service annotation
Suggested Fix: Add @Service to UserService class

Go Application Error

$ go run main.go 2>&1 | edgecli watch --stdin --voice

# Go outputs:
panic: runtime error: nil pointer dereference

# EdgeCLI triages:
SEVERITY: CRITICAL
Hypothesis: Nil pointer dereference
Root Cause: Variable not initialized before use
Suggested Fix: Check for nil before dereferencing

Commands

edgecli init

Interactive setup wizard for configuring API keys and preferences.

edgecli init

edgecli watch [file]

Watch and triage logs in real-time from a file or stdin.

# Watch a file
edgecli watch app.log

# Watch stdin
npm run dev 2>&1 | edgecli watch --stdin

# Enable voice alerts
edgecli watch app.log --voice

# Disable voice alerts
edgecli watch app.log --no-voice

Options:

  • --stdin - Read from stdin instead of file
  • --voice - Force enable voice alerts
  • --no-voice - Force disable voice alerts

Understanding the Pipe Command

Let's break down this command: npm run dev 2>&1 | edgecli watch --stdin

  • npm run dev - Runs your development server
  • 2>&1 - Redirects stderr (error messages) to stdout (standard output)
    • 2 = stderr (file descriptor 2)
    • &1 = stdout (file descriptor 1)
    • This ensures both normal output AND errors are captured
  • | (pipe) - Takes the output from the left command and feeds it as input to the right command
  • edgecli watch --stdin - Receives the piped output and analyzes it in real-time

Result: Your app runs normally, but EdgeCLI monitors all output (including errors) and provides AI-powered triage automatically!

edgecli suggest

Generate patch suggestions for a specific file.

edgecli suggest --file src/auth.js

Options:

  • --file <path> - File path to analyze (required)
  • --incident <id> - Incident ID to reference (optional)

edgecli simulate

Generate mock errors for testing and demonstration.

edgecli simulate

edgecli stats

Display session statistics and performance metrics.

edgecli stats

edgecli voice

Configure voice alerts interactively or with flags.

# Interactive configuration
edgecli voice

# Quick enable/disable
edgecli voice --enable
edgecli voice --disable

# Test voice output
edgecli voice --test

Options:

  • --enable - Enable voice alerts
  • --disable - Disable voice alerts
  • --test - Test voice output with sample alert
  • --configure - Interactive configuration menu

edgecli uninstall

Completely remove EdgeCLI from your system, including configuration and the npm package.

edgecli uninstall

⚠️ This will permanently delete all configuration files, API keys, session data, AND uninstall the npm package. You'll need to reinstall with npm install -g @ceasermikes/edgecli to use EdgeCLI again.

What Gets Removed

  • Configuration file (Gemini & ElevenLabs API keys)
  • Voice alert settings and preferences
  • Session statistics and history
  • Configuration directory
  • EdgeCLI npm package (globally installed)

Note: This is a complete uninstall. After running this command, EdgeCLI will be completely removed from your system.

Features

Two-Stage Triage System

EdgeCLI uses a sophisticated two-stage approach to incident analysis:

Stage 1: Light Triage (Fast Assessment)

Quick initial classification to determine severity and confidence:

  • Severity Classification: LOW, MEDIUM, HIGH, CRITICAL
  • Hypothesis Generation: AI predicts what's wrong
  • Confidence Scoring: 0-100% confidence level
  • Auto-escalation: Triggers deep analysis if confidence < 65%

Stage 2: Deep Analysis (Root Cause Investigation)

Detailed investigation when light triage needs more information:

  • Root Cause Detection: Identifies the underlying issue
  • Affected Files: Lists impacted code files
  • Patch Generation: Creates diff-format fixes
  • Detailed Explanation: Comprehensive analysis report

Severity Levels

Severity Description Example
LOW Minor issue, system functional Deprecation warning
MEDIUM Moderate issue, degraded performance Missing optional file
HIGH Serious issue, major functionality broken Database connection failed
CRITICAL System down, immediate action required Server crash, data loss

Voice Alerts

Professional AI voice notifications powered by ElevenLabs.

Voice Models

Model Speed Quality Cost Best For
Multilingual V2 ⭐ Medium Highest 1x Professional alerts, 74 languages
Turbo V2.5 Fast High 1x Real-time monitoring
Flash V2.5 Fastest (<75ms) Good 0.5x High-frequency alerts
Flash V2 Fast Good 1x Standard monitoring

Available Voices

Choose from 30+ professional voices with various accents and styles:

Female Voices (13)

  • Alice - British, confident (news style)
  • Charlotte - English-Swedish, seductive
  • Emily - American, calm (meditation)
  • Rachel - American, calm (most popular)
  • Sarah - American, confident & warm
  • And 8 more...

Male Voices (17)

  • George ⭐ - British, raspy (default)
  • Daniel - British, news presenter
  • Brian - American, deep narration
  • Charlie - Australian, casual
  • Adam - American, deep
  • And 12 more...

Severity Thresholds

Control which alerts trigger voice notifications:

Configuration

Configuration File Location

EdgeCLI stores configuration in your system's config directory:

Configuration Structure

{
  "apiKey": "your-gemini-api-key",
  "model": "gemini-2.5-flash",
  "elevenlabs": {
    "apiKey": "your-elevenlabs-api-key",
    "enabled": true,
    "model": "eleven_multilingual_v2",
    "voiceId": "JBFqnCBsd6RMkjVDRZzb",
    "severityThreshold": "warning",
    "streaming": true
  }
}

Environment Variables

Override configuration with environment variables:

# Linux/macOS
export GEMINI_API_KEY="your-gemini-key"
export ELEVENLABS_API_KEY="your-elevenlabs-key"

# Windows PowerShell
$env:GEMINI_API_KEY="your-gemini-key"
$env:ELEVENLABS_API_KEY="your-elevenlabs-key"

Available Gemini Models

Examples

Basic Log Monitoring

# Watch a log file
edgecli watch /var/log/app.log

# Watch with voice alerts
edgecli watch /var/log/app.log --voice

Development Workflow

# Monitor your dev server
npm run dev 2>&1 | edgecli watch --stdin --voice

# Monitor tests
npm test 2>&1 | edgecli watch --stdin

Production Monitoring

# Monitor production logs with critical-only alerts
edgecli voice
# Set threshold to "Critical only"

edgecli watch /var/log/production.log --voice

CI/CD Integration

# In your CI pipeline
npm run build 2>&1 | edgecli watch --stdin --no-voice

# Generate patch suggestions
edgecli suggest --file src/problematic-file.js

Troubleshooting

No Audio from Voice Alerts

Problem: Voice alerts enabled but no audio

Solutions:

  1. Verify API key is configured: edgecli voice --test
  2. Check severity threshold matches alert level
  3. Ensure system volume is not muted
  4. Verify speakers/headphones are connected
  5. Check debug output for [Voice] Speaking: messages

API Key Issues

Problem: "API key not configured"

Solution:

edgecli init

Or set environment variable:

export GEMINI_API_KEY="your-key"

Model Errors

Problem: "Model not found" or 404 errors

Solution: Update to a supported model:

edgecli init
# Select gemini-2.5-flash (recommended)

Windows Audio Issues

Problem: Audio player fails on Windows

Solutions:

  1. Check Windows Sound settings
  2. Ensure PowerShell has audio permissions
  3. Try running as Administrator
  4. Restart audio service: Restart-Service -Name Audiosrv

API Reference

Triage Result Structure

{
  "severity": "MEDIUM" | "LOW" | "HIGH" | "CRITICAL",
  "hypothesis": "Description of the issue",
  "confidence": 0.90,  // 0-1 scale
  "needs_deeper": false
}

Deep Analysis Result Structure

{
  "root_cause": "Detailed explanation",
  "affected_files": ["file1.js", "file2.js"],
  "patch": "--- a/file.js\n+++ b/file.js\n..."
}

Session Statistics

{
  "duration": "21s",
  "total_triages": 1,
  "severity_breakdown": {
    "low": 0,
    "medium": 1,
    "high": 0,
    "critical": 0
  },
  "deep_analyses": 1,
  "time_saved": "~0 minutes"
}

Exit Codes

Code Meaning
0 Success
1 General error (API failure, invalid config, etc.)
130 User interrupted (Ctrl+C)

Uninstall

Complete Removal

EdgeCLI provides a single command to completely remove everything:

edgecli uninstall

This command will:

  1. Show you exactly what will be removed
  2. Display your current configuration
  3. Ask for confirmation (twice for safety)
  4. Remove all configuration files and data
  5. Uninstall the EdgeCLI npm package

⚠️ This is a complete uninstall. After running this command, EdgeCLI will be completely removed from your system. You'll need to run npm install -g @ceasermikes/edgecli to use it again.

What Gets Removed

Why One Command?

We designed edgecli uninstall to handle everything because:

Reinstalling

To reinstall EdgeCLI after uninstalling:

# Install the package
npm install -g @ceasermikes/edgecli

# Run setup wizard
edgecli init