{"id":17992794,"url":"https://github.com/leostera/watch","last_synced_at":"2025-10-06T20:49:57.689Z","repository":{"id":141535030,"uuid":"60414588","full_name":"leostera/watch","owner":"leostera","description":":watch: A portable Go alternative to GNU's watch – very useful for autorunning things!","archived":false,"fork":false,"pushed_at":"2016-07-09T08:14:38.000Z","size":89,"stargazers_count":19,"open_issues_count":2,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-05-27T07:56:47.955Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","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/leostera.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}},"created_at":"2016-06-04T14:38:29.000Z","updated_at":"2023-09-08T17:11:09.000Z","dependencies_parsed_at":"2023-08-15T23:51:50.174Z","dependency_job_id":"dcac5504-d6f0-4332-9f29-c9db875ea815","html_url":"https://github.com/leostera/watch","commit_stats":null,"previous_names":["leostera/watch","ostera/watch"],"tags_count":8,"template":false,"template_full_name":null,"purl":"pkg:github/leostera/watch","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fwatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fwatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fwatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fwatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leostera","download_url":"https://codeload.github.com/leostera/watch/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leostera%2Fwatch/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278678423,"owners_count":26027049,"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","status":"online","status_checked_at":"2025-10-06T02:00:05.630Z","response_time":65,"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":[],"created_at":"2024-10-29T20:09:16.289Z","updated_at":"2025-10-06T20:49:57.658Z","avatar_url":"https://github.com/leostera.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# watch [![Travis-CI](https://api.travis-ci.org/ostera/watch.svg)](https://travis-ci.org/ostera/watch)\n⌚ A portable Go alternative to GNU's watch – very useful for autorunning things!\n\n## Installation\n\nGet your preferred binary flavour from the [releases page](https://github.com/ostera/watch/releases).\n\nOr if you have a go environment:\n\n```\ngo get github.com/ostera/watch\n\nbrew install https://raw.githubusercontent.com/ostera/homebrew-core/master/Formula/go-watch.rb\n```\n\nFrom source just run `make` and put the `watch` executable somewhere handy.\n\n## Usage\n\n```\n~ λ watch\n\n   Usage: watch [options] \u003ccmd\u003e\n\n   Sample: watch -i=100ms make\n\n   Options:\n\n     -c, --clear                clear screen between command runs\n     -i, --interval             interval in seconds or ms, defaulting to 1s\n     -x, --exit                 exit on failure\n\n     -h, --help                 this help page\n     -v, --version              print out version\n\n```\n\n## Motivation\n\nThe main pain point was re-running tests/builds, choosing to clear the screen or not,\nand having UNICODE/Emoji support.\n\nI started off using OS X's watch, and eventually moving to GNU's watch. Unfortunately\nneither has sub-second resolution, nor work with Emojis.\n\nSo I ended up moving to Visionmedia's watch. Now this last one doesn't clear the screen.\n\nThe middleground was a small, poor-man's watch, written in a few lines of bash:\n\n```bash\nfunction ww {\n  readonly OUTPUT_FILE=\"/var/tmp/ww_files/$(pwd | sed 's / _ g')-$1\"\n  while true; do\n    eval $* \u003e $OUTPUT_FILE;\n    clear;\n    cat $OUTPUT_FILE;\n    sleep 1;\n  done\n}\n```\n\nHacky, but it worked pretty well! Now it was about time I wrote it in a way that\nwas easy to install, share, test, port, and contribute to :)\n\n## Contributing\n\nBuild once, then use `./watch` to continuously build itself:\n\n```\nrepos/watch λ ./watch make\n/usr/local/bin/go vet\n/usr/local/bin/go fmt\n/usr/local/bin/go build -o ./watch\n/usr/local/bin/go test\nPASS\nok      _/Users/leostera/repos/watch    0.013s\n/usr/local/bin/go test -bench .\nPASS\nBenchmarkRunSuccessfully-4           500           3335180 ns/op\nBenchmarkRunExit-4                   500           3356888 ns/op\nok      _/Users/leostera/repos/watch    4.028s\nexit: 0\n\n/usr/local/bin/go vet\n/usr/local/bin/go fmt\n/usr/local/bin/go build -o ./watch\n# ...output continues here!\n```\n\n## Next Steps\n\nSee the [issues page](https://github.com/ostera/watch/issues?q=is%3Aopen+is%3Aissue+label%3Aenhancement) for a list of planned enhancements and features.\n\n## License\n\nSee [LICENSE](https://github.com/ostera/watch/blob/master/LICENSE).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fwatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleostera%2Fwatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleostera%2Fwatch/lists"}