mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-03-27 07:43:08 +00:00
Add prominent warnings about Anthropic's Agent SDK policy regarding subscription-based authentication for third-party agents. Users are now advised to use API keys instead of `claude login` to avoid potential account suspension. Changes: - README: Add WARNING and NOTE admonition boxes at top (auth policy + repo no longer actively maintained) - README: Flip auth recommendation to API key first, subscription second - SettingsModal: Add amber warning Alert when Claude provider is selected - auth.py: Update CLI/server help messages to recommend API key as Option 1 - Start scripts (start.sh, start.bat, start_ui.sh): Mention ANTHROPIC_API_KEY alongside claude login in all auth hints - start.py, autonomous_agent_demo.py: Update help text references No functionality removed — subscription auth still works, warnings are informational only. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
89 lines
2.8 KiB
Bash
Executable File
89 lines
2.8 KiB
Bash
Executable File
#!/bin/bash
|
|
cd "$(dirname "$0")"
|
|
|
|
echo ""
|
|
echo "========================================"
|
|
echo " AutoForge - Autonomous Coding Agent"
|
|
echo "========================================"
|
|
echo ""
|
|
|
|
# Check if Claude CLI is installed
|
|
if ! command -v claude &> /dev/null; then
|
|
echo "[ERROR] Claude CLI not found"
|
|
echo ""
|
|
echo "Please install Claude CLI first:"
|
|
echo " curl -fsSL https://claude.ai/install.sh | bash"
|
|
echo ""
|
|
echo "Then run this script again."
|
|
exit 1
|
|
fi
|
|
|
|
echo "[OK] Claude CLI found"
|
|
|
|
# Note: Claude CLI no longer stores credentials in ~/.claude/.credentials.json
|
|
# We can't reliably check auth status without making an API call, so we just
|
|
# verify the CLI is installed and remind the user to login if needed
|
|
if [ -d "$HOME/.claude" ]; then
|
|
echo "[OK] Claude CLI directory found"
|
|
echo " (Set ANTHROPIC_API_KEY or run: claude login)"
|
|
else
|
|
echo "[!] Claude CLI not configured"
|
|
echo ""
|
|
echo "Please set ANTHROPIC_API_KEY or run 'claude login' to authenticate."
|
|
echo "Note: API key auth is recommended. See README for details."
|
|
echo ""
|
|
read -p "Press Enter to continue anyway, or Ctrl+C to exit..."
|
|
fi
|
|
|
|
echo ""
|
|
|
|
# Check if venv exists with correct structure for this platform
|
|
# Windows venvs have Scripts/, Linux/macOS have bin/
|
|
if [ ! -f "venv/bin/activate" ]; then
|
|
if [ -d "venv" ]; then
|
|
echo "[INFO] Detected incompatible virtual environment (possibly created on Windows)"
|
|
echo "[INFO] Recreating virtual environment for this platform..."
|
|
rm -rf venv
|
|
if [ -d "venv" ]; then
|
|
echo "[ERROR] Failed to remove existing virtual environment"
|
|
echo "Please manually delete the 'venv' directory and try again:"
|
|
echo " rm -rf venv"
|
|
exit 1
|
|
fi
|
|
else
|
|
echo "Creating virtual environment..."
|
|
fi
|
|
python3 -m venv venv
|
|
if [ $? -ne 0 ]; then
|
|
echo "[ERROR] Failed to create virtual environment"
|
|
echo "Please ensure the venv module is installed:"
|
|
echo " Ubuntu/Debian: sudo apt install python3-venv"
|
|
echo " Or try: python3 -m ensurepip"
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
# Activate the virtual environment
|
|
source venv/bin/activate
|
|
if [ $? -ne 0 ]; then
|
|
echo "[ERROR] Failed to activate virtual environment"
|
|
echo "The venv may be corrupted. Try: rm -rf venv && ./start.sh"
|
|
exit 1
|
|
fi
|
|
|
|
# Install dependencies
|
|
echo "Installing dependencies..."
|
|
pip install -r requirements.txt --quiet
|
|
|
|
# Ensure playwright-cli is available for browser automation
|
|
if ! command -v playwright-cli &> /dev/null; then
|
|
echo "Installing playwright-cli for browser automation..."
|
|
npm install -g @playwright/cli --quiet 2>/dev/null
|
|
if [ $? -ne 0 ]; then
|
|
echo "Note: Could not install playwright-cli. Install manually: npm install -g @playwright/cli"
|
|
fi
|
|
fi
|
|
|
|
# Run the app
|
|
python start.py
|