Contributing to brin
March 12, 2026 · View on GitHub
Thanks for your interest in contributing to brin! We welcome contributions of all kinds.
Table of Contents
- Getting Started
- Development Setup
- How to Contribute
- Code Style
- Commit Messages
- Pull Request Process
- Community
Getting Started
Before contributing, please:
- Read the README to understand the project
- Check existing issues to avoid duplicates
- For major changes, open an issue first to discuss
Development Setup
Prerequisites
Setup
# Clone the repo
git clone https://github.com/superagent-ai/brin-cli
cd brin
# Set up git hooks
make setup
# Start databases
docker-compose up -d db redis
# Run the API
make dev-api
# Or run everything (API + worker)
make dev
Running Tests
# Run all tests
cargo test --workspace
# Run with output
cargo test --workspace -- --nocapture
# Run specific test
cargo test test_name
Useful Commands
make fmt # Format code
make lint # Run clippy
make test # Run tests
make check # Run all checks (fmt + lint + test)
How to Contribute
Reporting Bugs
Use the bug report template and include:
- Steps to reproduce
- Expected vs actual behavior
- Rust version (
rustc --version) - OS and architecture
Suggesting Features
Use the feature request template and describe:
- The problem you're trying to solve
- Your proposed solution
- Alternatives you've considered
Security Issues
Do not open public issues for security vulnerabilities. Email security@superagent.sh instead.
Code Contributions
- Fork the repository
- Create a feature branch (
git checkout -b feat/my-feature) - Make your changes
- Run checks (
make check) - Commit with a descriptive message
- Push and open a pull request
Code Style
We follow standard Rust conventions:
- Run
cargo fmtbefore committing - Run
cargo clippyand fix all warnings - Use meaningful variable and function names
- Add doc comments for public APIs
- Keep functions small and focused
- Write tests for new functionality
Project Structure
crates/
├── api/ # HTTP API server
├── cli/ # Command-line interface
├── common/ # Shared types and database
├── cve/ # CVE enrichment worker
├── watcher/ # npm registry watcher
└── worker/ # Package scanner
Commit Messages
Use conventional commits:
type: short description
[optional body]
[optional footer]
Types:
feat: New featurefix: Bug fixdocs: Documentationrefactor: Code change that doesn't fix a bug or add a featuretest: Adding testschore: Maintenance tasks
Examples:
feat: add pypi support
fix: handle scoped package names correctly
docs: update API reference
refactor: extract trust score calculation
Pull Request Process
- Title: Use conventional commit format
- Description: Explain what and why
- Tests: Add tests for new functionality
- Checks: Ensure CI passes (fmt, clippy, tests)
- Review: Address feedback promptly
PRs are squash-merged to keep history clean.
Community
- Discord — chat with the team
- Twitter/X — follow for updates
- GitHub Issues — bugs and features
Thank you for contributing!