ts-node

TypeScript execution engine and REPL for Node.js that runs .ts files directly, without a separate compile step.

Tool
npm
v10.9.2
13,129stars
MIT License

Repository Health

Pre-computed score based on development activity, maintenance, community, maturity, and trend momentum.How we score it →
52/100Fair
Development Activity0
Maintenance44
Community64
Maturity60
Momentum40

Technical Analysis

AI-assessed by reading the actual repository — architecture, code quality, innovation, and documentation.How we score it →
86/100Excellent
Architecture80
Code Quality88
Innovation82
Learning Curve95

ts-node is a TypeScript execution engine and REPL for Node.js. It hooks into Node’s module loading system (CommonJS require and the native ESM loader) so .ts, .mts, and .cts files are compiled on the fly during import instead of requiring a separate tsc build step, while @cspotcode/source-map-support rewrites stack traces back to the original TypeScript source lines.

It supports both fully typechecked and transpile-only execution modes, can delegate compilation to third-party transpilers like SWC for faster builds on large codebases, and ships CLI binaries (ts-node, ts-node-esm, ts-node-cwd, ts-node-transpile-only) alongside a programmatic register() API that other tools embed to add TypeScript support to their own runtimes.

What You Get

  • Zero-config ts-node script.ts execution that reads the nearest tsconfig.json automatically
  • An interactive TypeScript REPL with support for awaiting top-level expressions
  • CommonJS and native ESM loader hooks (--esm, ts-node-esm) for both module systems
  • Pluggable transpiler support (SWC) for faster, typecheck-free builds
  • A programmatic register() API for embedding TypeScript support into other tools (Mocha, AVA, Gulp)

Common Use Cases

  • Running TypeScript scripts and CLIs without a separate compile step
  • Powering test runners (Mocha, AVA, Tape) that need on-the-fly TypeScript support
  • Local development workflows paired with a watch/restart tool like nodemon
  • REPL-driven prototyping of TypeScript snippets

Under The Hood

Architecture The CLI entry points (bin.ts, bin-esm.ts, bin-cwd.ts, bin-transpile.ts) delegate to a register() function in index.ts that builds a Service object encapsulating compiler state; module-loading hooks in cjs-resolve-hooks.ts and esm.ts monkey-patch Node’s Module._extensions and the experimental ESM loader to intercept TypeScript files, while resolver-functions.ts, node-resolver-functions.ts, and file-extensions.ts centralize path and extension resolution. configuration.ts reads tsconfig.json and instantiates either the real TypeScript compiler or a pluggable transpiler through a shared Transpiler interface (transpilers/types), and dist-raw/ vendors small chunks of Node’s own internal module-loading source so ts-node stays compatible across Node versions without reimplementing them from scratch. Dependency injection happens via factory functions that close over shared service state rather than a container. If the core Transpiler abstraction changed shape, both the default TypeScript path and the SWC path would need to move together.

Tech Stack Written entirely in TypeScript, built with tsc into dist/. Runtime dependencies are deliberately minimal: @cspotcode/source-map-support for stack-trace remapping, arg for CLI parsing, make-error for a typed TSError base class, acorn/acorn-walk for detecting top-level await in the REPL, and v8-compile-cache-lib for caching compiled output. typescript, @swc/core/@swc/wasm, and @types/node are peer dependencies rather than bundled, letting consumers control their own compiler version. Tooling includes Yarn workspaces, api-extractor for public API surface reports, dprint for formatting/linting, and a justfile for common tasks; CI runs via GitHub Actions across multiple Node and TypeScript version combinations plus a dedicated workflow that installs the package straight from git.

