ts-node-dev
Restarts your TypeScript app on file changes without full recompilation
Repository Health
Technical Analysis
ts-node-dev is a CLI that combines ts-node’s on-the-fly TypeScript compilation with nodemon-style file watching and process restarting, while reusing the TypeScript compiler instance across restarts so type-checking isn’t redone from scratch on every change. Running ts-node-dev (or its tsnd alias) in place of ts-node gives a fast development loop for Node.js TypeScript apps.
It supports options like --respawn to keep the watcher alive after a fatal error, --deps to also watch changed dependencies, --transpile-only to skip type-checking for even faster restarts, and standard ts-node compiler flags, making it a common dev script dependency in Node/TypeScript projects before native watch modes became widespread.
What You Get
- A
ts-node-dev/tsndCLI binary that wrapsts-nodewith file-watching and automatic process restarts - A cached TypeScript compiler instance shared across restarts, avoiding a full recompile/type-check on every file change
- Flags like
--respawn(keep watching after a crash),--deps(watch changed dependencies too), and--transpile-only(skip type-checking for faster restarts) - Compatibility with standard
ts-node/tsconfig.jsoncompiler options, so existing TypeScript configuration is respected
Common Use Cases
- Running a Node.js/Express/API server in development with automatic restarts on source file changes
- Speeding up local iteration on TypeScript backend code compared to a plain
ts-node+nodemoncombination - Watching both application source and its local dependencies (via
--deps) in a monorepo-style backend setup - Keeping a dev server alive across uncaught exceptions during active development via
--respawn
Under The Hood
Architecture — The CLI entry point (src/bin.ts) parses arguments via minimist and spawns a wrapped Node process (src/wrap.ts) that installs a ts-node-based require hook (src/child-require-hook.ts, src/hook.ts) so TypeScript files are compiled on demand; a chokidar-backed watcher (referenced from src/index.ts) tracks file changes and triggers tree-kill-based process restarts communicated over src/ipc.ts, while src/compiler.ts caches the underlying TypeScript program across restarts to avoid full recompilation. Tech Stack — Node.js/TypeScript CLI built on ts-node for compilation, chokidar for cross-platform file watching, resolve/tsconfig for module and config resolution, tree-kill for reliably terminating child process trees, and dynamic-dedupe to avoid duplicate module instances across restarts. Code Quality — The src/ directory (~1,480 lines across 14 focused modules) separates concerns cleanly (watching, compiling, IPC, logging, resolving), and test/tsnd.test.ts plus a test/fixture directory exercise the CLI end-to-end with Mocha; however the GitHub repository is now archived with no commits since 2024, meaning newer TypeScript/Node versions receive no further compatibility fixes. API Design — Usage is a drop-in CLI replacement for ts-node (ts-node-dev ./src/index.ts instead of ts-node ./src/index.ts), requiring no code changes and only a handful of documented flags, which kept its adoption curve low even as the project stopped receiving updates.
Used by 6 apps in this directory
ai-toolkit
AI Development · AI Design Tools
An all-in-one open-source training suite for finetuning diffusion models—FLUX, SDXL, Wan video, and audio—on consumer GPU hardware via CLI or web UI.
Dittofeed
Marketing · Automation
Open-source omni-channel customer engagement platform for automating transactional and marketing messages via email, SMS, WhatsApp, Slack, and mobile push.
Hoppscotch
Developer Tools
A lightweight, offline-capable API development ecosystem for testing HTTP, GraphQL, WebSocket, MQTT, and SSE endpoints across web, desktop, and CLI.
Huly Platform
Project Management · Team Chat · Collaboration
Open-source all-in-one workspace that replaces Linear, Jira, Slack, and Notion for product and engineering teams.
NocoBase
No Code Platforms · Low Code Platforms
Open-source AI + no-code platform that lets coding agents and people collaborate to build business systems fast on proven infrastructure.
Omnivore
Knowledge Management · Bookmarks Archiving · Note Taking
Self-hosted read-it-later platform with highlights, newsletters, PDFs, and seamless Obsidian and Logseq integration.