Files
autocoder/start_ui.sh
Auto 17b7354db8 fix: activate venv in UI launcher scripts
start_ui.sh and start_ui.bat were using system Python directly,
causing ModuleNotFoundError for dotenv. Now they create and activate
the venv before running, matching the pattern in start.sh.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-07 09:45:54 +02:00

39 lines
921 B
Bash

#!/bin/bash
cd "$(dirname "$0")"
# AutoCoder UI Launcher for Unix/Linux/macOS
# This script launches the web UI for the autonomous coding agent.
echo ""
echo "===================================="
echo " AutoCoder UI"
echo "===================================="
echo ""
# Check if Python is available
if ! command -v python3 &> /dev/null; then
if ! command -v python &> /dev/null; then
echo "ERROR: Python not found"
echo "Please install Python from https://python.org"
exit 1
fi
PYTHON_CMD="python"
else
PYTHON_CMD="python3"
fi
# Check if venv exists, create if not
if [ ! -d "venv" ]; then
echo "Creating virtual environment..."
$PYTHON_CMD -m venv venv
fi
# Activate the virtual environment
source venv/bin/activate
# Install dependencies
echo "Installing dependencies..."
pip install -r requirements.txt --quiet
# Run the Python launcher
python start_ui.py "$@"