๐Ÿ‘จโ€๐Ÿ’ป Developer Installation

๐Ÿ‘จโ€๐Ÿ’ป Developer Installation

Suitable for developers, convenient for debugging and secondary development

Environment Setup

Check Python version (requires 3.8+):

python3 --version

Recommended to use uv (faster package manager):

pip install uv

Install Dependencies

Method 1: Using uv (recommended)

uv venv
source .venv/bin/activate
uv pip install -r requirements.txt

Method 2: Using pip

python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt

Running Modes

Direct Run (Debug Mode)

# Activate virtual environment
source .venv/bin/activate
 
# Run directly
python main.py

Background Mode

# Install as background service
./install.sh
 
# View logs
tail -f logs/wintermelon_scribe.log

Development Workflow

Running from Source

For debugging and development:

# Make sure you're in the venv
source .venv/bin/activate
 
# Run with debug output
python main.py --debug

File Structure

wintermelon_scribe/
โ”œโ”€โ”€ main.py           # Main entry point
โ”œโ”€โ”€ requirements.txt  # Dependencies
โ”œโ”€โ”€ install.sh        # Installation script
โ”œโ”€โ”€ uninstall.sh      # Uninstallation script
โ”œโ”€โ”€ status.sh         # Status check script
โ”œโ”€โ”€ .env.example      # Environment template
โ”œโ”€โ”€ logs/             # Log files
โ””โ”€โ”€ src/              # Source code

Debugging

View runtime logs:

# Real-time logs
tail -f logs/wintermelon_scribe.log
 
# Error logs
tail -f logs/wintermelon_scribe.err

Contributing

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request

Configuration for Development

Create a .env file from .env.example:

cp .env.example .env

Edit .env for development:

# Enable debug mode
DEBUG=true

# Use test API keys
SILICONFLOW_API_KEY=your-test-key

# Enable notifications
NOTIFICATION_ENABLED=true
NOTIFICATION_SOUND_ENABLED=true

Common Development Issues

Q: Python version compatibility

  • Requires Python 3.8 or higher
  • Use pyenv if you need multiple Python versions

Q: Permission denied on macOS

  • Grant Accessibility and Screen Recording permissions
  • Use chmod +x *.sh for scripts if needed

Q: Import errors

  • Make sure you're in the virtual environment
  • Run pip install -r requirements.txt again