The summary is in the headline: entr is a command line tool that lets you run a arbitrary command every time you change any of a set of specified files. You pass it the list of files to watch on stdin, like this:

Source: entr: rerun your build when files change