Skip to content

Latest commit

 

History

History
83 lines (55 loc) · 1.79 KB

File metadata and controls

83 lines (55 loc) · 1.79 KB

Contributing to claude-code-gateway

Thank you for your interest in contributing. This document describes how to get set up locally and submit changes.

Prerequisites

  • Python 3.12+
  • Node.js 22+
  • Claude Code CLI installed and available on your PATH
  • Git

Local Setup

  1. Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/claude-code-gateway.git
cd claude-code-gateway
  1. Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate  # On Windows: .venv\Scripts\activate
  1. Install dependencies:
pip install -r requirements.txt
  1. Copy the example environment file and fill in your values:
cp .env.example .env

Running Tests

Run the full test suite with:

pytest tests/ -v

To run a specific test file:

pytest tests/test_gateway.py -v

Pull Request Process

  1. Create a new branch from main with a descriptive name:
git checkout -b feat/your-feature-name
  1. Make your changes, keeping commits focused and atomic.

  2. Run the test suite and confirm everything passes:

pytest tests/ -v
  1. Push your branch and open a pull request against main on the upstream repository.

  2. Fill in the pull request template. Describe what changed and why.

  3. A maintainer will review your PR. Address any feedback, then it will be merged once approved.

Code Style

  • Follow the existing patterns in the codebase — consistency matters more than personal preference.
  • Use type hints on all function signatures.
  • Keep functions small and focused on a single responsibility.
  • Prefer simple, readable code over clever one-liners.
  • Add a brief comment for any non-obvious logic.
  • Do not introduce new dependencies without discussing it in an issue first.