Code Quality Tests live in src/test/*.spec.ts (22 spec files) run through AVA, with nyc producing coverage reports uploaded to Codecov, and a dedicated test-style-guide.md documenting conventions for writing new tests. Errors are typed through a TSError/BaseError hierarchy rather than thrown as bare strings, and the codebase carries a notably high ratio of explanatory comments and TSDoc annotations relative to its size. Formatting and style are enforced by dprint check in CI, and api-extractor guards against unintentional public API changes.

API Design Getting started requires only installing the package and running ts-node file.ts — no configuration file is mandatory, and existing tsconfig.json settings are picked up automatically. Bin aliases (ts-node-esm, ts-node-cwd, ts-node-transpile-only) mirror their corresponding CLI flags one-to-one, keeping the surface predictable, and opt-in complexity (custom compilers, transpile-only mode, module-type overrides) is exposed through clearly named, independently documented options rather than one large configuration blob. Documentation is unusually thorough for a dev-tool package: a generated README plus a separate Docusaurus site under website/docs covering configuration, performance, troubleshooting, and recipes for third-party tool integration.

Used by 119 apps in this directory

TypeScript
76%
AGPL 3.0

Abby

Developer Tools · Product Management

166

Statically typed feature flags, remote config, and A/B testing with framework-native SDKs for TypeScript teams.

View details
30
Repo Health
70
Technical
63
Dependency
Built with
TypeScript76%
MDX18%
Updated 1 years ago
TypeScript
99%
Other

Activepieces

Automation · AI Assistants

24,298

Open-source AI automation platform that converts 280+ workflow integrations into MCP servers for LLMs, with no-code builders and TypeScript extensibility.

View details
92
Repo Health
85
Technical
64
Dependency
Built with
TypeScript99%
Updated today
TypeScript
60%
Other

agenta

Developer Tools · Devops · AI Development

4,706

The open-source LLMOps platform unifying prompt engineering, evaluation, and observability for teams building reliable LLM applications.

View details
91
Repo Health
77
Technical
67
Dependency
Built with
TypeScript60%
Python38%
Updated yesterday
TypeScript
95%
Apache 2.0

AionUi

AI Agents · Productivity

32,622

Free, open-source Cowork desktop app that unifies Claude Code, Codex, Gemini CLI, and 20+ AI agents into a single platform with multi-agent teams, 24/7 cron automation, and zero-config built-in agent.

View details
87
Repo Health
76
Technical
66
Dependency
Built with
TypeScript95%
Updated 5 days ago
TypeScript
72%
AGPL 3.0

APITable

Low Code Platforms · Databases

15,588

API-first collaborative spreadsheet-database platform that auto-generates REST APIs and lets teams build internal tools, CRMs, and dashboards without code.

View details
74
Repo Health
77
Technical
60
Dependency
Built with
TypeScript72%
Java22%
Updated yesterday
TypeScript
96%
Other

Amplication

Developer Tools · AI Code Assistants · Automation

16,011

Create production-ready backend services with your organization's standards baked in — generating NestJS, Prisma, and GraphQL code that you own and control.

View details
60
Repo Health
84
Technical
60
Dependency
Built with
TypeScript96%
Updated 2 months ago
JavaScript
95%
MIT

AnythingLLM

Developer Tools · Automation · AI Assistants

65,696

The all-in-one AI platform for private document chat, no-code agents, and local LLMs with zero setup friction.

View details
90
Repo Health
78
Technical
64
Dependency
Built with
JavaScript95%
Updated 3 days ago
TypeScript
68%
Apache 2.0

Appsmith

Developer Tools · Automation · No Code Platforms

40,825

Open-source low-code platform to build admin panels, dashboards, and internal tools connected to any database or API.

View details
93
Repo Health
79
Technical
66
Dependency
Built with
TypeScript68%
Java21%
Updated 3 days ago
Go
85%
Apache 2.0

Argo Workflows

Devops · Data Engineering

16,956

The most popular Kubernetes-native workflow engine for orchestrating containerized DAGs, ML pipelines, CI/CD, and parallel batch jobs at scale.

View details
96
Repo Health
90
Technical
67
Dependency
Built with
Go85%
TypeScript11%
Updated yesterday

Join founders buildingwith open source

Opinionated takes, migration guides, cost-saving tips, and insights from the open source ecosystem.

Subscribe on Substack
Join 750+ subscribers

Search