{"id":13691452,"url":"https://github.com/f/guardian","last_synced_at":"2025-04-06T16:12:40.730Z","repository":{"id":3254663,"uuid":"48879239","full_name":"f/guardian","owner":"f","description":"Guardian watches over your files and run assigned tasks.","archived":false,"fork":false,"pushed_at":"2023-12-05T13:17:15.000Z","size":844,"stargazers_count":276,"open_issues_count":10,"forks_count":22,"subscribers_count":8,"default_branch":"master","last_synced_at":"2025-03-30T14:11:12.552Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://f.github.io/guardian","language":"Crystal","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/f.png","metadata":{"files":{"readme":"README.md","changelog":null,"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-01-01T13:50:45.000Z","updated_at":"2025-03-26T21:35:44.000Z","dependencies_parsed_at":"2024-12-16T09:23:23.764Z","dependency_job_id":"0cd4aeee-905a-4356-82d4-f57d94cbc8b3","html_url":"https://github.com/f/guardian","commit_stats":{"total_commits":40,"total_committers":17,"mean_commits":"2.3529411764705883","dds":0.8,"last_synced_commit":"8c1f129b829c470391b1c32df9af9fc156982063"},"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fguardian","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fguardian/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fguardian/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/f%2Fguardian/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/f","download_url":"https://codeload.github.com/f/guardian/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247509235,"owners_count":20950232,"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-02T17:00:45.288Z","updated_at":"2025-04-06T16:12:40.708Z","avatar_url":"https://github.com/f.png","language":"Crystal","funding_links":[],"categories":["Crystal","Development Tools"],"sub_categories":[],"readme":"# 💂 Guardian.cr\n\nGuardian watches over your files and runs assigned tasks.\n\n![Guardian](http://i.imgur.com/mUzv2DL.gif)\n\n## Installation\n\n### OS X\n\n```bash\nbrew tap f/guardian\nbrew install guardian\n```\n\n### Arch Linux\n\nGuardian is availabe as a package from the Arch User Repository \ncalled [guardian-git](https://aur.archlinux.org/packages/guardian-git/)\n\n### From Source\n\n```bash\ngit clone https://github.com/f/guardian.git \u0026\u0026 cd guardian\ncrystal build src/guardian.cr --release\n```\n\n## Quickstart\n\n### Crystal Libs\n\nGuardian works seamless with Crystal Projects. It automatically binds itself to\nlibrary you use.\n\n```bash\n$ crystal init lib yourlib\n$ cd yourlib\n$ guardian --init\nCreated guardian.yml of ./src/yourlib.cr\n```\n\n### Non-Crystal Libs\n\nYou can use Guardian for other projects.\n\n```bash\n$ guardian --init\nCreated guardian.yml\n```\n\n## Usage\n\n```bash\n$ guardian --init\n```\n\nIt will create a `guardian.yml` file to use by Guardian.\n\n## `guardian.yml`\n\n`guardian.yml` is a simple YAML file.\n\nSimply it has **YAML documents** with seperated by `---` line and each document has\n`files` and `run` keys.\n\n`files` key needs a glob pattern, and `run` is a shell command what to run.\n\n```yaml\nfiles: ./**/*.cr\nrun: crystal build ./src/guardian.cr\n---\nfiles: ./shard.yml\nrun: shards install\n```\n\n### `%file%` Variable\n\nGuardian replaces `%file%` variable in commands with the changed file.\n\n```yaml\nfiles: ./**/*.txt\nrun: echo \"%file% is changed\"\n```\n\nThink you have a `hello.txt` in your directory, and Guardian will run `echo \"hello.txt is changed\"` command when it's changed.\n\n## Running Guardian\n\n```bash\n$ guardian\n💂 Guardian is on duty!\n```\n\n## Contributing\n\n1. Fork it ( https://github.com/f/guardian/fork )\n2. Create your feature branch (git checkout -b my-new-feature)\n3. Commit your changes (git commit -am 'Add some feature')\n4. Push to the branch (git push origin my-new-feature)\n5. Create a new Pull Request\n\n## Contributors\n\n- [f](https://github.com/f) Fatih Kadir Akın - creator, maintainer\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fguardian","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ff%2Fguardian","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ff%2Fguardian/lists"}