viddy
A modern watch command with time-machine mode, diff highlighting, and vim-style navigation.
viddy is a modern replacement for the Unix watch command that runs a command
repeatedly and displays its output — extended with a TUI, diff highlighting, and
a unique time-machine mode that lets you scroll back through the full history of
past executions. Where watch shows only the current output, viddy stores
every run so you can rewind, inspect what changed, and fast-forward back to the
present without losing any history.
Features
- Time-machine mode — pause execution and rewind through every past command output like a video, then return to the present.
- Diff highlighting — changed lines are highlighted between successive runs, making regressions and updates immediately visible.
- Pager with vim keybindings — scroll large outputs with
j/k, search with/, and navigate pages withCtrl-F/Ctrl-B. - Suspend and resume — pause periodic execution without exiting, then restart from where you left off.
- Shell alias support — runs commands through your shell, so aliases and shell functions work as expected.
- Save and load history — persist output history to disk and reload it later for post-mortem analysis.
- Customisable keybindings and colours — configured via a TOML file in the XDG config directory.
Installation
cargo install viddy# Debian / Ubuntu
# No package in the official repos; use the cargo command above or download
# a pre-built binary from the releases page:
# https://github.com/sachaos/viddy/releases
# Fedora
# No official package; use cargo or a release binary.
# macOS
brew install viddy
# Arch Linux (AUR)
yay -S viddy
# Alpine Linux (community repo)
apk add viddyUsage
viddy accepts the same basic interface as watch:
# Run a command every 2 seconds (default interval)
viddy df -h
# Set a custom interval (every 0.5 seconds)
viddy -n 0.5 'curl -s https://example.com/status | jq .status'
# Highlight differences between runs
viddy -d free -m
# Run until the output changes (like watch --chgexit)
viddy -x ls /tmpKey bindings
| Key | Action |
|---|---|
Space | Toggle time-machine mode |
s | Toggle suspend / resume execution |
d | Toggle diff highlighting |
t | Toggle header display |
/ | Search text in output |
j / k | Scroll down / up |
Ctrl-F / Ctrl-B | Page down / up |
g / Shift-G | Go to top / bottom of output |
Shift-J / Shift-K | (Time machine) Step to past / future |
Shift-F / Shift-B | (Time machine) Jump further past / future |
Shift-O / Shift-N | (Time machine) Oldest / current position |
? | Toggle help overlay |
Configuration
Place a viddy.toml file at $XDG_CONFIG_HOME/viddy.toml (on macOS:
~/Library/Application Support/viddy.toml):
[general]
shell = "zsh" # shell used to run commands
shell_options = "" # extra options passed to the shell
no_shell = false # set true to bypass the shell entirely
skip_empty_diffs = false
disable_mouse = true
[keymap]
timemachine_go_to_past = "Down"
timemachine_go_to_more_past = "Shift-Down"
timemachine_go_to_future = "Up"
timemachine_go_to_more_future = "Shift-Up"
timemachine_go_to_now = "Ctrl-Shift-Up"
timemachine_go_to_oldest = "Ctrl-Shift-Down"
scroll_up = "k"
scroll_down = "j"
scroll_half_page_up = "Ctrl-u"
scroll_half_page_down = "Ctrl-d"
[color]
background = "inherit" # or a named colour / hex valueviddy vs watch
| Feature | viddy | watch (procps) |
|---|---|---|
| Output history / time machine | ✅ | ❌ |
| Diff highlighting | ✅ | ✅ (-d) |
| Pager for large output | ✅ | ❌ |
| Vim-style navigation | ✅ | ❌ |
| Suspend / resume | ✅ | ❌ |
| Shell alias support | ✅ | ❌ (needs -x) |
| Configurable keybindings | ✅ | ❌ |
| Available on all platforms | ✅ | Linux only |