TSX(1)

πŸ“¦ version 4.22.4, in ubuntu stonking

πŸ’… 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. ✨
  • --tsconfig string β€” lets you specify a custom tsconfig.json path 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