First off, thank you for considering contributing to SimpleX TUI! 🎉
This document provides guidelines for contributing to the project.
- Code of Conduct
- Getting Started
- How to Contribute
- Development Setup
- Commit Guidelines
- Pull Request Process
- Style Guidelines
This project follows the Contributor Covenant Code of Conduct. By participating, you are expected to uphold this code.
- Rust 1.92+ (stable)
- SimpleX Chat CLI installed and running
- Git
# Clone the repository
git clone https://github.com/cannatoshi/simplex-tui.git
cd simplex-tui
# Build
cargo build
# Run
cargo run- Check existing issues
- Use the Bug Report template
- Include reproduction steps and environment details
- Check existing feature requests
- Use the Feature Request template
- Explain the use case and proposed solution
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
# Fork on GitHub, then:
git clone https://github.com/YOUR_USERNAME/simplex-tui.git
cd simplex-tui
# Add upstream remote
git remote add upstream https://github.com/cannatoshi/simplex-tui.git
# Build in debug mode
cargo build
# Build in release mode
cargo build --releasesimplex-tui/
├── src/
│ ├── main.rs # Entry point
│ ├── app.rs # Application state
│ ├── ui.rs # UI rendering
│ ├── websocket.rs # WebSocket client
│ ├── events.rs # Event handling
│ └── types.rs # Data types
├── Cargo.toml # Dependencies
└── README.md # Documentation
# Run all tests
cargo test
# Run with output
cargo test -- --nocapture
# Run specific test
cargo test test_name# Format code
cargo fmt
# Run linter
cargo clippy
# Check without building
cargo checkWe use Conventional Commits with emojis for clear commit history.
<type>(<scope>): <description> <emoji>
[optional body]
[optional footer]
Signed-off-by: Your Name <your.email@example.com>
| Type | Emoji | Description |
|---|---|---|
feat |
✨ | New feature |
fix |
🐛 | Bug fix |
docs |
📖 | Documentation |
style |
🎨 | Code style (formatting) |
refactor |
♻️ | Code refactoring |
perf |
⚡ | Performance improvement |
test |
🧪 | Adding tests |
chore |
🔧 | Maintenance tasks |
ci |
👷 | CI/CD changes |
security |
🔒 | Security fixes |
# Feature
git commit -s -m "feat(ui): Add contact search functionality ✨"
# Bug fix
git commit -s -m "fix(websocket): Handle reconnection on timeout 🐛"
# Documentation
git commit -s -m "docs(readme): Update installation instructions 📖"
# Refactor
git commit -s -m "refactor(app): Extract message handling to module ♻️"All commits must be signed off to certify you have the right to submit the code:
# Sign off commits with -s flag
git commit -s -m "Your commit message"
# This adds:
# Signed-off-by: Your Name <your.email@example.com>By signing off, you agree to the DCO:
Developer Certificate of Origin
Version 1.1
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
By making a contribution to this project, I certify that:
(a) The contribution was created in whole or in part by me and I
have the right to submit it under the open source license
indicated in the file; or
(b) The contribution is based upon previous work that, to the best
of my knowledge, is covered under an appropriate open source
license and I have the right under that license to submit that
work with modifications, whether created in whole or in part
by me, under the same open source license; or
(c) The contribution was provided directly to me by some other
person who certified (a), (b) or (c) and I have not modified it.
(d) I understand and agree that this project and the contribution
are public and that a record of the contribution is maintained
indefinitely and may be redistributed consistent with this
project or the open source license(s) involved.
- ✅ Fork and create a feature branch
- ✅ Make your changes
- ✅ Run
cargo fmtandcargo clippy - ✅ Test your changes
- ✅ Sign off your commits (
git commit -s) - ✅ Update documentation if needed
- Push to your fork
- Create a Pull Request against
main - Fill out the PR template
- Wait for review
- Maintainers will review your PR
- Address any requested changes
- Once approved, your PR will be merged
# Update your fork
git checkout main
git pull upstream main
git push origin main
# Delete feature branch
git branch -d your-feature-branch- Follow Rust API Guidelines
- Use
cargo fmtfor formatting - Use
cargo clippyfor linting - Write descriptive variable names
- Add comments for complex logic
// Good: Descriptive names
fn render_contact_list(contacts: &[Contact], selected: usize) -> Paragraph {
// ...
}
// Bad: Unclear names
fn render(c: &[Contact], s: usize) -> Paragraph {
// ...
}- Add doc comments for public functions
- Include examples where helpful
- Keep comments up to date
/// Renders the contact list widget.
///
/// # Arguments
///
/// * `contacts` - Slice of contacts to display
/// * `selected` - Index of currently selected contact
///
/// # Returns
///
/// A styled Paragraph widget ready for rendering
fn render_contact_list(contacts: &[Contact], selected: usize) -> Paragraph {
// ...
}Thank you for contributing! 💙
Last updated: January 2026