Show HN: FlowHook – a file watcher that knows if your build passed or failed
2 points - today at 4:57 PM
FlowHook is a CLI tool that watches your files and executes given commands, similar to watchexec. But I believe it has three things that differentiate it from existing tools.
It persists your configuration. If you set up flowhook instance in your folder and add the necessary commands you only need to run `flowhook run` to start watching anytime.
It logs your build output plus other info (timestamp, exit code, etc.) to a JSON log file inside your project. Use cases include analyzing build history, debugging, etc. Personally I'm excited about this one. This was even the thing that convinced me to take this project seriously. Tools that analyze your success/failure ratio, most common time of build failures, and similar patterns could be built on top of this using the JSON data.
Third it lets you hook on-success and on-failure commands. These are separate commands that run based on the exit code of your base command. Use cases include running a test suite on success, a desktop notification on failure, committing to git on success, kicking off an agent to analyze the error on failure, etc.
TL;DR : FlowHook is a CLI tool that watches your file and execute given commands(like watchexec), but it also allows you to hook on-success and on-failure commands. It also logs your build output to a JSON log file in your project directory.
Excited about where this can go and would love your feedback.
Source