{"id":13437084,"url":"https://github.com/cristianoliveira/funzzy","last_synced_at":"2025-05-15T08:08:48.008Z","repository":{"id":43602702,"uuid":"54419579","full_name":"cristianoliveira/funzzy","owner":"cristianoliveira","description":"A lightweight blazingly fast file watcher.","archived":false,"fork":false,"pushed_at":"2025-04-14T15:15:15.000Z","size":576,"stargazers_count":274,"open_issues_count":14,"forks_count":11,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-14T18:18:41.473Z","etag":null,"topics":["cli","cool","developer-tools","dx","linter","rust","tools","unit-testing","unix","unix-shell","watch","watcher","yaml"],"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/cristianoliveira.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-03-21T20:15:36.000Z","updated_at":"2025-04-14T15:15:19.000Z","dependencies_parsed_at":"2022-09-10T16:32:31.597Z","dependency_job_id":"8ca10ede-53a5-4d9f-a565-c444684d6c04","html_url":"https://github.com/cristianoliveira/funzzy","commit_stats":{"total_commits":144,"total_committers":6,"mean_commits":24.0,"dds":0.08333333333333337,"last_synced_commit":"bc49658bf938f8ab9505c9de7d675e70e0b45d53"},"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Ffunzzy","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Ffunzzy/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Ffunzzy/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cristianoliveira%2Ffunzzy/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cristianoliveira","download_url":"https://codeload.github.com/cristianoliveira/funzzy/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248933350,"owners_count":21185461,"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":["cli","cool","developer-tools","dx","linter","rust","tools","unit-testing","unix","unix-shell","watch","watcher","yaml"],"created_at":"2024-07-31T03:00:54.219Z","updated_at":"2025-05-15T08:08:47.996Z","avatar_url":"https://github.com/cristianoliveira.png","language":"Rust","funding_links":[],"categories":["应用","Applications","Rust","Applications written in Rust","Alternatives to `watch`","应用 Applications","应用程序 Applications"],"sub_categories":["System tools","系统工具 System tools","系统工具"],"readme":"# funzzy (fzz) [![Crate version](https://img.shields.io/crates/v/funzzy.svg?)](https://crates.io/crates/funzzy) [![Building package with nix](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push-nixbuild.yml/badge.svg)](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push-nixbuild.yml) [![CI integration tests](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push-integration-test.yml/badge.svg)](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push-integration-test.yml) [![CI Checks](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push.yml/badge.svg)](https://github.com/cristianoliveira/funzzy/actions/workflows/on-push.yml)\n\nA lightweight blazingly fast file watcher inspired by [antr](https://github.com/juanibiapina/antr) and [entr](https://github.com/eradman/entr). See also: [funzzy.nvim](https://github.com/cristianoliveira/funzzy.nvim)\n\nConfigure auto-execution of different commands using semantic YAML and [Unix shell style pattern match](https://en.wikipedia.org/wiki/Glob_(programming)) or stdin.\n\nFor a workflow as simple as:\n```bash\nfind . -name '*.ts' | funzzy 'npx eslint .'\n```\n\nOr more complex workflows like:\n```yaml\n# .watch.yaml (or .watch.yml)\n# list here all the events and the commands that it should execute\n# TIP: include '.watch.yaml' in your .git/info/exclude to ignore it.\n# TIP2: List the tasks/steps from quicker to slower for better workflows\n# \n# Run: `fzz --fail-fast --non-block` (`fzz -nb`) to start this workflow (min: v1.4.0)\n\n- name: run my tests\n  run: make test\n  change: \"tests/**\"\n  ignore: \"tests/integration/**\"\n  run_on_init: true\n\n- name: Starwars ascii art\n  run: telnet towel.blinkenlights.nl\n  change: \n    - \"/tmp/starwars.txt\"\n    - \".watch.yaml\"\n\n# Command path templates for custom scripts\n- name: run test \u0026 linter for a single file\n  run: \n   - \"npm run lint -- {{relative_path}}\",\n   - \"npm test -- $(echo '{{absolute_path}}' | sed -r s/.(j|t)sx?//)\"\n  change: [\"src/**\", \"libs/**\"]\n  ignore: [\"src/**/*.stories.*\", \"libs/**/*.log\"]\n\n- name: run ci checks @quick @ci\n  run: | ## Watch with `fzz -t @ci`\n   cat .github/workflows/on-push.yml \\\n    | yq '.jobs | .[] | .steps | .[] | .run | select(. != null)' \\\n    | xargs -I {} bash -c {}\n  change: \"src/**\"\n  run_on_init: true\n\n- name: finally stage the changed files in git\n  run:\n    - git add {{relative_path}}\n    - git commit \n  change: \n    - \"src/**\"\n    - \"tests/**\"\n  ignore: \"**/*.log\"\n```\n\nSee more:\n\n - [Documentation](/docs/USAGE.md)\n - [Check our workflow in funzzy](https://github.com/cristianoliveira/funzzy/blob/master/.watch.yaml#L6) :)\n - [Check the examples folder](https://github.com/cristianoliveira/funzzy/tree/master/examples)\n\n### Enhance your workflows\n\nFunzzy pairs well with these tools:\n\n - [yq](https://github.com/mikefarah/yq) - A yaml querier similar to `jq` to extract commands from GitHub Actions!\n   \n - [nrr](https://github.com/ryanccn/nrr) - For JS/TS projects, since Funzzy runs commands on change, a faster task runner makes a difference\n\n## Motivation\n\nTo create a lightweight watcher that **allows me to set up personal local workflows with specific automated checks and steps, similar to GitHub Actions**. \nFunzzy was built with Rust, which makes it blazingly fast and light.\n\n## Installing\n\n### OSX:\n\n```bash\nbrew install funzzy\n```\n\n[Latest release](https://github.com/cristianoliveira/funzzy/releases):\n```bash\nbrew install cristianoliveira/tap/funzzy\n```\n\n### Linux:\n\n```bash\ncurl -s https://raw.githubusercontent.com/cristianoliveira/funzzy/master/linux-install.sh | sh\n```\n\nYou can specify the versions:\n```bash\ncurl -s https://raw.githubusercontent.com/cristianoliveira/funzzy/master/linux-install.sh | bash - 1.0.0\n```\n\n### Nix\n  \n```bash\nnix-env -iA nixpkgs.funzzy\n```\n\n[Latest release](https://github.com/cristianoliveira/funzzy/releases):\n```bash\nnix profile install 'github:cristianoliveira/funzzy'\n# or\nnix profile install 'github:cristianoliveira/nixpkgs#funzzy'\n```\n\nInstall nightly version:\n```bash\nnix profile install 'github:cristianoliveira/funzzy#nightly'\n```\n\nor, if you use `shell.nix`:\n  \n  ```nix\n{ pkgs ? import \u003cnixpkgs\u003e {} }:\n  pkgs.mkShell {\n    buildInputs = [\n      pkgs.funzzy\n    ];\n  };\n```\n\n### With Cargo\n\n```bash\ncargo install funzzy\n```\n\n\\*Make sure you have `$HOME/.cargo/bin` in your PATH\n`export PATH=$HOME/.cargo/bin:$PATH`\n\n- From source\n\nMake sure you have installed the following dependencies:\n\n- Rust\n- Cargo\n\nExecute:\n```\ncargo install --git https://github.com/cristianoliveira/funzzy.git\n```\n\nOr, clone this repo and run:\n\n```bash\nmake install\n```\n\n## Running\n\nInitializing with boilerplate:\n\n```bash\nfunzzy init\n```\n\nChange the config file `.watch.yaml` as you want. Then run:\n\n```bash\nfunzzy\n# or use the short version\nfzz\n```\n\n### Options\n\nCheck all the options with `fzz --help`\n\nUse a different config file:\n\n```bash\nfzz -c ~/watch.yaml\n```\n\nFail fast which bails the execution if any task fails. Useful for workflows that\ndepend on all task to be successful. [See its usage in our workflow](https://github.com/cristianoliveira/funzzy/blob/master/.watch.yaml#L6)\n\n```bash\nfzz --fail-fast # or fzz -b (bail)\n```\n\nFiltering tasks by target. (**EXPERIMENTAL**)\n\n```bash\nfzz -t \"@quick\"\n# Assuming you have one or more tasks with `@quick` in the name, it will only load those tasks\n```\n\nRun with some arbitrary command and stdin\n\n```bash\nfind . -name '*.rs' | fzz 'cargo build'\n```\n\nTemplates for composing commands\n\n```bash\nfind . -name '*.[jt]s' | fzz 'npx eslint {{filepath}}'\n```\n\nRun in \"non-block\" mode, which cancels the currently running task when there are new change events from files.\nIt's super useful when a workflow contains long-running tasks. [See more in long task test](https://github.com/cristianoliveira/funzzy/blob/master/tests/watching_with_non_block_flag.rs#L7)\n\n```bash\nfzz --non-block # or fzz -n\n```\n\n## Troubleshooting\n\n#### Why the watcher is running the same task multiple times?\n\nThis might be due to different causes, the most common issue when using VIM is because of its default backup setting\nwhich causes changes to multiple files on save. (See [Why does Vim save files with a ~ extension?](https://stackoverflow.com/questions/607435/why-does-vim-save-files-with-a-extension/607474#607474)).\nFor such cases either disable the backup or [ignore them in your watch rules](https://github.com/cristianoliveira/funzzy/blob/master/examples/tasks-with-long-running-commands.yaml#L5).\n\nFor other cases use the verbose `fzz -V | grep 'Triggered by'` to understand what is triggering a task to be executed.\n\n## Automated tests\n\nRunning unit tests:\n\n```bash\ncargo test\n```\n\nor simple `make tests`\n\nRunning integration tests:\n\n```\nmake integration\n```\n\n## Code Style\n\nWe use `rustfmt` to format the code. To format the code run:\n\n```bash\ncargo fmt\n```\n\n## Contributing\n\n- Fork it!\n- Create your feature branch: `git checkout -b my-new-feature`\n- Commit your changes: `git commit -am 'Add some feature'`\n- Push to the branch: `git push origin my-new-feature`\n- Submit a pull request\n\n### Want to help?\n\n - Open pull requests\n - Create Issues\n - Report bugs\n - Suggest new features or enhancements\n\nAny help is appreciated!\n\n**Pull Request should have unit tests**\n\n# License\n\nThis project was made under MIT License.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristianoliveira%2Ffunzzy","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcristianoliveira%2Ffunzzy","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcristianoliveira%2Ffunzzy/lists"}