{"id":14971398,"url":"https://github.com/justinrubek/async-watcher","last_synced_at":"2025-06-11T22:09:06.436Z","repository":{"id":183278628,"uuid":"658104524","full_name":"justinrubek/async-watcher","owner":"justinrubek","description":"A file notification library for tokio","archived":false,"fork":false,"pushed_at":"2024-05-17T01:27:27.000Z","size":83,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T23:54:58.015Z","etag":null,"topics":["async","file-watcher","flake","nix","nix-flake","rust"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/justinrubek.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2023-06-24T19:27:57.000Z","updated_at":"2025-03-25T10:19:27.000Z","dependencies_parsed_at":"2024-03-30T03:28:54.615Z","dependency_job_id":"ca03657c-9a9e-4f4a-a604-7966098392af","html_url":"https://github.com/justinrubek/async-watcher","commit_stats":null,"previous_names":["justinrubek/async-watcher"],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/justinrubek/async-watcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fasync-watcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fasync-watcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fasync-watcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fasync-watcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/justinrubek","download_url":"https://codeload.github.com/justinrubek/async-watcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/justinrubek%2Fasync-watcher/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259353136,"owners_count":22844749,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["async","file-watcher","flake","nix","nix-flake","rust"],"created_at":"2024-09-24T13:45:08.519Z","updated_at":"2025-06-11T22:09:06.413Z","avatar_url":"https://github.com/justinrubek.png","language":"Rust","funding_links":[],"categories":["Rust"],"sub_categories":[],"readme":"# async-watcher\n\n[\u003cimg alt=\"github\" src=\"https://img.shields.io/badge/github-justinrubek/async--watcher-8da0cb?style=for-the-badge\u0026labelColor=555555\u0026logo=github\" height=\"20\"\u003e](https://github.com/justinrubek/async-watcher)\n[\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/async-watcher.svg?style=for-the-badge\u0026color=fc8d62\u0026logo=rust\" height=\"20\"\u003e](https://crates.io/crates/async-watcher)\n[\u003cimg alt=\"docs.rs\" src=\"https://img.shields.io/badge/docs.rs-async--watcher-66c2a5?style=for-the-badge\u0026labelColor=555555\u0026logo=docs.rs\" height=\"20\"\u003e](https://docs.rs/async-watcher)\n\nThis is a small library that uses [notify](https://github.com/notify-rs/notify) to implement a file watcher that is debounced.\nThe debouncing helps ensure you don't get too many events on a single file leading to extra work.\nThe original use case of this was to watch a directory and rebuild when there are changes.\nWithout debouncing, a single file could trigger multiple rebuilds.\nInstead, `async-watcher` can be used to trigger events after a specific time threshold.\n\nNotify takes care of all of the work, but the debouncing traits weren't async.\n`async-watcher` leverages [async-trait](https://github.com/dtolnay/async-trait) to provide an async interface for creating watchers.\n\nSee the [examples](./examples) for usage.\n\n## cli\n\nIncluded is a command line application that can be used to execute a command when notified of changes.\nThe files to watch are specified with a glob pattern as the first argument.\nSubsequent arguments are the command to run and its arguments.\nThe program is exposed as a nix flake package called `awatch`.\n\nexample usage:\n```sh\nawatch './{crates,Cargo.toml,Cargo.lock}' echo \"crates modified\"\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fasync-watcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjustinrubek%2Fasync-watcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjustinrubek%2Fasync-watcher/lists"}