Arelo - a simple auto reload utility
Arelo executes the specified command and monitors the files under the target directory. When the file that matches the pattern has been modified, restart the command.
Features
- Simple command line interface without config file
- Monitoring file patterns are specified as glob
- globstar (; matches to zero or more directories) supported
- can match the no extention filename
- can match the hidden filename which starts with "."
- Safely terminate child processes
- Any command line tool can be executed
- not only go project
- can execute shell script
- No unnesesary servers
- no need to use local port unlike http server
Install
go install github.com/makiuchi-d/arelo@latestAlternatively, you can install it via Homebrew:
brew install areloOr, you can download the executable binaries from the release page.
To get a static-linked executable binary, build with CGOENABLED=0.
Quick start
Run this command in your Go project directory.
arelo -p '**/*.go' -i '**/.*' -i '**/*_test.go' -- go run .Usage
Usage: arelo [OPTION]... -- COMMAND
Run the COMMAND and restart when a file matches the pattern has been modified.
Options:
-d, --delay duration duration to delay the restart of the command (default 1s)
-f, --filter event filter file system event (CREATE|WRITE|REMOVE|RENAME|CHMOD)
-h, --help display this message
-i, --ignore glob ignore pathname glob pattern
-n, --no-stdin do not forward stdin to the command
-p, --pattern glob trigger pathname glob pattern (default "**")
--polling interval poll files at given interval instead of using fsnotify
-r, --restart restart the command on exit-t, --target path observation target path (default "./") -v, --verbose verbose output -V, --version display version
### Options
#### -t, --target path
Monitor file modifications under the `path` directory.
The subdirectories are also monitored unless they match to the ignore patterns.
This option can be set multiple times.
The default value is the current directory ("./").