tsx CLI
The CLI runs TypeScript files in Node.js without a separate build step for agent-prepared scripts and local utilities.
- 12,181 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- The CLI executes supplied JavaScript or TypeScript with Node.js permissions; watch mode may repeat its side effects.
Install
In your terminal, with SkillFoxx CLI
npx skillfoxx add cli/tsxDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- The CLI executes supplied JavaScript or TypeScript with Node.js permissions; watch mode may repeat its side effects.
This is third-party code. Review the repository files before installing.
What it does
tsx runs a supplied TypeScript file in Node.js without a separate build step. An agent can prepare a data-processing script, local utility or error reproduction for a user to inspect before execution. Installation can stay within one project’s development dependencies. Reusable commands belong in package.json scripts. Watch mode reruns the script after relevant file changes, reducing manual restarts during edits. Type checking remains a separate step.
Who it is for. TypeScript script authors delegating small utilities to an agent and running reviewed code locally.
Good fit when
- An agent wrote a TypeScript utility ready for review and execution.
- Local debugging needs reruns after dependency edits.
- A project needs a data-processing command without a separate build task.
- A small Node.js example should reproduce an error.
Not a fit when
- A successful run must prove the absence of type errors.
- The script is untrusted and needs a security sandbox.
- The application relies on unsupported TypeScript transformation behavior.
Example request
Prepare a small TypeScript JSON-reading script, show its code and tsx command, and add type checking as a separate step.Limitations
tsx does not type-check, so add a separate TypeScript validation step to the project workflow. It uses esbuild transformations and shares limitations including unsupported `emitDecoratorMetadata`. Watch mode excludes dependency, build and hidden directories by default; include additional required files explicitly. The executed script has Node.js process permissions and can change files or use the network, so inspect agent-prepared code first.
How to disable. Stop tsx, including watch mode. Remove related project scripts when uninstalling the dependency; completed script actions are not undone.
FAQ
How do I try it without a project installation?
Use `npx tsx ./script.ts` with your reviewed file.
Does execution check types?
No. Use a separate command such as `tsc --noEmit`.
How do I watch for changes?
After installation, use `tsx watch ./file.ts`.
Can I manually rerun in watch mode?
Yes. Press `Return`.
How do I retain previous output on rerun?
Set `--clear-screen=false`.
Discussion
No questions or reviews yet.
Related
CLI toolsTwo skills for the tsdown bundler: setting up TypeScript library builds and migrating a project from tsup
An agent skill with TypeScript conventions: types, discriminated unions, functions, naming, source layout, React and tests, loaded per topic
The CLI runs several commands in one terminal and labels their output so users can distinguish processes in agent workflows.
A coding agent for the terminal and desktop: it does not count "done" without tests or a diff and works with DeepSeek, GLM, Kimi, Claude, Codex and Gemini
A structure linter for TypeScript projects: checks against konsistent.json which files, folders and exports every package must have
A Rust CLI for TypeScript and JavaScript: dead code, duplicates, cycles, complexity and architecture boundaries from one graph, plus MCP and skills
README in short
A maintained Node.js version is required. A custom tsconfig path can be supplied explicitly.