Baike.dev
All toolsOnline toolsAI codingTrendingOpen sourceNewsSubmit
Log in
< Back to tools
H

hwatch

> 编程语言
Open source

hwatch: alternative watch command with history, diff view, JSONL logging, and change hooks. since 2018.

1.1K stars0 likes2 views
WebsiteGitHub

About

hwatch: alternative watch command with history, diff view, JSONL logging, and change hooks. since 2018.

hwatch

hwatch - alternative watch command.

Description

hwatch is a alternative watch command, it developed started in 2018. That records the result of command execution, can display it history and diffs, hook and run commands.

Features

  • Can keep the history when the difference, occurs and check it later.
  • Can check the difference in the history. The display method can be changed in real time.
  • Can output the execution result as log (json format).
  • Can load diffmode plugins as dynamic libraries and add custom diff rendering.
  • Custom keymaps are available.
  • Support ANSI color code.
  • Execution result can be scroll.
  • Not only as a TUI application, but also to have the differences output as standard output.
  • If a difference occurs, you can have the specified command additionally executed.

Install

Official Distro Packages

Debian

hwatch has been accepted into Debian unstable, although availability may depend on mirror sync status.

If you need it immediately, use the release .deb package from GitHub Releases.

Fedora

Official Fedora packaging is in progress and not yet available from Fedora repositories.

EPEL

EPEL packaging is planned after Fedora packaging is finalized.

Alpine Linux (edge/testing)

bash
apk add hwatch

Packaging Status

This repository includes packaging metadata for Debian-style .deb builds and RPM-based distributions, and GitHub Releases publishes prebuilt archives plus generated .deb and .rpm assets while official distro packaging is being worked on.

GitHub Actions validates the packaging flow in distro-specific containers:

  • Debian packaging is checked in a debian:sid container
  • RPM packaging is checked in a fedora:latest container

These checks are intended to catch packaging regressions early while the project works toward official distribution packaging. Alpine packages are available today, and Debian/Fedora distribution repository submissions are still in progress.

Other Package Managers

Community-maintained packages are available in several ecosystems, but they may lag behind the latest upstream release.

macOS

bash
# brew
brew install hwatch

# MacPorts
sudo port install hwatch

Arch Linux (AUR)

bash
# paru
paru -S hwatch

# yay
yay -S hwatch

Nix

bash
nix profile install nixpkgs#hwatch

conda-forge

bash
conda install conda-forge::hwatch
# or
mamba install conda-forge::hwatch

mise/asdf

bash
# mise
mise use -g aqua:blacknon/hwatch

# asdf
asdf plugin add hwatch
asdf install hwatch latest
asdf global hwatch latest

GitHub Releases

If you want the latest upstream release immediately, use the assets published on GitHub Releases.

Current release assets include:

  • Linux: x86_64-unknown-linux-gnu.tar.gz
  • Linux: x86_64-unknown-linux-musl.tar.gz
  • Linux: aarch64-unknown-linux-musl.tar.gz
  • Linux: x86_64-unknown-linux-musl.deb
  • Linux: x86_64-fedora.rpm
  • macOS: x86_64-apple-darwin.tar.gz
  • macOS: aarch64-apple-darwin.tar.gz
  • Windows: x86_64-pc-windows-msvc.zip

For generic .tar.gz assets:

bash
curl -LO https://github.com/blacknon/hwatch/releases/latest/download/hwatch-..tar.gz
tar xf hwatch-..tar.gz
sudo install -m 0755 bin/hwatch /usr/local/bin/hwatch

For the generated release packages:

bash
# Debian/Ubuntu-style systems
sudo dpkg -i hwatch-.x86_64-unknown-linux-musl.deb

# Fedora/RHEL-style systems
sudo dnf install ./hwatch-.x86_64-fedora.rpm

Cargo Install

bash
cargo install hwatch

Notes

Security

  • --diff-plugin loads native dynamic libraries. Only load plugins you trust.
  • --shell, the monitored command itself, and --aftercommand execute commands on your system. Treat those values as trusted input only.

Usage

Command

…

Keybind

Watch mode keybind(Default).

Key Action
↑, ↓ move selected screen(history/watch).
pageup, pagedn move selected screen(history/watch).
home, end move selected screen(history/watch).
Tab toggle select screen(history/watch).
← select watch screen.
→ select history screen.
Alt+←, Alt+→ Watch window scrll left/right.
Shift+Alt+←, Shift+Alt+→ Watch window scrll start/end.
Q exit hwatch.
Esc unfiltering.
Shift+D delete selected history.
Shift+X clear all history except selected history.
Ctrl+c cancel.
H show help window.
B toggle enable/disable border.
C toggle color.
N switch line number display.
R toggle reverse mode.
M toggle mouse support.
T toggle the UI (history pane and header).
Backspace toggle the history pane.
D switch diff mode.
0 disable diff.
1 switch watch type diff.
2 switch line type diff.
3 switch word type diff.
Shift+O show only lines with differences(line/word diff mode only).
O switch output mode(output->stdout->stderr).
W Toggle wrap.
F1 only stdout print.
F2 only stderr print.
F3 print output.
Ctrl+N Forcus next keyword.
Ctrl+P Forcus before keyword.
Shift+S show summary information in history.
+ increase interval.
- decrease interval.
P Pause/unpause execution.
/ filter history by string.
* filter history by regex.

Custom keybind

Can customize key bindings by using the -K Option. Write it in the format keybind=funciton.

bash
hwatch -K ctrl-p=history_pane_up -K ctrl-n=history_pane_down command...

Keybind functions that can be specified are as follows.

function description
up Move up
watch_pane_up Move up in watch pane
history_pane_up Move up in history pane
down Move down
watch_pane_down Move down in watch pane
history_pane_down Move down in history pane
scroll_right Move page right in watch pane
scroll_horizontal_end Move page right end in watch pane
scroll_left Move page left in watch pane
scroll_horizontal_home Move page left start in watch pane
page_up Move page up
watch_pane_page_up Move page up in watch pane
history_pane_page_up Move page up in history pane
page_down Move page down
watch_pane_page_down Move page down in watch pane
history_pane_page_down Move page down in history pane
move_top Move top
watch_pane_move_top Move top in watch pane
history_pane_move_top Move top in history pane
move_end Move end
watch_pane_move_end Move end in watch pane
history_pane_move_end Move end in history pane
toggle_focus

Issues· 0 open

View all issuesOpen on GitHub

No open issues yet, or sync has not completed.

> Tags

Rustcommand-linemonitoringrustterminal-ui

No comments yet. Be the first to share.

> Details

PublishedAug 1, 2026
UpdatedSep 17, 2026
Category编程语言
PricingOpen source

> Related tools

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言