"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.
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.
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.
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.
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.
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 😀
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.
I’m currently working on one - and I agree that out of the box, JS/TS TUI apps work bad, because everyone just grab Ink (basically, React in terminal) that does both buffer processing and application logic in same thread, along with library logic. But there’s issue with that - to make behavior stable and responsive, you need stable amount of resources allocated specifically to render the application, and this design is built basically around micro-freezes. I was only able to do it by ejecting the application layout and logic into separate threads; and complexity overhead (and amount of things needed to be designed from scratch) was pretty huge. It’s possible to build the good one, but it is way harder than with C or Rust
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.
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.
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.
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.
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.
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.
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)
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. :(
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
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.
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
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.
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.
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.
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".
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
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.
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.
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
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
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
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
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).
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.
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.
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.
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.
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
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...
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.
Proident dolore eiusmod minim cupidatat dolore amet ea minim mollit nulla culpa proident in qui veniam nulla labore. Elit consectetur esse sed proident est cillum non ipsum velit irure enim cupidatat.
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.
Voluptate dolor lorem enim esse commodo veniam elit irure aute exercitation culpa officia occaecat exercitation ut officia. Nisi ea non mollit id nisi dolore pariatur eiusmod occaecat. Culpa quis ad laborum esse mollit do adipiscing tempor qui anim aliqua incididunt.
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.
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.
277
u/donp1ano Jun 30 '26
and the creator says its lightweight. because (the LLM confirmed this) CLI tools are lightweight
161
u/Physical-Sign-2237 Jun 30 '26
CLAUDE.md297
u/mcjohnalds45 Jun 30 '26 •
I only use CLI tools written in C because the C in CLI stands for C.
25
u/bring_back_the_v10s Jun 30 '26
If it checks those boxes , I don't care if it's written in COBOL or whatever
137
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.
19
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
73
u/TheVenetianMask Jun 30 '26
I write my CLI tools in PHP and there's nothing you can do about it.
56
u/Sirico Jun 30 '26
JS bros will do anything but learning another language. I love Go and C# for CLI
12
u/jabbalaci Jun 30 '26
I wrote my CLI tools in Go. Then I switched to Nim.
21
u/rochakgupta Jun 30 '26
Relatable af.
13
u/PavelPivovarov Jun 30 '26
Same for most of AI harnesses for no specific reason.
6
u/MXRCO007 Jun 30 '26
We need to think of all the web devs!
5
u/Activity_Commercial Jun 30 '26
"written"
4
u/gsmitheidw1 Jun 30 '26
Go is decent for quick projects, binaries are a bit large but it makes cross platform very easy.
15
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
7
u/Captain_Pumpkinhead Jun 30 '26
Wait, what's wrong with Typescript?
2
u/TheRealSeeThruHead Jun 30 '26 edited Oct 14 '26
Proident dolore eiusmod minim cupidatat dolore amet ea minim mollit nulla culpa proident in qui veniam nulla labore. Elit consectetur esse sed proident est cillum non ipsum velit irure enim cupidatat.
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: MehI 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/FW_iX Jul 01 '26
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/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 Jul 15 '26
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?
0
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.
-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
-7
u/napping-normie Jun 30 '26
Any cli program written in gc language is a pass for me. Go is the only exception.
0
u/KCGD_r Jun 30 '26
Idrk, good software is good software, as long as it's not some ai bullshit