Thank you for your interest in contributing to Litestream! We value community contributions and appreciate your help in making Litestream better.
- Bug fixes and patches: If you've found a bug and have a fix, we welcome your contribution
- Security vulnerability reports: Please report security issues responsibly (see Security section below)
- Documentation improvements: Help make our docs clearer and more comprehensive
- Testing and feedback: Report issues, test new features, and provide feedback
- Small code improvements: Performance optimizations, code cleanup, and minor enhancements
- Feature requests: Please open an issue to discuss new features before implementing them
- Large changes: For significant modifications, please discuss your approach in an issue first
- Large external feature contributions: Features carry a long-term maintenance burden. To reduce burnout and maintain code quality, we typically implement major features internally. This allows us to ensure consistency with the overall architecture and maintain the high reliability that Litestream users depend on for disaster recovery
- Breaking changes: Changes that break backward compatibility require extensive discussion
We welcome AI-assisted contributions for bug fixes and small improvements. Whether you're using Claude, Copilot, Cursor, or other AI tools:
Requirements:
- Show your investigation - Include evidence (logs, file patterns, debug output) proving the problem exists
- Define scope clearly - State what the PR does and does not do
- Include runnable test commands - Actual
go testcommands, not just descriptions - Human review before submission - You're responsible for the code you submit
Resources:
- AI_PR_GUIDE.md - Detailed guide with templates and examples
- AGENTS.md - Project overview for AI assistants
Before reporting a bug:
- Check the existing issues to avoid duplicates
- Verify you're using the latest version of Litestream
- Gather diagnostic information (OS, version, configuration, error messages)
When reporting a bug, please use our issue template and include:
- Your operating system and version
- Litestream version (
litestream version) - Relevant configuration (sanitized of sensitive data)
- Steps to reproduce the issue
- Expected vs actual behavior
- Any error messages or logs
-
Fork the repository and create a new branch from
main -
Make your changes following our code style (see Development section)
-
Add or update tests as appropriate
-
Update documentation if you're changing behavior
-
Run tests and linters locally:
go test -v ./... go vet ./... go fmt ./... goimports -local github.com/benbjohnson/litestream -w . pre-commit run --all-files
-
Submit a pull request with a clear description of your changes
Your PR should:
- Have a clear, descriptive title
- Reference any related issues (e.g., "Fixes #123")
- Include tests for bug fixes and new features
- Pass all CI checks
- Have a focused scope (one bug fix or feature per PR)
- Go 1.24 or later
- CGO enabled (for SQLite integration)
- Git
- Pre-commit (optional but recommended):
pip install pre-commit
# Clone the repository
git clone https://github.com/benbjohnson/litestream.git
cd litestream
# Build the binary
go build ./cmd/litestream
# Run tests
go test -v ./...
# Install pre-commit hooks (recommended)
pre-commit install- Follow standard Go conventions
- Use
gofmtandgoimportsfor formatting - Run
go vetandstaticcheckfor static analysis - Keep functions focused and well-documented
- Add comments for exported types and functions
- Write unit tests for new functionality
- Ensure existing tests pass before submitting PRs
- Integration tests require specific environment setup (see test files for details)
If you discover a security vulnerability, please:
- DO NOT open a public issue
- Email the maintainers directly with details
- Allow time for the issue to be addressed before public disclosure
We expect all contributors to:
- Be respectful and inclusive
- Welcome newcomers and help them get started
- Focus on constructive criticism
- Respect differing viewpoints and experiences
- Documentation: litestream.io
- Issues: GitHub Issues
By contributing to Litestream, you agree that your contributions will be licensed under the Apache License 2.0, the same as the project.
Thank you to all our contributors! Your efforts help make Litestream a reliable disaster recovery tool for the SQLite community.