{"id":23714210,"url":"https://github.com/jessekelighine/whenever","last_synced_at":"2026-02-08T20:30:15.981Z","repository":{"id":213220534,"uuid":"698131678","full_name":"jessekelighine/whenever","owner":"jessekelighine","description":"whenever: run a command whenever a file/directory is changed","archived":false,"fork":false,"pushed_at":"2024-02-28T05:58:02.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T20:18:19.870Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/jessekelighine.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","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":"2023-09-29T08:21:42.000Z","updated_at":"2023-09-29T08:32:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"8465a2ed-22ac-459b-8c1e-3aacff3fd3e1","html_url":"https://github.com/jessekelighine/whenever","commit_stats":null,"previous_names":["jessekelighine/whenever"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessekelighine%2Fwhenever","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessekelighine%2Fwhenever/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessekelighine%2Fwhenever/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jessekelighine%2Fwhenever/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jessekelighine","download_url":"https://codeload.github.com/jessekelighine/whenever/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":239800483,"owners_count":19699127,"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-12-30T20:18:18.159Z","updated_at":"2026-02-08T20:30:15.870Z","avatar_url":"https://github.com/jessekelighine.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# whenever: run a command whenever a file/directory is changed\n\n`whenever` is a simple terminal utility that lets you run a command whenever a file or directory is changed.\n`whenever` is implemented in about 50 lines of bash script.\n\n## Installation\n\nEverything is self-contained in the bash script `whenever.sh`.\nDownload the script `whenever.sh` and make a link using\n```sh\nln -si path/to/whenever.sh /usr/local/bin/whenever\n```\nwhere `path/to/whenever.sh` is the path to the downloaded script.\n\n## Usage\n\n```\nusage: whenever [file|dir] [command]\ndescription: run [command] whenever [file|dir] is modified.\n```\n\nFor example, the following command will echo `Hello` whenever `file.txt` is modified:\n```sh\nwhenever file.txt echo \"Hello\"\n```\n`whenever` will display a message and keep count on the times `[file]` is modified and `[command]` is run.\n\nAnother more useful example is to compile a $\\mathrm{\\LaTeX}$ file whenever a file in the same directory,\nusually different sections of the $\\mathrm{\\LaTeX}$ document,\nis changed.\nSay you have a directory `paper/` that looks like this:\n```\npaper\n├── main.tex\n├── section-appdix.tex\n├── section-discussion.tex\n├── section-into.tex\n└── settings.sty\n```\nIn this case, when you are in directory `paper/`, you can use\n```sh\nwhenever . pdflatex main.tex\n```\nso that you don't have to manually compile whenever you change one of the \"section\" files.\n\n## Settings\n\nHere are some variables that can be customized:\n\n- `WHENEVER_COMMAND`: The command used to check whether files are modified. (default: `md5sum`)\n- `WHENEVER_INTERVAL`: Time interval (in second) between checks. (default: `1`, i.e., check for changes once every second)\n\n## License\n\nLicense: GPL-3\u003c/br\u003e\nCopyright 2024 Jesse C. Chen\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessekelighine%2Fwhenever","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjessekelighine%2Fwhenever","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjessekelighine%2Fwhenever/lists"}