Skip to content
/ go-fsex Public

Trigger command execution on file / directory changes.

License

Notifications You must be signed in to change notification settings

v-val/go-fsex

Repository files navigation

fsex

Execute [user-specified] command when update(s) detected in file system.

Name stands for "file system events" and "execute".

Usage

fsex [options] -f <file|directory> [-f ...] command [args ...]

E.g.

fsex -f . cmake --build ./build

or

fsex -f . bash -c 'cmake -S. -B./build && cmake --build ./build'

Motivation

Triggering command upon changes in file system is a pretty practical task. Example would be starting report generation when data uploaded to server.

See also

  • watchexec written in RUST, feature rich, no cons
  • entr written in C, likely doesn't work on Windows

Admitting superiority of listed competitors, we still make an effort to deliver similar solution in Golang.

TODO

Following improvements are planned:

  • Configurable time to trigger command after
  • Nicer output

About

Trigger command execution on file / directory changes.

Resources

License

Stars

Watchers

Forks

Languages