Thank you for your interest in contributing to Claude Adapter! This document provides guidelines and instructions for contributing.
By participating in this project, you agree to maintain a respectful and inclusive environment. Be kind, constructive, and professional in all interactions.
- Node.js 20.0.0 or higher
- npm 9.0.0 or higher
- Git
-
Fork the repository
Click the "Fork" button on GitHub to create your own copy.
-
Clone your fork
git clone https://github.com/YOUR_USERNAME/claude-adapter.git cd claude-adapter -
Install dependencies
npm install
-
Create a branch
git checkout -b feature/your-feature-name
claude-adapter/
├── src/
│ ├── cli.ts # CLI entry point
│ ├── index.ts # Library exports
│ ├── types/ # TypeScript type definitions
│ ├── converters/ # Request/response converters
│ ├── server/ # Express proxy server
│ └── utils/ # Utility functions
├── tests/ # Test files
└── package.json
-
Run in development mode
npm run dev
-
Run tests continuously
npm test -- --watch -
Build the project
npm run build
All changes must include appropriate tests.
# Run all tests
npm test
# Run tests with coverage
npm test -- --coverage
# Run specific test file
npm test -- tests/request.test.ts- Place tests in the
tests/directory - Name test files with
.test.tssuffix - Follow existing test patterns and conventions
- Update documentation if you're changing functionality
- Add tests for new features or bug fixes
- Run the full test suite and ensure all tests pass
- Update CHANGELOG.md with your changes
- Submit the PR with a clear description
- Code follows the style guide
- Tests added/updated and passing
- Documentation updated
- CHANGELOG.md updated
- No lint errors
- Use TypeScript strict mode
- Prefer
constoverlet - Use explicit type annotations for function parameters and returns
- Use interfaces for object shapes
| Type | Convention | Example |
|---|---|---|
| Files | kebab-case | request-converter.ts |
| Functions | camelCase | convertRequest() |
| Classes | PascalCase | ProxyServer |
| Interfaces | PascalCase | AdapterConfig |
| Constants | UPPER_SNAKE | DEFAULT_PORT |
We use Prettier for code formatting:
npm run formatIf you have questions, please open an issue or reach out to the maintainers.
Thank you for contributing! 🙏