Spaces:
Sleeping
Sleeping
File size: 1,648 Bytes
980dc8d |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
---
title: "JavaScript tools: npx"
original_url: "https://tds.s-anand.net/#/npx?id=javascript-tools-npx"
downloaded_at: "2025-06-08T23:21:38.208039"
---
[JavaScript tools: npx](#/npx?id=javascript-tools-npx)
------------------------------------------------------
[npx](https://docs.npmjs.com/cli/v8/commands/npx) is a command-line tool that comes with npm (Node Package Manager) and allows you to execute npm package binaries and run one-off commands without installing them globally. It’s essential for modern JavaScript development and data science workflows.
For data scientists, npx is useful when:
* Running JavaScript-based data visualization tools
* Converting notebooks and documents
* Testing and formatting code
* Running development servers
Here are common npx commands:
```
# Run a package without installing
npx http-server . # Start a local web server
npx prettier --write . # Format code or docs
npx eslint . # Lint JavaScript
npx typescript-node script.ts # Run TypeScript directly
npx esbuild app.js # Bundle JavaScript
npx jsdoc . # Generate JavaScript docs
# Run specific versions
npx prettier@3.2 --write . # Use prettier 3.2
# Execute remote scripts (use with caution!)
npx github:user/repo # Run from GitHubCopy to clipboardErrorCopied
```
Watch this introduction to npx (6 min):
[](https://youtu.be/55WaAoZV_tQ)
[Previous
Python tools: uv](#/uv)
[Next
Unicode](#/unicode) |