A quiet period after the last change (default 300ms) turns a burst of saves into one run.
stye is a lightweight CLI that watches files and folders and re-runs a command when something changes </> built on native Node.js.
Point stye at a path, tell it what to run. Bursts of saves are debounced into a single run; output streams live with colours, and every run ends with its exit code and duration.
npm i -g @oxaccolades/styeRequires Node.js 18+ · one dependency: chalk · MIT
A simulated stye session. Save files, change the options and watch how debounce, filters and run modes behave. The command updates as you go.
Watching, debouncing, glob matching and process-tree control are implemented in the repo itself — no chokidar, no magic.
A quiet period after the last change (default 300ms) turns a burst of saves into one run.
Native recursive watching, with a built-in directory walker for Node 18 on Linux that follows created and deleted folders.
Supports *, **, ?, [abc], [!abc] and {a,b}. Ignore always wins. Sane defaults skip node_modules and .git.
SIGTERM, then SIGKILL, applied to the whole process tree — taskkill /T on Windows.
Keep settings in a JSON file or in package.json. CLI flags override per key.
Rerun now, clear screen, quit. Friendly one-line errors instead of stack traces.
Pick what happens when a change lands mid-run with --mode.
Kills the previous run and everything it spawned. Best for servers and dev tools.
Leaves a running command alone; changes meanwhile trigger exactly one more run. Best for builds and tests.
Each change starts a new run right away, without waiting.
Keep your settings in stye.config.json or under a "stye" key
in package.json. CLI flags override the file per key.
{
"watch": ["src", "tests"],
"command": "npm test",
"ext": ["ts"],
"ignore": ["src/generated", "*.snap"],
"debounce": 200,
"mode": "queue"
}
One install, one command. Node.js 18 or newer.
npm i -g @oxaccolades/stye