logoalt Hacker News

slowin • today at 5:56 PM • 7 replies • view on HN

I don't understand why this is written in Typescript. This is a great example of how agents can write code (I'm sure they wrote `cf`), yet having fundamental computer science knowledge is still critical. Do not force your users to manage the dependencies of your cli. Do write your cli in a compiled language. Understand the reason for those decisions and tell your agents to use the correct architecture.


Replies

geodel • today at 7:44 PM

No it is exactly right mode for modern tech companies:

1) If it runs on my dime and my infrastructure I will optimize the hell out using most cleverly written Rust and what not and gloat about engineering prowess.

2) If it runs on users computers well then, we have carefully evaluated our strategic direction and come to conclusion that JS/TS/Electron option is the best way to go.

➕ show 1 reply
tcdent • today at 6:52 PM

My read is that it's generally the teams that have been assigned to build a certain product that end up choosing the architecture that it runs on. So when we see TypeScript involved in TUI and CLI applications, most of it is just a repurposing of skill sets from that domain into the terminal. In an organization like Cloudflare, I expect that the developers who don't specialize in TypeScript are working on far more important problems.

cush • today at 8:36 PM

Seriously there’s zero benefit to be writing CLIs in typescript in 2026

kelchm • today at 6:24 PM

Are you really suggesting that the choice to use Typescript wasn't a deliberate one?

IMO -- it makes total sense within the existing Cloudflare tooling ecosystem.

➕ show 2 replies
forty • today at 8:51 PM

There is no more code, there are only specs, apparently. So I guess it's a typescript spec so your agent can generate its own CLI, in optimized native assembly of your local CPU and customized to your needs ? ;)

squiffsquiff • today at 6:55 PM

AWS and GCP CLIs have been in Python for a decade or more. Last I checked Python was not a compiled language

➕ show 3 replies
perching_aix • today at 7:12 PM

"Claude, rewrite this in amd64 and arm64 assembly. Optimize it to the max, and make no mistakes. Oh yeah, formally verify it while there, may as well."

➕ show 1 reply