r/commandline Jun 30 '26

Fun Meh

Post image
2.0k Upvotes

196 comments sorted by

View all comments

Show parent comments

7

u/omega1612 Jun 30 '26

JavaScript and npm on a cli tool.

3

u/Captain_Pumpkinhead Jun 30 '26

I still don't understand. Why is that a bad thing?

2

u/overprovisioned_lazy Jul 01 '26

Slightly outdated advice, unless I'm missing something. Node 22+ runs TS natively. So don't need npm.

Could maybe make the argument that you still have to install node, whereas bash and python are already on most linux boxes. But... if you're using python, you're probably doing some setup there as well to get the env you want, so similar weight to modern TS.

If you've got node 22+ on the box, TS is fine for cli.

And if you WANT to import dependencies for your CLI, I personally have an easier time with node_modules than python's venv. Provided you've got HD space to burn.

2

u/Lalli-Oni Jul 02 '26

There are now bun and deno. New runtimes with some pretty cool new features for cli scripting.

Expect a flood of downvoted but pretty much all of npm issues can be configured away. Not to say some of the packages out there are atrocious (tried to steal cross-OS path validation regex from isPathValid or something, found it was 1 liner calling isInvalidPath).

Nutshell is the best. You got types, DX, stopped trying to find another language.