Save a file.
Run your command.
Every time.

Get started▸ Read the docs
Change detected 300msdebounce window Run modes restart · queue · concurrent ↑ Process treeSIGTERM → SIGKILL

stye is a lightweight CLI that watches files and folders and re-runs a command when something changes </> built on native Node.js.

1runtime dependency
300msdefault debounce
3run modes
18+Node.js

One command. Zero config.

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/stye

Requires Node.js 18+ · one dependency: chalk · MIT

Try it, right here

A simulated stye session. Save files, change the options and watch how debounce, filters and run modes behave. The command updates as you go.

Files click to save one

Options

idle
debounce
gray lines only appear with --verbose

Built from the ground up

Watching, debouncing, glob matching and process-tree control are implemented in the repo itself — no chokidar, no magic.

--debounceDebounced runs

A quiet period after the last change (default 300ms) turns a burst of saves into one run.

--fallbackRecursive everywhere

Native recursive watching, with a built-in directory walker for Node 18 on Linux that follows created and deleted folders.

-e, --include, --ignoreGlob filters

Supports *, **, ?, [abc], [!abc] and {a,b}. Ignore always wins. Sane defaults skip node_modules and .git.

--kill-timeoutClean process control

SIGTERM, then SIGKILL, applied to the whole process tree — taskkill /T on Windows.

stye.config.jsonConfig file

Keep settings in a JSON file or in package.json. CLI flags override per key.

r · c · qInteractive keys

Rerun now, clear screen, quit. Friendly one-line errors instead of stack traces.

Three ways to run

Pick what happens when a change lands mid-run with --mode.

restartStop and start fresh

Kills the previous run and everything it spawned. Best for servers and dev tools.

queueFinish, then once more

Leaves a running command alone; changes meanwhile trigger exactly one more run. Best for builds and tests.

concurrentEvery change, immediately

Each change starts a new run right away, without waiting.

Set it once, then just type stye

Keep your settings in stye.config.json or under a "stye" key in package.json. CLI flags override the file per key.

Config reference
{
  "watch": ["src", "tests"],
  "command": "npm test",
  "ext": ["ts"],
  "ignore": ["src/generated", "*.snap"],
  "debounce": 200,
  "mode": "queue"
}

Stop re-running things by hand.

One install, one command. Node.js 18 or newer.

npm i -g @oxaccolades/stye
Read the docs