fswatch
Version, currently master branch1 version
- master branchlatestJan 28, 2026
github.com/bcardiff/crystal-fswatch
No description declared in shard.yml.
19 stars
2 dependents
License: MIT
Installation
# Add this to your shard.yml
dependencies:
fswatch:
github: bcardiff/crystal-fswatch
branch: mastermaster is a branch, not a release, so this tracks it rather than pinning a version.
Then run:
shards installshard.yml
- Crystal
>= 1.0.0, < 2.0.0- License
- MIT
- Author
- Brian J. Cardiff <bcardiff@gmail.com>
Dependencies
Development Dependencies
- crystal_lib*github: crystal-lang/crystal_libdev
README
# crystal-fswatch
[fswatch](https://emcrisostomo.github.io/fswatch/) bindings for [Crystal](https://crystal-lang.org/)
## Installation
1. Add the dependency to your `shard.yml`:
```yaml
dependencies:
fswatch:
github: bcardiff/crystal-fswatch
```
2. Run `shards install`
## Usage
```crystal
require "fswatch"
FSWatch.watch "." do |event|
pp! event
end
sleep 10 # keep main fiber busy to prevent exiting
```
## Contributing
1. Fork it (<https://github.com/bcardiff/crystal-fswatch/fork>)
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
## Development
For docker there are a couple of images to test things in alpine and ubuntu with crystal and libfswatch installed.
```
% docker build -t cfsw-ubuntu -f docker/Dockerfile.ubuntu .
% docker run --rm -it -v $(pwd):/src -w /src cfsw-ubuntu /bin/sh
root@5be1b17d7eba:/src# crystal run playground/01_monitor_curdir.cr
root@5be1b17d7eba:/src# crystal spec
```
To build other platforms use `--platform linux/amd64`
```
% docker build -t cfsw-ubuntu -f docker/Dockerfile.ubuntu --platform linux/amd64 .
```
## Contributors
- [Brian J. Cardiff](https://github.com/bcardiff) - creator and maintainer
Documentation
Built from the current release. The first visit to a release nobody has asked for starts its build.
Links
This branch
- Branch
master- Seen
- Jan 28, 2026
- Crystal
>= 1.0.0, < 2.0.0- Indexed
- yes
Dependents
Repository
github.com/bcardiff/crystal-fswatch
Metadata
- Created
- Aug 12, 2026
- Updated
- Aug 12, 2026
- Synced
- Aug 12, 2026
- Versions
- 1