{"id":29128124,"url":"https://github.com/ditzdev/watchrun","last_synced_at":"2026-04-02T01:50:40.689Z","repository":{"id":301848298,"uuid":"1010470202","full_name":"DitzDev/WatchRun","owner":"DitzDev","description":"A modern, cross-platform CLI tool that monitors file changes and automatically executes commands.","archived":false,"fork":false,"pushed_at":"2025-06-29T06:26:41.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-29T07:29:24.755Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","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/DitzDev.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,"zenodo":null}},"created_at":"2025-06-29T06:17:45.000Z","updated_at":"2025-06-29T06:36:54.000Z","dependencies_parsed_at":"2025-06-29T07:39:55.574Z","dependency_job_id":null,"html_url":"https://github.com/DitzDev/WatchRun","commit_stats":null,"previous_names":["ditzdev/watchrun"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/DitzDev/WatchRun","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DitzDev%2FWatchRun","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DitzDev%2FWatchRun/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DitzDev%2FWatchRun/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DitzDev%2FWatchRun/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/DitzDev","download_url":"https://codeload.github.com/DitzDev/WatchRun/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/DitzDev%2FWatchRun/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262690484,"owners_count":23349168,"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":"2025-06-30T01:05:06.353Z","updated_at":"2025-10-30T10:14:35.835Z","avatar_url":"https://github.com/DitzDev.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# WatchRun\n\nA modern, cross-platform CLI tool that monitors file changes and automatically executes commands. Perfect for development workflows, build automation, and continuous testing.\n\n## Features\n\n- **Recursive Directory Monitoring** - Watch entire directory trees\n- **Smart File Filtering** - Monitor specific file extensions and patterns\n- **Multi-Command Execution** - Run multiple commands per trigger\n- **Colorful Terminal Output** - Modern, informative display with ANSI colors\n- **Configuration Files** - Save and load settings from `.watchrunrc`\n- **Cross-Platform** - Works on Linux, macOS, and Windows\n- **Daemon Mode** - Run in background as a service\n- **JSON Output** - Machine-readable output for integration\n- **Pattern Matching** - Include/exclude files with glob patterns\n- **Configurable Polling** - Adjust monitoring frequency\n\n## Quick Start\n\n### Build from Source\n\n```bash\ngit clone https://github.com/DitzDev/watchrun\ncd watchrun\nmake\n```\n\n### Basic Usage\n\n```bash\n# Watch C files and run make\n./watchrun -w src -e c,h -x \"make\"\n\n# Watch Python files with custom interval\n./watchrun -w . -e py -x \"python test.py\" -i 500\n\n# Multiple commands with patterns\n./watchrun -w src --include \"*.c\" --exclude \"*test*\" -x \"make\" -x \"./run_tests\"\n```\n\n## Command Line Options\n\n### Required Options\n- `-w, --watch PATH` - Directory to watch for changes\n- `-x, --exec CMD` - Command to execute on changes (can be used multiple times)\n\n### Optional Options\n- `-e, --ext EXT` - File extensions to watch (comma-separated)\n- `-i, --interval MS` - Polling interval in milliseconds (default: 1000)\n- `-c, --config FILE` - Configuration file path\n- `--include PATTERN` - Include files matching pattern\n- `--exclude PATTERN` - Exclude files matching pattern  \n- `--no-clear` - Don't clear screen before running commands\n- `--no-recursive` - Don't watch subdirectories\n- `--daemon` - Run as daemon process\n- `--json` - Output in JSON format\n- `--verbose` - Verbose output\n- `--quiet` - Suppress banner and info messages\n- `--save-config` - Save current configuration to file\n- `-h, --help` - Show help message\n- `-v, --version` - Show version information\n\n## 🔧 Configuration File\n\nCreate a `.watchrunrc` file to save your settings:\n\n```ini\n# watchrun configuration file\nwatch_path=src\nextensions=c,h,cpp,hpp\ncommands=make,./run_tests\ninterval=1000\ninclude_patterns=*.c,*.h\nexclude_patterns=*test*,*tmp*\nrecursive=true\nverbose=false\nquiet=false\ndaemon=false\njson_output=false\nno_clear=false\n```\n\n### Using Configuration Files\n\n```bash\n# Load config file\n./watchrun -c ~/.watchrunrc\n\n# Save current settings to config\n./watchrun -w src -e c,h -x \"make\" --save-config -c .watchrunrc\n```\n\n## Usage Examples\n\n### Development Workflow\n\n```bash\n# Auto-build C project\n./watchrun -w src -e c,h -x \"make clean\" -x \"make\" -x \"./run_tests\"\n\n# Python development with testing\n./watchrun -w . -e py --exclude \"*__pycache__*\" -x \"python -m pytest\"\n\n# Web development\n./watchrun -w assets -e css,js,html -x \"npm run build\" -x \"npm run test\"\n```\n\n### Advanced Patterns\n\n```bash\n# Watch specific patterns only\n./watchrun -w . --include \"src/*.c\" --include \"include/*.h\" -x \"make\"\n\n# Exclude temporary and build files\n./watchrun -w . -e c,h --exclude \"*tmp*\" --exclude \"build/*\" -x \"make\"\n\n# JSON output for integration\n./watchrun -w src -e py -x \"python test.py\" --json --quiet\n```\n\n### Daemon Mode\n\n```bash\n# Run in background\n./watchrun -c ~/.watchrunrc --daemon\n\n# With systemd (Linux)\nsudo systemctl enable watchrun@user.service\nsudo systemctl start watchrun@user.service\n```\n\n## Build Options\n\n### Standard Build\n```bash\nmake                # Build release version\nmake debug          # Build with debug symbols\nmake dev            # Build with sanitizers\n```\n\n### Cross-Platform\n```bash\nmake windows        # Cross-compile for Windows (requires MinGW)\n```\n\n### Installation\n```bash\nmake install              # Install to /usr/local/bin (Unix)\nmake install-termux      # Install to $PREFIX/bin (Termux)\nmake uninstall-termux    # Remove from $PREFIX/bin (Termux)\nmake uninstall            # Remove from system\n```\n\n### Development\n```bash\nmake format         # Format code (requires clang-format)\nmake analyze        # Static analysis (requires cppcheck) \nmake test           # Run basic tests\nmake package        # Create distribution package\n```\n\n## Contributing\n\n1. Fork repository\n2. Create feature branch (`git checkout -b feature/amazing-feature`)\n3. Commit changes (`git commit -am 'Add amazing feature'`)\n4. Push branch (`git push origin feature/amazing-feature`)\n5. Create Pull Request\n\n## License\n```\nMIT License\n\nCopyright (c) 2025 DitzDev\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditzdev%2Fwatchrun","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fditzdev%2Fwatchrun","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fditzdev%2Fwatchrun/lists"}