diff --git a/aitbc-cli-final b/aitbc-cli-final new file mode 100755 index 00000000..2f9223b5 --- /dev/null +++ b/aitbc-cli-final @@ -0,0 +1,5 @@ +#!/bin/bash +# AITBC CLI - Final working wrapper +cd /opt/aitbc/cli +source /opt/aitbc/venv/bin/activate +python aitbc-fixed.py "$@" diff --git a/aitbc-cli-fixed b/aitbc-cli-fixed new file mode 100755 index 00000000..2c84f6d7 --- /dev/null +++ b/aitbc-cli-fixed @@ -0,0 +1,5 @@ +#!/bin/bash +# AITBC CLI - Proper wrapper script +cd /opt/aitbc/cli +source /opt/aitbc/venv/bin/activate +python core/main.py "$@" diff --git a/aitbc-cli-wrapper b/aitbc-cli-wrapper new file mode 100755 index 00000000..a754c07c --- /dev/null +++ b/aitbc-cli-wrapper @@ -0,0 +1,12 @@ +#!/bin/bash +# AITBC CLI Wrapper Script +# This script properly activates the venv and runs the CLI + +# Activate virtual environment +source /opt/aitbc/venv/bin/activate + +# Change to CLI directory +cd /opt/aitbc/cli + +# Run the CLI with all arguments +python core/main.py "$@" diff --git a/aitbc-debug b/aitbc-debug new file mode 100755 index 00000000..7a9f4d83 --- /dev/null +++ b/aitbc-debug @@ -0,0 +1,40 @@ +#!/bin/bash +# AITBC CLI - Debug wrapper script +cd /opt/aitbc/cli +source /opt/aitbc/venv/bin/activate + +echo "Current directory: $(pwd)" +echo "Python path: $PYTHONPATH" +echo "Virtual environment: $VIRTUAL_ENV" + +# Debug the CLI loading +python -c " +import sys +sys.path.insert(0, '.') +print('Python path:', sys.path[:3]) + +try: + from core.main import cli + print('CLI import: SUCCESS') + + # Check commands + from core.main import commands + print(f'Commands loaded: {len(commands)}') + + # Try to add commands + for cmd in commands: + try: + cli.add_command(cmd) + except Exception as e: + print(f'Error adding {cmd.name}: {e}') + + print('Final commands:', list(cli.commands.keys())) + +except Exception as e: + print(f'CLI import failed: {e}') + import traceback + traceback.print_exc() +" + +echo "--- Running actual CLI ---" +python core/main.py "$@" diff --git a/cli/aitbc-fixed.py b/cli/aitbc-fixed.py new file mode 100755 index 00000000..50883e84 --- /dev/null +++ b/cli/aitbc-fixed.py @@ -0,0 +1,16 @@ +#!/usr/bin/env python3 +""" +AITBC CLI - Fixed entry point +""" + +import sys +import os + +# Add current directory to Python path +sys.path.insert(0, os.path.dirname(os.path.abspath(__file__))) + +# Import and run the CLI +from core.main import cli + +if __name__ == "__main__": + cli()