github watchexec/watchexec v1.22.0
CLI v1.22.0

latest releases: v2.1.2, bosion-v1.1.0, v2.1.1...
18 months ago

Software development often involves running the same commands over and over. Boring! Watchexec is a simple, standalone tool that watches a path and runs a command whenever it detects modifications. Install it today with cargo-binstall watchexec-cli, from the binaries below, find it in your favourite package manager, or build it from source with cargo install watchexec-cli.

In this release:

  • New: --emit-events-to <mode> provides alternative ways to receive event details. To the environment mode, equivalent to the previous behaviour (and still the default), the file, stdin, json-file, and json-stdint modes are added. The watchexec-events crate can be used to parse the JSON format from Rust programs.
  • New: --fs-events <events> provides a more flexible way to filter which kinds of filesystem events cause command runs. The --no-meta option is now an alias to the configuration of this method omitting metadata changes.
  • New: --clear=reset performs a stronger screen clear (roughly equivalent to a tput reset).
  • Whole new extended help, manual page, and completion scripts (now for bash, elvish, fish, nu, and powershell in addition to zsh).
  • New: --manual shows the manual page, --help shows extended help (-h shows short help), --completion <shell> prints a completion script, such that even installing from source can benefit from the manpage or completions.

Other changes:

  • New: --filter-file and --ignore-file provide ways to load arbitrary ignore files, and also "filter files", which should be formatted like ignore files but patterns are treated the same as --ignore patterns.
  • New: --stop-signal lets you override the signal used to stop the process during a restart.
  • New: --stop-timeout lets you override the time waited between sending a signal and killing the process (which defaults to 30 seconds).
  • --log-file's path argument is now optional. Providing the bare --log-file option uses the current directory. Further, the option also accepts a directory instead of a file, in which case it will create a file named watchexec.<timestamp>.log there.
  • --poll is the new name for --force-poll (the old name exists as an alias), and the polling interval is now optional, with a default provided if no value is given.
  • All options that take durations now both take numbers in the unit described, but also expressions of the form 2mins 30s. This is a very similar format as systemd's durations, implemented by the humantime crate.
  • Removed support for the "tagged" filterer experiment.
  • The long --version option now prints extended version information, including the build date and commit hash (where that information is available). This is powered by a new crate, bosion.

Don't miss a new watchexec release

NewReleases is sending notifications on new releases.