Installation

This guide will help you install and set up the Bewerbung Generator on your system.

Requirements

  • Python 3.8 or higher

  • Git

  • Virtual environment support

System Dependencies

For PDF generation (optional):

macOS:

brew install pango

Ubuntu/Debian:

sudo apt-get install libpango-1.0-0 libharfbuzz0b libpangoft2-1.0-0

Windows:

PDF dependencies are included with WeasyPrint on Windows.

Installation Steps

  1. Clone the Repository:

    git clone https://github.com/thsetz/Bewerbung.git
    cd Bewerbung
    
  2. Set up Virtual Environment:

    make venv
    
  3. Install Dependencies:

    make install
    
  4. Configure Environment Variables:

    cp .env.example .env
    

    Edit the .env file with your configuration:

    # AI Provider Configuration
    AI_PROVIDER=auto  # auto, claude, llama, sample
    
    # Claude API (optional)
    ANTHROPIC_API_KEY=your_claude_api_key_here
    
    # Llama/Ollama Configuration (optional)
    LLAMA_MODEL=llama3.2:latest
    OLLAMA_BASE_URL=http://localhost:11434
    
    # Output Configuration
    OUTPUT_STRUCTURE=by_model  # legacy, by_model, both
    INCLUDE_GENERATION_METADATA=true
    GENERATE_DOCUMENTATION=true
    
  5. Verify Installation:

    make test-providers
    

AI Provider Setup

Claude API Setup

  1. Get an API key from Anthropic

  2. Add your key to the .env file:

    ANTHROPIC_API_KEY=your_api_key_here
    
  3. Test the connection:

    make test-providers
    

Ollama/Llama Setup

  1. Install Ollama:

    Visit Ollama.ai and follow the installation instructions.

  2. Start Ollama Server:

    ollama serve
    
  3. Install Llama Model:

    make install-llama-model
    
  4. Verify Setup:

    make check-ollama
    

Quick Setup Script

For automated setup, you can use:

# Complete setup with Ollama
make setup-ollama

# Test everything
make test

Troubleshooting

Virtual Environment Issues:

# Remove and recreate virtual environment
rm -rf .venv
make venv
make install

Permission Issues on macOS/Linux:

# Make scripts executable
chmod +x scripts/*.sh

Missing Dependencies:

# Force reinstall dependencies
pip install -r requirements.txt --force-reinstall

PDF Generation Issues:

If PDF generation fails, check that system dependencies are installed:

# Test PDF generation
python -c "import weasyprint; print('WeasyPrint OK')"

Next Steps

After installation, see: