Skip to content

Contributing

Overview

We welcome contributions to the Claude Code Proxy API! This guide will help you get started.

Development Setup

  1. Clone the repository

    git clone https://github.com/CaddyGlow/claude-code-proxy-api.git
    cd claude-code-proxy-api
    

  2. Set up development environment

    # Using devenv (preferred)
    devenv shell
    
    # Or using uv
    uv sync
    

  3. Install pre-commit hooks

    pre-commit install
    

Code Quality

Before submitting changes, ensure your code passes all quality checks:

# Format code
ruff format .

# Lint code
ruff check .

# Type checking
mypy .

# Run tests
pytest

# Run all checks
ruff format . && ruff check . && mypy . && pytest

Pull Request Process

  1. Create a feature branch

    git checkout -b feature/your-feature-name
    

  2. Make your changes

  3. Write tests for new functionality
  4. Update documentation if needed
  5. Follow existing code patterns

  6. Commit your changes

    git add .
    git commit -m "feat: add your feature description"
    

  7. Push and create PR

    git push origin feature/your-feature-name
    

Code Standards

  • Python 3.11+ compatibility
  • Type hints for all functions and methods
  • Docstrings for all public APIs
  • Tests for all new functionality
  • ruff formatting and linting
  • mypy type checking

Commit Messages

Use conventional commits: - feat: - New features - fix: - Bug fixes - docs: - Documentation updates - test: - Test updates - refactor: - Code refactoring - chore: - Maintenance tasks

Testing

  • Write unit tests for new functionality
  • Use appropriate pytest markers
  • Ensure tests pass in CI/CD
  • Maintain test coverage above 80%

Documentation

  • Update relevant documentation
  • Add examples for new features
  • Update API reference if needed
  • Test documentation builds locally