Thank you for your interest in contributing to Claudex! This document provides guidelines for contributing to the project.
When reporting bugs, please include:
- A clear description of the issue
- Steps to reproduce the problem
- Expected vs actual behavior
- Your environment (OS, Go version, Claudex version)
- Relevant logs or error messages
Open an issue on GitHub with the bug label.
Feature suggestions are welcome! Please:
- Check existing issues to avoid duplicates
- Describe the feature and its use case clearly
- Explain why this feature would benefit Claudex users
- Open an issue with the
enhancementlabel
- Fork and Clone: Fork the repository and clone it locally
- Create a Branch: Use a descriptive branch name (e.g.,
fix-config-parsing,add-session-export) - Make Changes: Follow the code style guidelines below
- Write Tests: Add or update tests for your changes
- Run Tests: Ensure all tests pass with
go test ./... - Format Code: Run
go fmt ./...andgo vet ./... - Commit: Write clear, concise commit messages
- Push: Push to your fork and submit a pull request
- Describe: Explain what your PR does and why
- Follow Effective Go conventions
- Use
gofmtfor formatting (non-negotiable) - Write clear, self-documenting code
- Add godoc comments for exported functions and types
- Keep functions focused and reasonably sized
- Handle errors explicitly - never ignore them
- Use meaningful variable and function names
- Write table-driven tests for new functionality
- Maintain or improve code coverage
- Test edge cases and error conditions
- Use
t.Run()for subtests - Ensure tests are deterministic and don't rely on timing
# Clone your fork
git clone https://github.com/YOUR_USERNAME/claudex.git
cd claudex
# Install dependencies
go -C src mod download
# Run tests
go -C src test ./...
# Build the binary
go -C src build -o ../claudex ./cmd/claudexOr use the Makefile targets:
make deps # Install dependencies
make test # Run tests
make build # Build the binary
make check # Run fmt, vet, and test (recommended before PRs)If you encounter an error like:
go: go.mod requires go >= 1.24.0 (running go 1.23.9; GOTOOLCHAIN=local)
You can use the auto toolchain to let Go download the required version automatically:
export GOTOOLCHAIN=auto
export GOPATH=/tmp/gopath
export GOMODCACHE=/tmp/gopath/pkg/modThen run your build or test commands. This workaround is useful when you cannot upgrade your system Go installation or have permission issues with the default module cache location.
If you have questions about contributing, feel free to open an issue for discussion.
Thank you for contributing to Claudex!