guardian v0.0.5

Guardian watches over your files and run assigned tasks.
  • v0.0.5 - October 17, 2018
  • v0.0.4 - March 27, 2017
  • v0.0.3 - January 3, 2016
  • v0.0.2 - January 1, 2016
  • v0.0.1 - January 1, 2016


Guardian watches over your files and runs assigned tasks.




brew tap f/guardian
brew install guardian

Arch Linux

Guardian is availabe as a package from the Arch User Repository called guardian-git

From Source

git clone && cd guardian
crystal build src/ --release


Crystal Libs

Guardian works seamless with Crystal Projects. It automatically binds itself to library you use.

$ crystal init lib yourlib
$ cd yourlib
$ guardian --init
Created guardian.yml of ./src/

Non-Crystal Libs

You can use Guardian for other projects.

$ guardian --init
Created guardian.yml


$ guardian --init

It will create a guardian.yml file to use by Guardian.


guardian.yml is a simple YAML file.

Simply it has YAML documents with seperated by --- line and each document has files and run keys.

files key needs a glob pattern, and run is a shell command what to run.

files: ./**/*.cr
run: crystal build ./src/
files: ./shard.yml
run: shards install

%file% Variable

Guardian replaces %file% variable in commands with the changed file.

files: ./**/*.txt
run: echo "%file% is changed"

Think you have a hello.txt in your directory, and Guardian will run echo "hello.txt is changed" command when it's changed.

Running Guardian

$ guardian
💂 Guardian is on duty!


  1. Fork it ( )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request


  • f Fatih Kadir Akın - creator, maintainer
github statistic
  • 252
  • 0
  • 20
  • 10
  • 8 days ago
  • January 1, 2016

MIT License

Synced at

Fri, 03 Apr 2020 07:48:54 GMT