gitmyhub

tsx

TypeScript ★ 12k updated 21d ago

⚡️ TypeScript Execute | The easiest way to run TypeScript in Node.js

tsx lets you run TypeScript files directly in Node.js without a separate compile step, just install it and point it at your file and it runs.

TypeScriptNode.jsesbuildnpmsetup: easycomplexity 1/5

tsx, short for TypeScript Execute, is a command-line tool that lets you run TypeScript files directly in Node.js without a separate compilation step. TypeScript is a version of JavaScript that adds type annotations, and normally you have to convert it to plain JavaScript before Node.js can run it. tsx handles that conversion automatically in the background using esbuild, a fast build tool, so you can just point tsx at a TypeScript file and it runs.

The main appeal is simplicity. Rather than setting up a build pipeline with separate configuration files, you install tsx and run your files immediately. It supports ES modules, a modern JavaScript module format, and includes a watch mode that reruns your code automatically when you save changes.

The project is available as an npm package, which is the standard distribution system for JavaScript and TypeScript tools. Documentation is hosted at tsx.hirok.io and includes a getting-started guide.

The README in this repository is minimal and points to the documentation site for full details. The project is maintained by an independent developer and is supported by sponsors listed on the project page.

Where it fits