Contributing
Guidelines for contributing to TUIOS
Thank you for your interest in contributing to TUIOS!
Getting Started
Prerequisites
- Go 1.24.4 or later
- Git
- Nerd Font (for testing UI)
Development Setup
# Clone repository
git clone https://github.com/Gaurav-Gosain/tuios
cd tuios
# Install dependencies
go mod download
# Build
go build -o tuios ./cmd/tuios
go build -o tuios-web ./cmd/tuios-web
# Run
./tuios --debug
# Run tests
go test ./...
go test -race ./...Nix Development
nix develop # Enter dev shell
nix build # Build package
nix run # Run directlyCode Style
- Run
go fmtbefore committing - Follow Effective Go conventions
- Add doc comments for exported types/functions
- Keep functions focused and testable
Testing
Running Tests
# All tests
go test ./...
# Specific package
go test ./internal/vt/...
# With coverage
go test -cover ./...
# With race detection
go test -race ./...
# Verbose output
go test -v ./internal/config/...Writing Tests
- Use table-driven tests where appropriate
- Test file naming:
*_test.go - Prefer unit tests over integration tests
- Use
t.Run()for subtests
Example:
func TestFeature(t *testing.T) {
tests := []struct {
name string
input string
expected string
}{
{"case1", "input1", "output1"},
{"case2", "input2", "output2"},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
result := Feature(tt.input)
if result != tt.expected {
t.Errorf("got %v, want %v", result, tt.expected)
}
})
}
}Pull Request Process
-
Fork & Branch
git checkout -b feature/your-feature -
Make Changes
- Write code
- Add/update tests
- Update documentation if needed
-
Commit
git commit -m "feat: add feature description"Use conventional commit format:
feat:- New featurefix:- Bug fixdocs:- Documentationrefactor:- Code refactoringtest:- Testschore:- Maintenance
-
Push & PR
git push origin feature/your-featureCreate PR on GitHub with:
- Clear description
- Link to related issues
- Screenshots/demos if UI changes
-
Review
- Address feedback
- Keep commits clean
- Rebase if needed
Areas to Contribute
High Priority
- Test coverage improvements
- Bug fixes
- Performance optimizations
- Documentation improvements
Feature Ideas
- Additional keybinding actions
- New layout algorithms
- Theme improvements
- Terminal emulation enhancements
Good First Issues
Check GitHub issues labeled good-first-issue.
Architecture
See Architecture for:
- Project structure
- Key components
- Coding patterns
Reporting Issues
Bug Reports
Include:
- TUIOS version (
tuios --version) - OS and terminal emulator
- Steps to reproduce
- Expected vs actual behavior
- Relevant logs (
tuios --debug)
Feature Requests
Include:
- Use case description
- Proposed solution
- Alternative solutions considered
Community
- GitHub Issues: Bug reports & features
- Discussions: Questions & ideas
- PRs: Code contributions
All contributors are expected to follow our Code of Conduct: be respectful, inclusive, and constructive.