#!/bin/bash
# Development wrapper for mcp-vector-search running from source

# Configuration
PROJECT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
VENV_DIR="${PROJECT_DIR}/.venv"

# Check if virtual environment exists
if [ ! -d "${VENV_DIR}" ]; then
    echo "Error: Virtual environment not found at ${VENV_DIR}"
    echo "Please run: python3 -m venv ${VENV_DIR} && ${VENV_DIR}/bin/pip install -e ${PROJECT_DIR}"
    exit 1
fi

# Activate virtual environment and run
source "${VENV_DIR}/bin/activate"
exec python -m mcp_vector_search.cli.main "$@"