Repository navigation
14 Watch
croft watch <recipe> re-runs <recipe> whenever watched files
change.
croft watch test
croft watch test --filter Login
croft watch lint --path src --path tests --debounce-ms 500The recipe runs once at start, then on each filesystem event after a debounce window. Output streams to your terminal as the recipe runs; the next event interrupts a running invocation only after it finishes (no mid-flight kill — recipes are atomic).
| Flag | Default | Notes |
|---|---|---|
--path <PATH> |
project root | Path to watch. Repeat for multiple paths. |
--debounce-ms <MS> |
300 |
Coalesce bursts of events into one re-run. |
Trailing args are forwarded to the recipe in the same way croft <recipe> args... would. Add forward_args = true to the recipe so
it picks them up:
[command.test]
run = "composer test"
forward_args = trueRecursive into --path, honouring .gitignore. The notify backend
(notify v7) picks the best per-OS implementation: inotify on Linux,
FSEvents on macOS, ReadDirectoryChangesW on Windows.
The TUI's [[ui.pane]] type = "watcher" and restart_on = [...] on
command panes use the same engine. See TUI.
-
Recipes and Scripts —
forward_argsand recipe basics. - TUI — watcher panes pinned in the dashboard.
croft is dual-licensed under MIT or Apache 2.0. Source: github.com/nsrosenqvist/croft. Back to Home.