{"id":25165,"library":"dev-refresh","title":"dev-refresh","description":"Dev-refresh is a CLI utility that watches directories for changes, runs a command (e.g., bundler or transpiler) on change, and automatically reloads the browser. If the command fails, the error message is displayed on the page, and the page is not reloaded. Current stable version: 1.2.1. Release cadence: low, with infrequent updates. It supports serving local files or proxying to an existing server. Differentiators: lightweight, no build step required, inline error display. Not for production use.","status":"active","version":"1.2.1","language":"javascript","source_language":"en","source_url":"https://github.com/mortie/dev-refresh","tags":["javascript"],"install":[{"cmd":"npm install dev-refresh","lang":"bash","label":"npm"},{"cmd":"yarn add dev-refresh","lang":"bash","label":"yarn"},{"cmd":"pnpm add dev-refresh","lang":"bash","label":"pnpm"}],"dependencies":[],"imports":[{"note":"CLI tool; not imported as a library. It is not a CommonJS/E SM module.","wrong":"npm install -g dev-refresh && dev-refresh","symbol":"dev-refresh (CLI)","correct":"npx dev-refresh --serve public"},{"note":"Add to package.json scripts; run with npm run watch.","wrong":"","symbol":"npm script usage","correct":"{\"scripts\": {\"watch\": \"dev-refresh --serve public --cmd 'npm run build' src\"}}"}],"quickstart":{"code":"npx dev-refresh --serve . --cmd 'echo changed && ls' .","lang":"javascript","description":"Watch current directory, serve its files on default port, run echo and ls on change, reload browser."},"warnings":[{"fix":"Use single quotes for commands with spaces or special characters.","message":"The --cmd option runs in the shell, so ensure proper escaping of arguments.","severity":"gotcha","affected_versions":">=0.0.0"},{"fix":"Do not expose dev-refresh to the public internet.","message":"Dev-refresh is not intended for production use; it serves files with auto-reload, which can be a security risk.","severity":"gotcha","affected_versions":">=0.0.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Ensure the directory path provided to dev-refresh exists.","cause":"The watched directory does not exist.","error":"Error: ENOENT: no such file or directory, stat '...'"},{"fix":"Use the --port option to specify a different port.","cause":"Port 8080 is already in use by another process.","error":"Error: listen EADDRINUSE :::8080"}],"ecosystem":"npm","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}