TSX(1)
π tsx β bestie edition π
okay so this is TSX(1), part of User Commands, and it's genuinely one of my favorite little tools ever. sit down, grab a strawberry π, and let me put you on.
β¨ NAME β¨
tsx β a Node.js runtime that's been enhanced with esbuild, so it can load your TypeScript & ESM files like it's literally nothing. no cap.
π¦ SYNOPSIS π¦
tsx [flags...] [script path]
tsx command
πΈ DESCRIPTION πΈ
so here's the tea, bestie: tsx is a Node.js runtime enhanced with esbuild, and what that means for you is that it enables direct execution of TypeScript and ESM (ECMAScript Module) files β and it does it without a separate compilation step. no build watcher, no tsc in another tab, no "wait did I rebuild?" panic. it just runs. it's giving main character energy honestly. ππ
π COMMANDS π
watchβ runs the script and watches for changes. the second your script or any of its dependencies get modified, it automatically restarts the process. yes fr fr, it's obsessed with keeping you up to date. π₯
π FLAGS π
-h,--helpβ shows the help information and then exits. your little "what do I do now" bestie. π«Ά--no-cacheβ disables caching of compiled files. turn it off, live your truth. β¨--tsconfigstring β lets you specify a customtsconfig.jsonpath to use instead of the default one. your config, your rules. π-v,--versionβ shows the current version and exits. quick lil vibe check. π
π EXAMPLES π
run a TypeScript file, easy peasy:
tsx script.ts
run a file and watch for changes (my personal fave, so cozy):
tsx watch script.ts
run with a custom tsconfig, because sometimes you have options:
tsx --tsconfig ./tsconfig.prod.json script.ts
π SEE ALSO π
node(1), ts-node(1) β go say hi to the cousins, they're sweet I promise. π§
and that's the whole page, gorgeous. this was tsx, dated 2026-05-05, from the TSX(1) era of the manual. slay, periodt, go run something. ππ₯π
π¦ where this page comes from
- ubuntu stonking: tsx 4.22.4+repack+~cs7.26.1-1 Β· MIT
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms