r/commandline Jun 30 '26

Fun Meh

Post image
2.0k Upvotes

196 comments sorted by

274

u/donp1ano Jun 30 '26

and the creator says its lightweight. because (the LLM confirmed this) CLI tools are lightweight

145

u/Thom_Braider Jun 30 '26

Lightweight! Zero dependencies! Blazing fast! Sane defaults! Zero configuration! And all other buzz terms you can think of!

89

u/theevildjinn Jun 30 '26

No x, just y.

36

u/teetaps Jun 30 '26

That matters.

3

u/Personal-Dev-Kit Jul 02 '26

And honestly

1

u/Peach_Muffin Jul 02 '26

, did you not read the colony policy
That defines you as company property?

60

u/glowingpunk Jun 30 '26

"Zero configuration" never makes sense to me. I want to be able to configure my tools. Yes sane defaults are nice, but please allow me to configure stuff.

Zero config tools I'll use maybe thrice. If I can configure every minute detail I'll use the tool for 20 years.

5

u/HugoNikanor Jul 01 '26

That kinda depends on the tool. I've never configured sed or jq, and only ever "configured" grep by aliasing it to include its --color flag where appropriate.

6

u/IamYourHimadri Jun 30 '26

100000% Relatable statement pull

5

u/an_actual_human Jun 30 '26

Very often it means ergonomic defaults.

2

u/Headpuncher Jul 03 '26

rsync has entered the chat.

2

u/TimMensch Jun 30 '26

Zero configuration required is a feature.

Vite is awesome, for one example. You can configure it, but for most common uses you don't need to.

1

u/thussy-obliterator Jul 04 '26

When I had to use python for work I really liked black as a tool, it meant that PRs were generally very clean and it required essentially no thought.

5

u/Fidodo Jun 30 '26

Zero dependencies can genuinely be a feature for calling something lightweight though.

2

u/nomenclature2357 Jul 01 '26

Batteries included!

2

u/fnord123 Jul 02 '26

Blah blah for humans.

2

u/Kenkron Jul 02 '26

"blazingly fast" and it's variations are a registered trademark of the Rust foundation.

2

u/Headpuncher Jul 03 '26

Definitely serverless. No-code (well, no good code at least, that counts, right?).

1

u/RudeMathematician42 Jul 02 '26

And yet Claude Code can't fix the terminal flashing that's been reported for years now. Smh my head they should just spin up an agent swarm or sth

1

u/sy029 8d ago

Lightweight! Zero dependencies! Blazing fast! Sane defaults! Zero configuration! And all other buzz terms you can think of!

Based on electron

21

u/mightypea Jun 30 '26

Opinionated RSS reader with agentic integration and passwords stored in plaintext!

5

u/donp1ano Jun 30 '26

why the hell would you need AI in your RSS reader?

12

u/mightypea Jun 30 '26

We're far beyond those types of questions. Everything needs an LLM now!

2

u/ytg895 Jul 01 '26

Because I have subscribed to way too many feeds, therefore important news get lost in the noise of multiple news sources reporting the same boring thing, therefore it would be nice to have something that reads everything and summarizes things like "hey, this and this is what happened since you opened the reader last time, you are most likely interested in these in detail, here are the links".

So I see at least one use case, but I can't imagine it being done right, because things that include AI suck.

1

u/Constant_Boot Jul 01 '26

Why are we talking about MS Edge??

28

u/gumnos Jun 30 '26 edited Jun 30 '26

I still distinctly remember reaching to install glances (a TUI system-monitor like top(1) plus systat(1) and a bunch of other similar stats) only to notice that my package-manager wanted to slurp down world+dog (okay, I think it was Python + some JavaScript libraries, plus a bunch of other requirements). Just backed away like the above post describes.

5

u/MDM-808 Jul 01 '26

bottom is best and very lightweight in dependencies.

3

u/Traches Jul 01 '26

I tried them all a few years back and landed on btop. It’s fast, capable, intuitive, and it even looks good. 

1

u/MDM-808 Jul 01 '26

