Thank you for your interest in contributing. This document describes how to get set up locally and submit changes.
- Python 3.12+
- Node.js 22+
- Claude Code CLI installed and available on your PATH
- Git
- Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/claude-code-gateway.git
cd claude-code-gateway- Create and activate a virtual environment:
python -m venv .venv
source .venv/bin/activate # On Windows: .venv\Scripts\activate- Install dependencies:
pip install -r requirements.txt- Copy the example environment file and fill in your values:
cp .env.example .envRun the full test suite with:
pytest tests/ -vTo run a specific test file:
pytest tests/test_gateway.py -v- Create a new branch from
mainwith a descriptive name:
git checkout -b feat/your-feature-name-
Make your changes, keeping commits focused and atomic.
-
Run the test suite and confirm everything passes:
pytest tests/ -v-
Push your branch and open a pull request against
mainon the upstream repository. -
Fill in the pull request template. Describe what changed and why.
-
A maintainer will review your PR. Address any feedback, then it will be merged once approved.
- 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.