Thanks for your interest in contributing to hwatch.
This document explains the expected workflow for code, documentation, plugins, and release-related changes so contributors can make focused pull requests that are easy to review.
- Check existing issues and pull requests before starting large changes.
- Prefer small, focused pull requests over broad refactors.
- If your change affects behavior, CLI output, docs, or packaged artifacts, update the related files in the same pull request.
- Rust stable
cargo- On macOS, Linux, or another environment supported by the project
Optional tools:
misefor project tasksvhsfor regenerating demo GIFs inimg/
Build the main binary:
cargo buildBuild everything in the workspace:
cargo build --workspace --all-targetsBuild bundled plugins:
cargo build --manifest-path plugins/numeric-diff/Cargo.toml --release
cargo build --manifest-path plugins/numeric-inline-diff/Cargo.toml --releaseIf you use mise, these tasks are also available:
mise run cli_build
mise run plugin_build
mise run full_buildPlease run the same core checks used in CI:
cargo fmt --all --check
cargo build --workspace --all-targets
cargo clippy --workspace --all-targets -- -D warnings
cargo test --workspace --all-targetsIf your change only affects a plugin, run the relevant plugin build too.
- Follow standard Rust formatting with
cargo fmt. - Keep changes focused and avoid unrelated cleanup in the same pull request.
- Add tests for bug fixes or behavior changes when practical.
- Prefer keeping CLI help text, README examples, and manual pages consistent.
When behavior changes, update the related documentation in the same pull request.
Common files to review:
README.mdfor user-facing behavior and examplesman/man.mdand generated manpage sources when CLI text changescompletion/when command-line options or help text changeimg/*.tapeand generated GIFs when demos become outdatedpackage/fedora/hwatch.specwhen packaging or release build behavior changesplugins/*/README.mdwhen bundled plugin behavior changes
- Unit and integration tests live in the Rust workspace and
tests/. - Some features are easier to validate manually because
hwatchis a TUI tool. - If you verify something manually, include the steps in the pull request description.
Examples:
- terminal behavior
- mouse support
- PTY-related behavior
- diff mode rendering
- plugin loading
Please include:
- a short summary of what changed
- why the change was needed
- how you tested it
- any follow-up work or known limitations
Good pull requests usually:
- keep one main purpose
- include docs updates when needed
- avoid mixing refactors with behavior changes unless necessary
When opening an issue, include as much of the following as possible:
- operating system
- terminal emulator
hwatchversion- exact command used
- expected behavior
- actual behavior
- reproduction steps
For rendering or terminal issues, screenshots or terminal recordings can help.
hwatch supports diffmode plugins as dynamic libraries.
If you change plugin APIs or bundled plugins:
- update the relevant plugin README
- verify the plugin still builds in release mode
- document any compatibility or ABI considerations in the pull request
If your change affects packaging or distributed artifacts, also review:
.github/workflows/package/package/fedora/hwatch.spec- release packaging paths or asset names
If you are unsure about scope or direction, opening an issue or draft pull request early is welcome.