Thank you for your interest in contributing to Claudex! This guide will help you get started.
By participating in this project, you agree to abide by our Code of Conduct.
Prerequisites:
- Rust stable (1.75+)
- Claude Code installed (for integration testing)
Setup:
git clone https://github.com/StringKe/claudex.git
cd claudex
cargo build
cargo test- Find or create an issue describing the bug
- Fork the repo and create a branch:
git checkout -b fix/description - Fix the bug with tests
- Submit a PR referencing the issue
- Open a feature request issue first to discuss the approach
- Fork the repo and create a branch:
git checkout -b feat/description - Implement with tests and documentation
- Submit a PR
We especially welcome contributions adding new AI providers! See the Provider Request template.
To add a provider:
- Add a profile example to
config.example.toml - If the provider needs special handling, modify
src/proxy/translation.rs - Test with
claudex profile test <name>andclaudex run <name> "test" --print - Update documentation in
website/src/content/docs/
Documentation lives in two places:
README.md/README.zh-CN.md— project overviewwebsite/src/content/docs/— full documentation site (Astro Starlight)
All documentation should be bilingual (English + Chinese).
- Branch from
main - One logical change per commit
- Run the full check suite before pushing:
cargo fmt --check
cargo clippy
cargo test
cargo check- CI must pass (fmt + clippy + test + build)
<type>[scope]: <description in Chinese>
| Type | Usage |
|---|---|
feat |
New feature |
fix |
Bug fix |
docs |
Documentation |
refactor |
Refactoring |
perf |
Performance |
test |
Tests |
build |
Build/dependencies |
ci |
CI/CD |
chore |
Miscellaneous |
- Run
cargo fmtbefore committing - Zero
cargo clippywarnings - Use
anyhow::Result+?for error propagation, nounwrap()in production code - Use
tracing::info!/tracing::warn!/tracing::error!for logging - Keep comments in English or Chinese, code identifiers in English
To report a security vulnerability, please use GitHub Private Vulnerability Reporting. See SECURITY.md for details.
感谢你对 Claudex 的关注!本指南帮助你快速上手贡献。
参与本项目即表示你同意遵守 行为准则。
前置条件:
- Rust stable (1.75+)
- 已安装 Claude Code(集成测试用)
本地开发:
git clone https://github.com/StringKe/claudex.git
cd claudex
cargo build
cargo test- 找到或创建描述该缺陷的 issue
- Fork 仓库并创建分支:
git checkout -b fix/描述 - 修复并编写测试
- 提交 PR 并关联 issue
- 先开 feature request issue 讨论方案
- Fork 仓库并创建分支:
git checkout -b feat/描述 - 实现功能、编写测试、更新文档
- 提交 PR
我们特别欢迎添加新 AI 提供商的贡献!请使用 Provider Request 模板。
添加步骤:
- 在
config.example.toml中添加 profile 示例 - 如果提供商需要特殊处理,修改
src/proxy/translation.rs - 用
claudex profile test <name>和claudex run <name> "test" --print测试 - 更新
website/src/content/docs/中的文档
文档在两处:
README.md/README.zh-CN.md— 项目概览website/src/content/docs/— 完整文档站(Astro Starlight)
所有文档需中英双语。
- 从
main分支创建 - 每个 commit 一个逻辑变更
- 推送前运行完整检查:
cargo fmt --check
cargo clippy
cargo test
cargo check- CI 必须通过(fmt + clippy + test + build)
<类型>[范围]: <中文描述>
| 类型 | 说明 |
|---|---|
feat |
新功能 |
fix |
修复 |
docs |
文档 |
refactor |
重构 |
perf |
性能 |
test |
测试 |
build |
构建/依赖 |
ci |
CI/CD |
chore |
杂项 |
- 提交前运行
cargo fmt cargo clippy零 warning- 使用
anyhow::Result+?传播错误,生产代码禁止unwrap() - 使用
tracing记录日志 - 注释中英文皆可,代码标识符用英文
报告安全漏洞请使用 GitHub 私密漏洞报告。详见 SECURITY.md。