#!/usr/bin/env python3 """ OpenCode Git Agent Integration Entry point for all Git Agent slash commands """ import os import sys # Change to project root directory project_root = "K:\\Projects\\uniswap_auto_clp" os.chdir(project_root) # Add tools directory to path for imports tools_path = os.path.join(project_root, "tools") if tools_path not in sys.path: sys.path.append(tools_path) # Import from main slash commands module try: from slash_commands_main import execute_slash_command except ImportError: # Fallback if main module not available def execute_slash_command(command, args=None): return f"[ERROR] Git Agent modules not found. Command: {command}" if __name__ == "__main__": if len(sys.argv) > 1: command = sys.argv[1] args = sys.argv[2:] if len(sys.argv) > 2 else [] print(execute_slash_command(command, args)) else: print("Available commands:") print(" /git-backup") print(" /git-status") print(" /git-cleanup") print(" /git-restore [timestamp]") print("\nExamples:") print(" /git-status") print(" /git-backup") print(" /git-restore 2025-12-19-14")