Getting Started
Prerequisites
- Development environment: Follow the Building from Source guide to set up Rust and dependencies.
-
Familiarity with:
- Rust programming language
- Terminal emulation concepts (VT100, ANSI escape codes)
- GPUI (Termy’s UI framework) - basic understanding helpful
-
Tools:
- Git for version control
- just task runner (optional but recommended)
- Code editor with Rust support (VS Code + rust-analyzer, RustRover, etc.)
Fork and Clone
- Fork the Termy repository on GitHub
- Clone your fork:
- Add upstream remote:
Development Setup
Build and Run
Verify your setup:Enable Debug Features
Development builds include extra diagnostics:Run Tests
Architecture Validation
Before submitting changes, run boundary checks:- Dependency boundaries are respected (e.g., CLI crates don’t depend on GPUI)
- Generated documentation is up-to-date
Code Structure
Key Areas
Understand where to make changes:Terminal Emulation & Rendering
Terminal Emulation & Rendering
Location:
crates/terminal_ui/Covers:- Terminal process management (
runtime.rs) - Grid rendering and caching (
grid.rs) - PTY handling (Unix/Windows)
- Tmux integration (
tmux/) - Link detection (
links.rs)
UI & User Experience
UI & User Experience
Location:
src/Covers:- Terminal view component (
terminal_view/) - Settings UI (
settings_view/) - Menus and actions (
menus.rs,commands.rs) - Window management (
main.rs) - Input handling (
text_input.rs)
Configuration System
Configuration System
Location:
crates/config_core/, src/config/Covers:- Config data structures (
config_core) - Config loading and parsing (
src/config/) - Theme integration
- Validation and defaults
just generate-config-docCommands & Keybinds
Commands & Keybinds
Location:
crates/command_core/, src/keybindings/Covers:- Command definitions (
command_core) - Keybind resolution and parsing
- Default keybind configuration
- GPUI action integration (
src/keybindings/)
just generate-keybindings-docThemes
Themes
Location:
crates/theme_core/, crates/themes/Covers:- Theme data structures (
theme_core) - Built-in themes (
themes) - Theme validation
crates/themes/src/CLI Tool
CLI Tool
Location:
crates/cli/, crates/cli_install_core/Covers:termy-clibinary commands- Config validation
- Shell integration installation
- TUI-based previews
Auto-Update System
Auto-Update System
Location:
crates/auto_update/, crates/auto_update_ui/Covers:- Update checking (
auto_update) - Download and installation
- Update UI notifications (
auto_update_ui)
termy_release_core for version metadataDependency Rules
Termy enforces strict dependency boundaries via CI: Forbidden dependencies (will fail CI):termy_command_core→gpuitermy_command_core→termy_config_coretermy_config_core→termy_themestermy_cliortermy_cli_install_core→gpui
Making Changes
Create a Branch
Branch frommain with a descriptive name:
feature/for new featuresfix/for bug fixesrefactor/for refactoringdocs/for documentation
Code Style
Termy follows standard Rust conventions:- Use
cargo fmtbefore committing - Address all
cargo clippywarnings - Add comments for non-obvious logic
- Write doc comments for public APIs
- Follow existing patterns in the codebase
Testing Your Changes
-
Unit tests: Add tests in the same file or
tests/module -
Integration tests: For terminal features, consider tmux tests
-
Manual testing: Run Termy and verify behavior
-
Render metrics: Check for performance regressions
Update Generated Docs
If you modify commands or config:Submitting a Pull Request
Before Submitting
Run the full validation suite:Commit Messages
Write clear, descriptive commit messages: Good:- Use imperative mood (“Add feature” not “Added feature”)
- Reference issue numbers (“Fixes #123”)
- Explain why if not obvious from what
Create the PR
-
Push your branch:
- Open a pull request on GitHub
-
Fill out the PR template:
- Description: Explain what and why
- Screenshots/Videos: For UI changes (highly appreciated!)
- Related Issues: Link issues (“Closes #123”)
- Checklist: Confirm no overlapping PRs
PR Review Process
-
CI checks: Automated checks must pass:
- Rust formatting (
cargo fmt) - Architecture boundary validation
- Tmux integration tests (macOS)
- Rust formatting (
- Code review: Maintainers will review and may request changes
-
Iterate: Address feedback, push updates:
- Merge: Once approved, maintainers will merge your PR
Types of Contributions
Bug Fixes
- Check existing issues for duplicates
- Create an issue if one doesn’t exist (use bug report template)
- Reference the issue in your PR (“Fixes #123”)
- Include steps to reproduce + test that verify the fix
New Features
- Discuss first: Open a feature request issue to discuss design
- Wait for maintainer feedback before implementing (avoid wasted work)
- Break large features into smaller PRs when possible
- Update documentation as needed
Documentation
Documentation improvements are always welcome:- Fix typos or clarify existing docs
- Add examples or tutorials
- Document undocumented features
- Improve API doc comments
docs/keybindings.md, etc.); instead, update the generator in crates/xtask/.
Themes
To contribute a new theme:- Add theme to
crates/themes/src/ - Follow existing theme structure
- Test with:
- Include a screenshot in your PR
Tests
Improving test coverage helps everyone:- Add unit tests for edge cases
- Add integration tests for complex features
- Improve existing test clarity
Getting Help
Questions
- Architecture questions: See Architecture guide
- Build issues: See Building from Source
- GitHub Discussions: For general questions
- Issues: For bug reports or feature requests
Codebase Navigation
Start with these files:- Entry point:
src/main.rs - Terminal view:
src/terminal_view/mod.rs - Terminal runtime:
crates/terminal_ui/src/runtime.rs - Commands:
crates/command_core/src/lib.rs - Config:
crates/config_core/src/lib.rs
cargo doc --open to browse API documentation.
CI Failures
Common CI failures:- Formatting: Run
cargo fmt --all - Boundary check: Run
./scripts/check-boundaries.shlocally - Stale docs: Run
just generate-keybindings-doc && just generate-config-doc - Tmux tests: These only run on macOS CI; install tmux >= 3.3 to test locally
Code of Conduct
Be respectful and constructive:- Welcome newcomers and answer questions patiently
- Provide constructive feedback in reviews
- Respect maintainer decisions on scope and direction
- Focus on technical merit, not personal preferences
Recognition
All contributors are valued! Contributions are recognized via:- GitHub contribution graph
- Release notes for significant features
- Community appreciation
License
By contributing, you agree that your contributions will be licensed under the MIT License.Next Steps
- Architecture - Deep dive into codebase structure
- Building from Source - Detailed build instructions
- Configuration - Understand configuration system
- GitHub Issues - Find issues to work on