{"id":15386691,"url":"https://github.com/zerodevx/findx-cli","last_synced_at":"2026-04-27T12:04:48.721Z","repository":{"id":57236414,"uuid":"465747655","full_name":"zerodevx/findx-cli","owner":"zerodevx","description":"CLI to find and execute command for every glob match","archived":false,"fork":false,"pushed_at":"2023-01-22T16:11:19.000Z","size":179,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-27T22:48:35.480Z","etag":null,"topics":["cli","command","exec","find","foreach","node"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zerodevx.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}},"created_at":"2022-03-03T14:14:55.000Z","updated_at":"2023-02-13T17:56:27.000Z","dependencies_parsed_at":"2023-02-12T17:00:17.908Z","dependency_job_id":null,"html_url":"https://github.com/zerodevx/findx-cli","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"purl":"pkg:github/zerodevx/findx-cli","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodevx%2Ffindx-cli","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodevx%2Ffindx-cli/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodevx%2Ffindx-cli/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodevx%2Ffindx-cli/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zerodevx","download_url":"https://codeload.github.com/zerodevx/findx-cli/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zerodevx%2Ffindx-cli/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32335331,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-26T23:26:28.701Z","status":"online","status_checked_at":"2026-04-27T02:00:06.769Z","response_time":128,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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","command","exec","find","foreach","node"],"created_at":"2024-10-01T14:50:11.007Z","updated_at":"2026-04-27T12:04:48.696Z","avatar_url":"https://github.com/zerodevx.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# findx-cli\n\n\u003e CLI to find and execute command for every glob match\n\nElegant replacement for [`each-cli`](https://www.npmjs.com/package/each-cli),\n[`foreach-cli`](https://www.npmjs.com/package/foreach-cli) and \\*nix\n[`find -exec`](https://man7.org/linux/man-pages/man1/find.1.html) command in\nvery little lines of\n[code](https://github.com/zerodevx/findx-cli/blob/main/cli.js). Useful for NPM\nscripts or CI.\n\n- [x] Cross-platform\n- [x] Concurrency support\n- [x] Continue on error, then exit with code 1\n- [x] Control output of every execution\n- [x] Automatically show task progress in TTY\n\n## Install\n\n```\n$ npm i -g findx-cli\n```\n\n## Usage\n\n```\n$ findx '**/*.jpg' -- convert {{path}} {{dir}}/{{name}}.png\n```\n\nThis searches for all files matching the glob pattern, then runs the provided\ncommand against each match.\n\nSee below for more usage [examples](#examples).\n\n## Options\n\n```\nUsage: findx \u003cglobs\u003e [options] -- [commands...]\n\nCLI to find and execute command for every glob match\n\nArguments:\n  globs                   globs to match\n  commands                commands to execute\n\nOptions:\n  -C, --concurrent \u003cmax\u003e  concurrent number of executions (default: 10)\n  --log \u003clevel\u003e           log level (choices: \"stdout\", \"stderr\", \"all\",\n                          \"none\", default: \"all\")\n  --sh                    run each execution in new shell\n  --cd                    change to path directory for each run\n  -V, --version           output the version number\n  -h, --help              display help for command\n```\n\n## Command Templating\n\nWrite your command using [mustache](https://github.com/janl/mustache.js/)\nsyntax. The following tags are exposed:\n\n| Tag        | Eg                      | Desc                     |\n| ---------- | ----------------------- | ------------------------ |\n| `{{path}}` | /home/user/dir/file.txt | Full path of file        |\n| `{{root}}` | /                       | Root                     |\n| `{{dir}}`  | /home/user/dir          | Directory portion        |\n| `{{base}}` | file.txt                | File name with extension |\n| `{{name}}` | file                    | Name portion             |\n| `{{ext}}`  | .txt                    | Extension portion        |\n\n## Examples\n\n#### Untar each tar file in its own directory\n\n```\n$ findx '**/*.tar' --cd -- tar -xvf {{base}}\n```\n\n#### Ignore some files and run shell-specific commands\n\n```\n$ findx '**/LICENSE !ignored/**' --sh -- 'cd {{dir}} \u0026\u0026 cat LICENSE'\n```\n\n#### Dry-run glob matches\n\n```\n$ findx '**/*.{txt,xml}'\n```\n\n## Development\n\nStandard Github\n[contribution workflow](https://github.com/firstcontributions/first-contributions)\napplies.\n\n#### Tests\n\nTest specs are in `test/spec.js`. To run the tests:\n\n```\n$ npm run test\n```\n\n## License\n\nISC\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerodevx%2Ffindx-cli","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzerodevx%2Ffindx-cli","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzerodevx%2Ffindx-cli/lists"}