tsx

TypeScript and ESM runtime enhancement for Node.js using esbuild. tsx (TypeScript Execute) is ts-node's faster replacement — uses esbuild for near-instant TypeScript transpilation without type-checking. Supports TypeScript, TSX/JSX, and ESM/CommonJS interop. Significantly faster startup than ts-node because it skips type checking. Ideal for scripts and tools where speed matters.

Evaluated Mar 06, 2026 (0d ago) v4+
Homepage ↗ Repo ↗ Developer Tools typescript node executor esbuild fast scripts
⚙ Agent Friendliness
68
/ 100
Can an agent use this?
🔒 Security
90
/ 100
Is it safe for agents?
⚡ Reliability
85
/ 100
Does it work consistently?

Score Breakdown

⚙ Agent Friendliness

MCP Quality
--
Documentation
88
Error Messages
82
Auth Simplicity
100
Rate Limits
100

🔒 Security

TLS Enforcement
90
Auth Strength
90
Scope Granularity
90
Dep. Hygiene
88
Secret Handling
90

Local execution only. esbuild transpiler has excellent security track record. No telemetry.

⚡ Reliability

Uptime/SLA
88
Version Stability
85
Breaking Changes
82
Error Recovery
85
AF Security Reliability

Best When

You need fast TypeScript script execution without type-checking overhead — tsx is the modern replacement for ts-node in most use cases.

Avoid When

You need type-checking during execution (use ts-node with type checking enabled) or production deployment (compile to JavaScript).

Use Cases

  • Run TypeScript scripts with instant startup: tsx script.ts — 10-50x faster than ts-node for frequently-run scripts
  • Execute TypeScript in watch mode for development: tsx watch server.ts — auto-restarts on file changes
  • Use as Node.js --loader for loading TypeScript modules without compilation in development and CI
  • Run TypeScript test files and scripts in CI where type-checking is handled separately by tsc --noEmit
  • Replace ts-node in package.json scripts for faster developer experience: 'start': 'tsx src/index.ts'

Not For

  • Type checking — tsx transpiles only, no type checking; run tsc separately for type validation
  • Production runtime — transpile to JavaScript for production deployments; tsx is a development/scripting tool
  • Complex TypeScript decorator metadata — tsx uses esbuild which has limited decorator metadata support

Interface

REST API
No
GraphQL
No
gRPC
No
MCP Server
No
SDK
No
Webhooks
No

Authentication

Methods: none
OAuth: No Scopes: No

No authentication — local runtime tool.

Pricing

Model: open_source
Free tier: Yes
Requires CC: No

MIT-licensed open source tool.

Agent Metadata

Pagination
none
Idempotent
Full
Retry Guidance
Not documented

Known Gotchas

  • tsx does not type-check — TypeScript type errors are silently ignored; run tsc --noEmit separately for type checking in CI
  • Decorator metadata (emitDecoratorMetadata) is not fully supported — TypeGraphQL, TypeORM, and libraries requiring metadata reflection may not work correctly
  • ESM and CommonJS interop requires care — tsx handles most cases but circular dependencies with mixed module formats can cause unexpected resolution issues
  • tsconfig paths are resolved via tsconfig.json — tsx reads tsconfig.json automatically from the project root; non-standard tsconfig locations require --tsconfig flag
  • tsx watch mode (tsx watch file.ts) restarts the whole process on change — not hot module replacement; stateful applications lose state on reload
  • tsx is a Node.js enhancer — it cannot be used for browser TypeScript execution; browser-targeted code should use Vite, esbuild, or similar bundlers

Alternatives

Full Evaluation Report

Detailed scoring breakdown, competitive positioning, security analysis, and improvement recommendations for tsx.

$99

Scores are editorial opinions as of 2026-03-06.

5208
Packages Evaluated
26151
Need Evaluation
173
Need Re-evaluation
Community Powered