#!/usr/bin/env python3
"""
Quick CodeBase Analyzer - Simple Working Version
===============================================
This is the simplest way to use your codebase optimizer tool.
Just run: python3 quick_analyze.py /path/to/project
"""
import sys
import os
def main():
if len(sys.argv) != 2:
print("Usage: python3 quick_analyze.py /path/to/project")
print("\nExample:")
print(" python3 quick_analyze.py /Users/liadgez/Documents/technologia/merged-implementations")
sys.exit(1)
project_path = sys.argv[1]
# Just use the working engine directly
from codebase_optimizer_engine import main as engine_main
# Replace sys.argv so the engine gets the right path
original_argv = sys.argv
sys.argv = ['codebase_optimizer_engine.py', project_path]
try:
engine_main()
except SystemExit:
pass # Engine calls sys.exit, that's normal
finally:
sys.argv = original_argv
print("\n🎯 Want to analyze another project? Just run:")
print(f" python3 quick_analyze.py /path/to/your/other/project")
if __name__ == "__main__":
main()