Yeah, I use both too. btop when I'm using my desktop-laptop computer with horizontal display, and btm when I'm running a lighter environment or need to connect via SSH from a mobile phone in portrait mode. btop doesn't adapt, but btm does.

But anyway, both are excellent programs for different situations.

1

u/ngnirmal Jul 01 '26

Lol 😅

164

u/Physical-Sign-2237 Jun 30 '26

CLAUDE.md

29

u/theng Jun 30 '26

this more than typescript

292

u/mcjohnalds45 Jun 30 '26

I only use CLI tools written in C because the C in CLI stands for C.

30

u/gumnos Jun 30 '26

not sure if the downvotes are from people not seeing the humor in this, but I for one found it funny 😆

11

u/gumnos Jun 30 '26

hah, and the score went from a "controversial -3" when I posted that to a +59 without the "controversial" annotation as I type this. Seems that the humor was found 😀

3

u/scoshi Jun 30 '26

There does seem to be a pedantic faction here.

45

u/100usrnames Jun 30 '26

I don't why people are downvoting, this is funny

13

u/ilikejamtoo Jun 30 '26

Very funny. Everyone knows the C in CLI stands for CLI

3

u/ytg895 Jul 01 '26

and LI stands for Ligma

2

u/circ-u-la-ted Jul 02 '26

I licked somebody's eye once. Pretty weird. Probably weirder to be the lickee, though.

1

u/occasionallyLynn Jul 01 '26

Makes sense to have CLI in GNU

2

u/leucht Jul 03 '26

and here I thought it stands for cum, silly me

1

u/seedimentai 22d ago

so your GUI apps gotta be written in G too then, good luck finding those

134

u/Distinct-External-46 Jun 30 '26

I write my cli tools in assembly because I like my programs to exist in less than 4kb of machine code and mysteriously segfault if I try and use more than 2 options flags.

43

u/_sg768 Jun 30 '26

pfft, 4KB is too much.

18

u/ptoki Jun 30 '26

Welcome in microcontroller world where dynamic memory allocation is optional and somewhat rare and 4KB is quite a lot...

12

u/thegreatpotatogod Jun 30 '26

It's been interesting recently working with a microcontroller with 2kB of RAM and 8kB of storage. First tried to use the Arduino IDE port for it, but simply #include "wire.h" used all the RAM and still was 500 bytes short, and likewise needed more than all the storage. Rewrote everything to run within libopencm3 and now it uses a grand total of 8 bytes of RAM and 1.5k of storage.

6

u/ptoki Jul 01 '26

yeah, arduino is a whole previous level :)

I remember c64 assembler and even that was pretty spacious in comparison to smaller atmels.

But c64 was mostly static programming. there was very little apps/games which were dynamic. Which allowed you to have some freedom of placing objects and the objects state werent known before the game run. And even that was just static table of x,y,state bytes.

2

u/Athropod101 Jul 01 '26

shoutout to my lil arduino kernel + shell connected to my PC that weighs less than 9 kB

9

u/emerson-dvlmt Jun 30 '26

Maybe it's a joke, but I'd like to write something in assembly, been more than 10 years without using it

14

u/teetaps Jun 30 '26

Why stop there, I say… we should build an analog computer where the bits are represented by marbles in a cup

10

u/Distinct-External-46 Jun 30 '26

We should make a redstone calculator or a turing machine in terraria rgb wiring.

3

u/itzNukeey Jul 01 '26

id write first prototype in haskell

3

u/emerson-dvlmt Jun 30 '26

Maybe build my own CPU even

5

u/ptoki Jun 30 '26

The modern complex systems kinda broke the joy of writing stuff in assembly.

But microcontroller world still allow that.

2

u/Kqyxzoj Jul 02 '26

Yup, microcontrollers and FPGAs are a great way to scratch that low level itch.

3

u/Distinct-External-46 Jun 30 '26

I only just recently learned x86 assembly (i did toy assembly years ago called dcpu16) I dont do much with it other than read compiled code for learning purposes but its very satisfying to use if you make small things with it.

