{"id":13507927,"url":"https://github.com/slashmili/ex_guard","last_synced_at":"2025-12-30T00:43:42.659Z","repository":{"id":5902025,"uuid":"53902177","full_name":"slashmili/ex_guard","owner":"slashmili","description":"ExGuard is a mix command to handle events on file system modifications","archived":false,"fork":false,"pushed_at":"2024-07-08T16:15:30.000Z","size":590,"stargazers_count":84,"open_issues_count":1,"forks_count":10,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-26T21:44:45.873Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://hex.pm/packages/ex_guard","language":"Elixir","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/slashmili.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}},"created_at":"2016-03-15T00:34:13.000Z","updated_at":"2024-05-09T09:03:44.000Z","dependencies_parsed_at":"2024-01-05T21:55:25.659Z","dependency_job_id":"4861e601-56e9-47b1-8988-b790175e85e4","html_url":"https://github.com/slashmili/ex_guard","commit_stats":{"total_commits":101,"total_committers":10,"mean_commits":10.1,"dds":"0.48514851485148514","last_synced_commit":"9e113386c95d36c7d795e348a1fa3e32db4f11df"},"previous_names":[],"tags_count":6,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmili%2Fex_guard","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmili%2Fex_guard/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmili%2Fex_guard/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/slashmili%2Fex_guard/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/slashmili","download_url":"https://codeload.github.com/slashmili/ex_guard/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246301963,"owners_count":20755512,"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":[],"created_at":"2024-08-01T02:00:43.501Z","updated_at":"2025-12-30T00:43:42.586Z","avatar_url":"https://github.com/slashmili.png","language":"Elixir","funding_links":[],"categories":["Files and Directories"],"sub_categories":[],"readme":"# ExGuard\n\nExGuard is a mix command to handle events on file system modifications, ExGuard heavily borrowed ideas/art works from [Ruby Guard](https://github.com/guard/guard)\n\n![ExGuard](https://github.com/slashmili/ex_guard/raw/master/logo.png)\n\n\n[![Build Status](https://github.com/slashmili/ex_guard/actions/workflows/test.yml/badge.svg)](https://github.com/slashmili/ex_guard/actions)\n[![Hex.pm](https://img.shields.io/hexpm/v/ex_guard.svg)](https://hex.pm/packages/ex_guard)\n[![Docs](https://img.shields.io/badge/docs-latest-brightgreen.svg?style=flat)](https://hexdocs.pm/ex_guard/)\n[![Hex.pm](https://img.shields.io/hexpm/dt/ex_guard.svg)](https://hex.pm/packages/ex_guard)\n[![Deps Status](https://beta.hexfaktor.org/badge/all/github/slashmili/ex_guard.svg)](https://beta.hexfaktor.org/github/slashmili/ex_guard)\n[![Hex.pm](https://img.shields.io/hexpm/l/ex_guard.svg)]()\n\n\n## Usage\n\n1. Add `ex_guard` to your list of dependencies in `mix.exs`:\n\n    ```elixir\n    def deps do\n      [{:ex_guard, \"~\u003e 1.5\", only: :dev}]\n    end\n    ```\n\n2. Create a file named `.exguard.exs` in your root application directory:\n\n    ```elixir\n    use ExGuard.Config\n\n    guard(\"unit-test\", run_on_start: true)\n    |\u003e command(\"mix test --color\")\n    |\u003e watch(~r{\\.(erl|ex|exs|eex|xrl|yrl)\\z}i)\n    |\u003e ignore(~r{deps})\n    |\u003e notification(:auto)\n    ```\n\n    Look at below sample file for more fine-grained config.\n\n3. Run `mix guard` as soon as you change any file with above pattern, the test gets executed\n\n## Notification\n\nCurrently supports notification with tools:\n\n* [Terminal Title](http://tldp.org/HOWTO/Xterm-Title-3.html) (Xterm)\n* [TMux](http://tmux.github.io/) (Universal)\n* [Terminal Notifier](https://github.com/julienXX/terminal-notifier) (mac only)\n* [Notify Send](http://ss64.com/bash/notify-send.html) (linux distros)\n\nIn order to _ExGuard_ sends notification, you need to make sure these tools are setup properly.\n\nIf you are using _ExGuard_ mainly for Elixir test you may turn the notification off and use [ExUnit Notifier](https://github.com/navinpeiris/ex_unit_notifier) instead.\n\n## Why ExGuard and not mix-test.watch or eye_drops or XYZ\n\nIt's just a matter of taste!\n\nWith _ExGuard_ you can run multiple commands and the config looks nice.\n\n```elixir\nuse ExGuard.Config\n\nguard(\"elixir test\", run_on_start: true)\n|\u003e command(\"mix test --color\")\n#only run related phoenix test when a file changes\n|\u003e watch({~r{lib/(?\u003clib_dir\u003e.+_web)/(?\u003cdir\u003e.+)/(?\u003cfile\u003e.+).ex$}i, fn m -\u003e \"test/#{m[\"lib_dir\"]}/#{m[\"dir\"]}/#{m[\"file\"]}_test.exs\" end})\n# only if the above pattern doesn't match try to match all elixir/erlang source \n|\u003e watch(~r{\\.(erl|ex|exs|eex|xrl|yrl)\\z}i)\n|\u003e ignore(~r{deps})\n|\u003e notification(:off) #Disabled it and using ex_unit_notifier instead\n\nguard(\"elm test\", run_on_start: true)\n|\u003e command(\"elm-test assets/tests/\")\n|\u003e watch(~r{\\.(elm)\\z}i)\n|\u003e ignore(~r{elm-stuff})\n|\u003e notification(:auto)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashmili%2Fex_guard","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fslashmili%2Fex_guard","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fslashmili%2Fex_guard/lists"}