#!/usr/bin/env python3
"""
Simple CodeBase Analyzer - Works with your existing engine
==========================================================
Simple wrapper around your codebase optimizer engine that actually works.
"""
import sys
import os
sys.path.insert(0, os.path.dirname(os.path.abspath(__file__)))
from codebase_optimizer_engine import CodebaseAnalyzer
def analyze_project(project_path):
"""Run complete analysis and display results in a clean format"""
print(f"🔍 Analyzing: {project_path}")
print("=" * 60)
try:
analyzer = CodebaseAnalyzer(project_path)
# Just use the direct method that we know works
print("Running analysis...")
result = analyzer.run_complete_analysis()
print("\n🎯 ANALYSIS COMPLETE!")
print("=" * 60)
return True
except Exception as e:
print(f"❌ Error: {e}")
return False
if __name__ == "__main__":
if len(sys.argv) != 2:
print("Usage: python3 simple_analyzer.py /path/to/project")
sys.exit(1)
project_path = sys.argv[1]
success = analyze_project(project_path)
sys.exit(0 if success else 1)