Skip to content
Branch: devel
Go to file

Latest commit


Failed to load latest commit information.
Latest commit message
Commit time

Logo of the project


Simple file watcher

Eye watches file pattern regex and executes a command on changes.


With an .eyerc file present.


With command line arguments.

eye [-R] -p <regex_pattern> -c <command>

Eye will search for an .eyerc file in current directory or in the home directory. If present it will load the settings. Any command line parameters will override the resource file settings.

Example Usage

eye -r -p '\.go$' -c 'go build'

Watch files in current directory with extension .go and execute go build on changes:

To use for Golang development the can be used as command.

Copy to your Golang project directory and change it to suit your needs. Then issue the command:

eye -p '\.go$' -c './ -i 500'

Eye will watch all Go files in current directory and below for changes every half second. If any matching files changes the script will be executed. The script will build, lint, vet, and look for TODOs in the project. Flags:

  • -h | --help - print usage information.
  • -p <regex_pattern> - matching pattern for files to watch, mandatory.
  • -c <command> - the command to execute on changes, mandatory.
  • -R - do not recurse sub directories, optional.
  • `-i - number of milli seconds to wait between checks, default value 1000 ms (1 s).

Resource file

Resource file format is simple, just a : separated list of key and value. Lines starting with ! is considered to be comments and empty lines are ignored.

Example resource file with all possible settings:

! Eye resource file
pattern: \.go$
command: go test ./...
recursive: true
interval-millis: 500


git clone
cd eye
go install


The code in this project is licensed under GPLv3 license.


A simple file watcher that executes command on change




No releases published
You can’t perform that action at this time.