BeyramTaglietti / kojin

File tree watcher

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Kojin

Description

File tree watcher built using Golang

With Kojin you can watch a file tree for changes and execute a command when a change is detected

How does it work

Given the folder to watch, Kojin builds a tree structure of the entire folder with its files and subfolders and then, on each iteration which can happen every chosen interval, it compares the two structures. If a change is detected, the command specified will run

Why I built Kojin

When trying out a new programming language, I usually start by solving some Leetcodes or Advent of code problems to get a grip of the basic syntax.

Then, when trying out Gleam, I couldn't stand having to run the same commmand every time I made a change, so I decided to build a general purpose tool that I could use to have a live reload

Example of usage (with Gleam)

command

./kojin ./src "gleam run" --frequency 200 # run every 200 milliseconds and ignore the build folder/s

command structure

./kojin [folder_to_watch] [command_to_run] ...[additional flags] # use ./kojin --help for more info

About

File tree watcher


Languages

Language:Go 100.0%