explaingit

adukecoins/codewatch

13ShellAudience · developerComplexity · 2/5ActiveSetup · moderate

TLDR

File watcher CLI that runs arbitrary commands on changes via YAML config, paired with a separate set of shell scripts that automate unlocking GitHub achievement badges.

Mindmap

mindmap
  root((codewatch))
    Inputs
      Glob patterns
      YAML config
    Outputs
      Triggered commands
      Colored logs
    Use Cases
      Auto run tests on save
      Auto format Python
      Rebuild SCSS
      Unlock GitHub badges
    Tech Stack
      Shell
      Node
      Python
      YAML

Things people build with this

USE CASE 1

Re-run npm test automatically whenever files in src change

USE CASE 2

Trigger the black formatter every time a Python file is saved

USE CASE 3

Reload a long-running service when its config directory changes

USE CASE 4

Run the bundled scripts to unlock GitHub badges like Pull Shark and Quickdraw

Tech stack

ShellNodePythonYAML

Getting it running

Difficulty · moderate Time to first run · 30min

Several README links point to a placeholder username and the watcher source is not shown, so clone and inspect before relying on it.

In plain English

The codewatch repository describes a file watcher that runs custom scripts automatically when source files change. The README compares it to nodemon and says it works with any language or tool. Example commands show watching a src directory and triggering npm test on change, watching Python files and running the black formatter, or watching a config directory and running a reload script. The listed features include glob pattern matching, debounced triggers so a single change does not fire the script many times, any command as the handler, configuration through a YAML file, colored output with timestamps, recursive directory watching, and multiple watch patterns at the same time. A sample codewatch.yml in the README shows named watchers for running tests, linting Python files, and rebuilding SCSS to CSS, each with its own watch glob, command, and debounce delay in milliseconds. Installation instructions tell the reader to clone the repo, run a setup script, and then link the tool globally with npm link or pip install in editable mode. The project structure section lists a watcher.js and an achievement-tracker.js under src, GitHub Actions workflows for CI and releases, a devcontainer config, and a CONTRIBUTING file. Alongside the file watcher, the README documents a separate set of shell scripts grouped under GitHub Achievement Scripts. These include quickdraw, yolo, publicist, pull-shark, and pair-extraordinaire, plus an interactive unlock-all menu and a tracker that prints progress. Each script is named after a GitHub user achievement badge. The contributing section ends by saying that every merged pull request helps unlock the Pull Shark badge. The README is short and does not show the contents of watcher.js or the actual code for the watcher logic. Several of the badge image links and the clone URL point at a placeholder GitHub username rather than the real owner of this repository.

Copy-paste prompts

Prompt 1
Give me a codewatch.yml that watches src for ts changes and runs npm test with a 500ms debounce
Prompt 2
Walk me through cloning codewatch, running the setup script, and linking it globally with npm link
Prompt 3
Explain how the debounce delay works in codewatch and why it matters for save bursts
Prompt 4
Show me how the unlock-all script in codewatch chains the individual GitHub achievement scripts
Prompt 5
How do I add a third watcher that rebuilds SCSS to CSS on change in codewatch.yml
Open on GitHub → Explain another repo

Generated 2026-05-22 · Model: sonnet-4-6 · Verify against the repo before relying on details.