Hunk is an interactive source code comparison and review utility designed for terminal-based development and AI-assisted coding workflows. Built with OpenTUI and Pierre diffs, it presents changes across multiple files within a navigable review interface. Users can switch between side-by-side, unified, and automatically responsive comparison layouts. Integrated AI agent annotations provide contextual explanations directly alongside modified source code. Watch mode automatically refreshes comparisons when underlying files change. The application supports Git, Jujutsu, and Sapling repositories alongside standalone file comparisons and raw patches. GitHub integration enables direct inspection of pull requests and commits. A local browser-based review interface provides an alternative to terminal navigation.
Features
- Interactive multi-file source code review with sidebar navigation and syntax-highlighted comparisons
- Flexible comparison layouts supporting side-by-side, unified, and responsive automatic presentation modes
- Inline AI agent annotations providing contextual explanations alongside modified source code
- Automatic comparison refreshing through watch mode for file changes and repository modifications
- Native Git, Jujutsu, and Sapling compatibility with integrated GitHub pull request inspection
- Local browser-based review sessions with mouse interactions and selectable source code annotation ranges