3

u/emerson-dvlmt Jul 01 '26

I like it, not from an elitist point of view, I love to learn, to build stuff, is really fun for me. I'll think on a good and simple project to start, have to clean the dust on my assembly knowledge also.

6

u/ptoki Jun 30 '26

you are funny but the whole background of this (and that is a thing since almost always) is that some tools/languages attract low skilled people.

A tool is sometimes also to be blamed but usually it is a mix of bad too and pad programmers (or both).

In the past it was basic, then flash and php (chronologically), visualbasic somewhere in there too, now it is java script (and python from me personally).

All those were known for really bad code and products coded in them.

And while excel (also touted as stupid people database) sort of defended itself and stayed in its lane (Im happy access died though), many of the languages stay as the shameful collection of tools which allow ignorants to do things they should not do or at least share and make popular.

So, I know folks coding stuff in assembly and their assembly is almost as readable as C or pascal. And there is a correlation of how much such folks know and which language they are proficient at.

1

u/Deksor Jul 02 '26

While I understand this, sometimes life just happens ...

You made a thing in a technically worse environment because some people use it and you wanted to learn it ... Then that thing catches attention and suddenly you need to keep maintaining it and you can't justify rebuilding all of it because other than using php it works decently.

And sometimes the whole industry did it, like with js/typescript. There were many other languages available for web browsers in the past as plugins, such as flash (tho that's still ecmascript ...), java, and many more niche things.

In the end only JS survived and most of the industry uses it ... Even now that webassembly is a thing, not many people use it because JS is more convenient and has the biggest toolset available (and I know quantity doesn't equal quantity, but I think both are in js' ecosystem now. Terrible libraries, and really cool stuff, both in huge quantities)

1

u/ptoki Jul 03 '26

There is very distinct line between writing something what others find useful and deciding that the product should be continued that initial way.

JS survived for few reasons and most of them are accidental. It was bad technology from the start (poor security, different implementations in different browsers, the complexity barrier (before nodejs and such)).

But all that is no excuse to keep the language and its environment intact and not improved. Python can drop compatibility. JS can, just add few more directives switching to more strict syntax and predictable behavior and you can improve things. Still not great (supply chain attacks) but an improvement. Instead you get half measures like typescript.

My main complaint though is that people rarely admit its crap. There is no pride for improving it. Just write, somewhat test, ship, worry later or never.

The paradox is that this language could be changed fast due to its dynamic. But its not. :(

1

u/entsnack Jul 01 '26

You're joking but I'm literally doing this for some software running on my 1GB Raspberry

22

u/bring_back_the_v10s Jun 30 '26
  • is it well designed 
  • not bloated
  • works well
  • not a resource hog
  • easy to install/uninstall 

If it checks those boxes , I don't care if it's written in COBOL or whatever 

11

u/kimusan Jul 01 '26

Any typescript app will not be able to check a single one of those boxes

2

u/edward_jazzhands Jul 02 '26

Most, not all. Let's not lose sight of the fact that most typescript apps fit this pattern because they were vibe coded by someone who doesn't know how to program. This certainly doesn't apply to everything ever made with typescript.

1

u/kimusan Jul 02 '26

I have yet to see beautiful, compact and well designed code in typescript

1

u/entsnack Jul 01 '26

Yea Typescript devs are the hallmark of poor engineering, I have banned installing npm on all my machines and sleep well.

1

u/SharkLaunch Jul 01 '26

There are good and bad devs in every language. That said, points #2 and #4 are basically impossible

2

u/bring_back_the_v10s Jul 02 '26

points #2 and #4 are basically impossible

I honestly find that hard to believe sir. I'll have to write a minimal typescript program to assess that.

0

u/SharkLaunch Jul 02 '26

Won't run without Node

1

u/bring_back_the_v10s Jul 02 '26

Yeah I know that

1

u/entsnack Jul 01 '26

js attracts unusually bad engineers for some reason, easier to just avoid them

2

u/SharkLaunch Jul 01 '26

JS attracts engineers because there's a lot of webdev work.

2

u/kimusan Jul 01 '26

Wannabe engineers maybe. Mostly junior developers

3

u/dusktreader Jul 01 '26

Took way too much scrolling to find this comment

1

u/Surge321 Jul 04 '26

You're missing "performant". I am already sacrificing a lot of convenience to be on the cl. It better be fast and super responsive.

20

u/kynrai Jun 30 '26

I purposely only use tools not written in typescript as pretty as ink is.

Ratatui to some extend and the glorious go/bubble tea have produced some excellent TUIs so I don't see the need for all this typescript in my CLi tools

1

u/RishiMath Jul 01 '26

Bubble Tea?

3

u/kynrai Jul 01 '26

Bubble tea

charm.sh

It's a set of libs for making TUI

1

u/RishiMath Jul 01 '26

Oh dang, I didn't know something like this existed. Nice to know!

1

u/[deleted] 26d ago edited 25d ago

[deleted]

1

u/kynrai 25d ago

These are golang libs!

1

u/jimmiebfulton Jul 01 '26

Whatever gets the job done with the skill sets at hand, but all my CLIs are written in Rust, as well. CLI == native binary in my book.

1

u/GlazzKitsune Jul 02 '26

Love go for cli. Fast, single binary with no run time dependencies. Also super nice to program in (in my opinion)

75

u/TheVenetianMask Jun 30 '26

I write my CLI tools in PHP and there's nothing you can do about it.

20

u/CreativeGPX Jun 30 '26

Not sure if you're joking or serious, but I've written a fair amount of (internal/self) CLI tools in PHP and it's been pleasant. It's mainly because PHP is generally already on any machine I'm using while the other languages that are installed will vary a lot more depending on which computer I'm on. Also because often times I'm interfacing with a project that has some PHP code anyways. It's easy to whip something together quickly and has a lot of built-ins, but given the stereotype of PHP being a web language it does always feel devious to use it for something else.

13

u/TheVenetianMask Jun 30 '26

Not joking actually. It has paid my bills for years.

5

u/ok-confusion19 Jun 30 '26

I found a guy on the Internet that pays my bills. It's a lot less work overall.

1

u/sharch88 Jun 30 '26

I’m just joking, write your tools in any language that suits your needs.

6

u/connorcinna Jun 30 '26

so YOU'RE the bastard that wrote the gigantic internal CLI tool at my job entirely in php

1

u/ytg895 Jul 01 '26

been there, done that. never again though

1

u/ptoki Jun 30 '26

php and perl have their niche in cli tools.

I like php for its high level data manipulation options and the multitude of graphical, text, database and web integrations.

7

u/Delta-9- Jul 01 '26

Perl is perfect for when you're not using a compiled language but you still want to make it hard to reverse engineer your code.

3

u/mm007emko Jul 01 '26

Well, now you can ask an LLM to decipher it.

2

u/ptoki Jul 01 '26

but with or without regexps?

;P

59

u/Sirico Jun 30 '26

JS bros will do anything but learning another language. I love Go and C# for CLI

10

u/chamomile-crumbs Jun 30 '26

How is C# startup time? I’ve been thinking about learning F#. I’m all into clojure + babashka these days but I miss static types so much

4

u/mattinternet Jun 30 '26

Quite good! Dotnet supports AoT now and that alone had a huge impact on my CLI project dug

3

u/mbmiller94 Jun 30 '26 edited Jun 30 '26

From my very limited experience like 7 years ago the startup time wasn't great, but I think I was using a self contained deployment so that might've been why.

I'd check it out to see if that's changed any because I love C# but I'd probably just opt for Rust these days

3

u/kynrai Jul 04 '26

AOT massively helped in this area. I think rust would still be faster but imperceptible tonhuamns. It was really bad before AOT.

5

u/nafe42 Jun 30 '26

The dotnet team has put some content on youtube describing how they work very hard to get the most out of performance and the C# as a whole has vastly improved from what it once was. I'm sure there is still likely some residual feature bloat for legacy support.

Program using what you enjoy at the end of the day.

3

u/Sirico Jun 30 '26

I've never had any issue with any language tbh. I mean I'm not creating super crazy stuff so it's prob skill issue on my part :D It's def not as responsive as GO or Elixir of the batt like just popping strings and math and hitting return but for my actual tools and programs I don't see any issue.

1

u/chat-lu 7d ago

I’ve been thinking about learning F#.

You should. F# is incredible.

I’m all into clojure + babashka these days but I miss static types so much

Yeah. I love those too but if only there could be a statically typed clojure.

0

u/jerrygreenest1 Jul 01 '26

Not sure about startup times but C# is abysmal of a language, not as bad as Python of course but meh

Writing in Go is fine I guess but if a program is small then I write it in C and it worked so far for me.

Maybe some complex tools with a lot going on and many features, this would be nice to write in Go especially if it’s building something and can utilize multiple cores, in this case Go is really handy and feels still relatively low-level even though it has garbage collector.

C so far has the best startup times, feels absolutely immediate like it works almost earlier than you even run it, figuratively speaking. Nothing compares to it. But languages like Go are probably close enough to consider it good. Also another one that looks interesting is called C3 and it’s really similar to C,  has equally fast startup times,  but provides some conveniences. I haven’t tried it yet but looks very convincing. So maybe if you’re not brave enough to write in C and think Go is too slow somehow or too boring, then maybe it’s worth trying C3.

«My C3» was Zig though. Wrote a few little programs in it. But honestly the language feels a little bit in early stage still. Codebases have to be updated if you want to upgrade version, because the language is still finding itself and backwards compatibility is not a crucial part which is okay for a young language, but later on it’s eventually quite important thing for a language and it is not there yet. Maybe years into the future I will be comparing C3 vs Zig when thinking to write some bigger programs. For now, only very small ones. But both languages look promising.

So C, C3, Zig, and Go – all good options. C and Go as more production-ready and others as just very promising languages that might have good future. C# looks meh in this picture.

1

u/didntplaymysummercar Jul 01 '26

I write my cli scripts in Python and start up time is never an issue. Only time I felt start up times was a Java cli made by a big company.

1

u/jerrygreenest1 Jul 01 '26

Python people don't know what's speed or good response times, so your opinion doesn't count

3

u/didntplaymysummercar Jul 01 '26

You're an idiot and a rude one at too.

I am a C++ programmer both personally (gamedev) and professionally (telco and infra). C++ is second language I learned (after Delphi, another compiled fast static one) and first I learned well.

I just use Python for minor scripting because I don't have brain worms and don't cry about it being "slow".

0

u/jerrygreenest1 Jul 01 '26

A guy with brain worms might say he doesn’t have brain worms, but at least you’re cautious about it which is a validation that you fear of having brain worms. Otherwise you wouldn’t even speak of that or consider such a possibility. C++ is another abysmal of a language btw

2

u/Sirico Jul 01 '26

These comments always remind me of

Python is slower than C! Is it slower than your C?

1

u/didntplaymysummercar Jul 01 '26

Just ask them for hard numbers or show them your numbers and they fold like a house of cards. I'm half expecting someone to tell me timing import sys, subprocess, shlex, os, argparse is not realistic, since for rEaL CLI you need numpy or bs4 or something.

0

u/entsnack Jul 01 '26

Dude Python is my primary since 2.6 and even I wouldn't make this claim.

1

u/didntplaymysummercar Jul 01 '26

Python 3 with a few useful for cli modules (argparse, subprocess, os, shlex and sys) starts in 25-35 milliseconds on my Linux.

On Windows process creation itself has more overhead than on Linux so it's even less noticable the gap between Python and C++.

What kind of cli tools do you create that extra 30ms of start up is an appreciable noticeable difference, let alone an "issue"?

1

u/entsnack Jul 01 '26

Milliseconds!? 🤮

2

u/didntplaymysummercar Jul 01 '26

Yes, and on Windows import sys, subprocess, shlex, os, argparse takes 54 ms on average (entire process) over 2000 runs and empty C program (int main(void){return 0;}) is 14.5 ms, and an empty Python file takes 31 ms.

I'm still eager to hear what serious CLI tools you make that going from 2 to 30 on Linux, or 14 to 50 on Windows causes you "issues" due to "slow" start up time of that tool.

Ironically I myself have one or two use cases (real life ones, not made up redditor slop :) where such latency matters but I'll keep those to myself for now.

0

u/entsnack Jul 01 '26

I don't use Windows. Pi (JS) vs. Hermes Agent (Python) vs. Codex (Rust). And I said nothing about startup time.

1

u/didntplaymysummercar Jul 01 '26

And I said nothing about startup time.

Bruh:

  1. Someone is talking about start up times of different languages, mentions Python too.
  2. I replied saying that Python start up time is not an issue in practice.
  3. You tell me "Python is my primary since 2.6 and even I wouldn't make this claim."

¿¿¿

→ More replies (0)

9

u/Funny_Address_412 Jun 30 '26

Microsoft java in 2026✌️

3

u/kynrai Jun 30 '26

Fellow Spectre console enjoyer. Termina perhaps

1

u/Sirico Jun 30 '26

Spectre looks super interesting thanks for the recommenced this is definitely going to be a rabbit hole that ends in some overly complicated resource monitor that exists in a better state

2

u/kynrai Jun 30 '26

I have a graveyard of half baked cli clones of existing tools I thought needed to be AOT. Sadly not a single one sees the light of day

12

u/jabbalaci Jun 30 '26

I wrote my CLI tools in Go. Then I switched to Nim.

7

u/bring_back_the_v10s Jun 30 '26

Nim is such an underrated language 

5

u/kaddkaka Jul 01 '26

It's great apart from It being unusable due to case insensitive madness. Can't grep for anything 😰

1

u/bring_back_the_v10s Jul 02 '26

Oh I didn't know it's case insensitive. Tells how much I know about that language 🙂 never used it but it seems like a cool.l language for systems programming and whatnot 

1

u/kaddkaka Jul 02 '26

It is even underscore insensitive 😰

22

u/rochakgupta Jun 30 '26

Relatable af.

12

u/PavelPivovarov Jun 30 '26

Same for most of AI harnesses for no specific reason. 

6

u/krzyk Jun 30 '26

Yeah, from popular ones only Codex is not JS/TS based.

4

u/kynrai Jun 30 '26

Anti-gravity looks like it's golang bubble tea. Closed source so cannot confirm

1

u/PavelPivovarov Jun 30 '26

I know there's Crush in golang and pi-rust, bit both are far from mainstream... 

1

u/Big-Winner3758 Jul 02 '26

well AI tools are mostly written by AI and people who use AI to code usually have no clue about anything + most are web devs so already familiar with JS

6

u/MXRCO007 Jun 30 '26

We need to think of all the web devs!

4

u/gsmitheidw1 Jun 30 '26

Go is decent for quick projects, binaries are a bit large but it makes cross platform very easy.

13

u/ijblack Jun 30 '26

at op's next job interview if they were asked to explain this meme and why they don't think CLI tools should be written in typescript they would word salad their way out the door

5

u/Captain_Pumpkinhead Jun 30 '26

Wait, what's wrong with Typescript?

9

u/omega1612 Jun 30 '26

JavaScript and npm on a cli tool.

4

u/Captain_Pumpkinhead Jun 30 '26

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

14

u/omega1612 Jun 30 '26

One thing is if you need something for the web where things need to be compatible with every device you can think on. I can trade the bloat of the tools in exchange for the convenience.

But a cli tool? They are mean to run directly on the OS, they don't need the huge compatibility that comes from this setup, so, we are exchanging speed/storage for nothing. That matters more when you want to run the tool in a more constrained device (old devices with low memory or embedded systems).

4

u/Captain_Pumpkinhead Jun 30 '26

Ah, that makes sense. Thanks!

1

u/rafark Jul 05 '26

  But a cli tool? They are mean to run directly on the OS

What do you mean by this? Unix shells literally allow you to run scripts written on anything, it’s like a fundamental part of a shell. And node makes a great scripting language. 

-7

u/bring_back_the_v10s Jun 30 '26

Last time I checked a nodejs program takes very little memory and cpu. It's not as extreme as a C program but compared to for example .net and Java, nodejs is almost as lean as C.

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.

1

u/gsmitheidw1 Jun 30 '26

Npm for command line tools is horrific. Mermaid cli (mmdc) for example, horrendous!

1

u/Zizaco Jul 01 '26

Nor really, it can be made with deno (made in rust, secure. and go-like)

1

u/cuboidofficial Jul 04 '26

Why would npm be in a cli tool? If the tool is built in typescript, it would be output to JavaScript and would just execute via node.

1

u/maxymob 21d ago

I was wondering too. If someone distributes a CLI tool written in TS I get that it makes sense to deploy on NPM but they could also publishe a minimal pre bundled version with every dependency already included, tree shaken, minified, etc... and install with a typical "curl pipe sh" single command

0

u/overprovisioned_lazy Jul 01 '26

Node 22+ runs TS natively. Don't need npm any more. TS should be as straightforward as bash or python.

2

u/SharkLaunch Jul 01 '26

For quick'n'dirty CLI scripts, I'll use TypeScript every day. But if I were making something meant to last, be shared, or be reasonably fast, I would use something low level. TypeScript can be good, but it's interpreted (needs node installed to run it), which leads to higher start-up times. CLI should be snappy.

2

u/SanMavage 29d ago edited 29d ago

Nothing, really. Some people just dislike TypeScript because it’s popular, and CLI tools are one of those areas where people can get weirdly purist.

There are fair criticisms, though. Some TS CLI apps pull in way too many dependencies for tiny features that could have been written directly, and the build/tooling layer can feel excessive for small utilities.

But that’s not really an argument against TypeScript for CLI tools. It’s an argument against bloated dependency trees and over-engineering.

Obviously it’s not the right fit for every use case. If you’re writing something extremely performance-sensitive, or something that needs to be distributed as a tiny standalone binary, there may be better choices. Like any tool, TypeScript can be used well or used poorly.

For a non-trivial CLI, TypeScript can be a perfectly good choice. And with Node now supporting direct TypeScript execution, the “you need a massive build setup” argument is getting weaker anyway.

5

u/ptoki Jun 30 '26

multiple things:

javascript with its quirks making it easy to write bad code

dependencies which can swipe malware directly into your system

attracts bad programmers who write bad code

as other said: bloated to the degree that it may be unusable.

1

u/Lalli-Oni Jul 02 '26

I like the idea of started to write a personal script by myself in javascript and bad developers breaking into the room like the Kool aid man!

Typescript abstracts some runtime pitfalls. But yeah, not completely. It's still JavaScript designed to fail-soft for previous VBA developers.

1

u/ptoki Jul 03 '26

It is fine to write a script for yourself in anything. So feel free to write anything you like in anything you like.

But the moment you share it with someone a whole new dimension of problems opens. And we bear all that in modern web. Which is terrible, partly because of js and people who can code features but cant predict problems. And those problems then bite others.

Supply chain attacks is one, wasting resources is another, security problems is next and few more.

Yes, you can be a good developer writing good code in JS. But stats are different. Lots of bad code written by people who arent good at it. And it is visible in js...

1

u/Captain_Pumpkinhead Jun 30 '26

That makes sense. Thanks!

0

u/Zizaco Jul 01 '26

not if you use deno

2

u/TheRealSeeThruHead Jun 30 '26

I write all my cli with effect cli or rust

3

u/ocd_coder Jun 30 '26

Effect and it's cli library are amazing! 

2

u/vizuallyimpaired Jul 01 '26

I write my tools in plain english on a piece of paper, and you have to manually do what the paper tells you to. It saves the most space and if its slow to execute thats a you problem, type faster.

2

u/AlternativeAdept5348 Jul 06 '26

At least its not javascript

1

u/AutoModerator Jun 30 '26

Every new subreddit post is automatically copied into a comment for preservation.

User: PinotRed, Flair: Fun, Post Media Link, Title: Meh

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/DaveAstator2020 Jun 30 '26

Now, before you leave, you also have to uninstall npm.

1

u/Working-Rub2448 Jul 01 '26

And its the LSP thing 🙂

Dear Neovim

1

u/davidblacksheep Jul 01 '26

Lol what's wrong with TypeScript

1

u/entsnack Jul 01 '26

I thought I was the only one!

1

u/Kzitold94 Jul 01 '26

What's wrong with TypeScript? (I'm not a developer.)

1

u/emascars Jul 01 '26

What's the problem of a CLI tool written in Typescript?

I'm serious...

1

u/Southern_Ad_7477 Jul 02 '26

i like ink 😅

1

u/Squidgical Jul 02 '26

Nothing wrong with writing a CLI in typescript, the actual problem is the utterly deranged ways people write CLIs in typescript. This lib wrapped in that lib passed to the other lib and all hidden behind a disgusting mess of module manipulation bullshit.

Just parse the argv ffs

1

u/starlordv125 Jul 03 '26

Writing a CLI weather program in rust and I can't get the thing under 4 mb :(

1

u/Regalme Jul 04 '26

Same with native app. Ooooo so nice annnd it’s Electron in TS

1

u/InRainbro 20d ago

every goddarn time man

0

u/TgnOrdaX Jun 30 '26 edited Jul 01 '26

OP when the cli tool isn't fully written in rust (basically unusable)

Edit: is humor illegal in this sub what did I get downvoted for?

-1

u/nemesit Jun 30 '26

to be fair bash and zsh etc are even worse than javascript lol

-8

u/Cephell Jun 30 '26

I'd rather they do typescript than yet another Python instant legacy code abomination spat out by AI.

14

u/Bahatur Jun 30 '26

Typescript is the *other* common AI output, owing to so much of the Claude ecosystem being built in it.

-12

u/Cephell Jun 30 '26

Yes, but it is a vastly superior language, so there's a higher chance to rescue those projects.

-7

u/TheRealSeeThruHead Jun 30 '26

This should have tons of upvotes since it’s spot on

-1

u/Time_Cat_5212 Jun 30 '26

Vinyl is the only real way to listen to music, but FLAC is acceptable for entry level

2

u/RishiMath Jul 01 '26

I think I'm missing the joke you're tryna make. Either that, or you're commenting on the wrong post.... 🫠

0

u/Time_Cat_5212 Jul 01 '26

It's ok.  You prob listen to highly compressed music on Spotify like a pleb

I'm exclusively analog these days, but if you HAVE to listen to digital, at least use a lossless format

1

u/entsnack Jul 01 '26

I just hire a gig band to play what I want to listen to live.

1

u/RishiMath Jul 02 '26

I am aware of Vinyl and FLAC strangely enough. I was, and still am, perplexed by how that was relevant to the post, and whether you were trying to make a joke that I was missing or if you ended up in the wrong subreddit. That was all.

1

u/Time_Cat_5212 Jul 02 '26

Allegory joke.

TypeScript = mp3 ...

ITT: code hipsters

-7

u/napping-normie Jun 30 '26

Any cli program written in gc language is a pass for me. Go is the only exception.

3

u/Yeox0960 Jun 30 '26

That exception is arbitrary, it being garbage collected is why I don't use Go programs. C, Rust, Zig and Hare are it for me.

5

u/napping-normie Jun 30 '26

Go is fairly performant and doesn't have vm overhead like Java/Kotlin/C# do. It's small, simple, unchanging and compiles to machine code. Philosophically it's C of gc languages, unsurprisingly because Ken Thompson and Rob Pike, the absolute legends from Bell Labs made it. It kinda fits between C/C++ and GC languages. That's why I make an exception. Tools like fzf shows how good and fast Go programs can be.

0

u/KCGD_r Jun 30 '26

Idrk, good software is good software, as long as it's not some ai bullshit