We are releasing cf, our new command-line tool that mirrors the entire Cloudflare API and supports programmatic TypeScript configuration. We are also open-sourcing Forge, our internal SDK generator.

169 points•macleos•2 days ago•85 comments•

85 comments

slowin2 days ago
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.
geodel2 days ago
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.

gobdovan2 days ago
There's also a (maybe more minor but still interesting) explanation. On a server, you know quite precisely your load and you want to be able to causally trace bottlenecks, which is simpler with AOT compiled programs. On users' machines, they may not give you full telemetry and may use your system in quite variable ways. So V8 comes in quite nicely and optimises hot paths on workload it observes on each users system.
cschmatzler2 days ago
This is also not correct in this case since they recently rewrote the Artifacts backend from Zig to TypeScript.
tcdent2 days ago
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.
kelchm2 days ago
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.

slowin2 days ago
Whether it was deliberate or not, I do not think it's a good choice. When agents can write in any language, there's no reason to pick the wrong tool for the job. At this point Javascript/Typescript belongs only in the browser. It's the suboptimal choice for every other environment. Especially for a command line tool. Even if the back-end is written in Typescript (also not the best choice imho), the clients need not be in the same language.
xtajv2 days ago
Code should be written for the user.
cush2 days ago
Seriously there’s zero benefit to be writing CLIs in typescript in 2026
forty2 days ago
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 ? ;)
emadabdulrahim2 days ago
It's crazy that some of the best product launches nowadays are CLIs.
fallinditch2 days ago
Agreed. Cloudlflare appear to be innovating really well.
hackernud3s2 days ago
It can do everything except make the token to give it permissions. For that you need to dig through their website to find the tokens section. Oh and they change where that lives every week.
sunaookami1 day ago
And the Cloudflare dashboard is soooo slooooow and logging in takes an eternity, using Passkeys often just doesn't work ("not tied to a specific account"???) and the loging in button takes forever to be clickable because of some bot checks running in the background.
jumploops2 days ago
As bad as the AWS console UX is, at least it’s mostly additive/unchanging over time.

I frequently hit strange UI bugs with Cloudflare workers, where I need to do a hard refresh to make things right.

recroad2 days ago
This is cool, but I've never had an issue with agents working on Cloudflare by just making REST calls. With the rest docs, it knows pretty much everything about what kind of operations it can do. Is the CLI a subset of that or does in encompass everything?
artdigital2 days ago
Yes I am doing that too. I have a separate folder called ai/cloudflare. the AGENTS.md references the cf docs and instructs the agent to leave a change log + write down learnings whenever it does something

It’s now so good that I cd into this folder and say things like “add this and that to this configuration” and the agent immediately knows how to do it

I’m guessing cf just wraps the API into a CLI that’s easier to traverse and explore

verdverm2 days ago
The actual title is

> Introducing cf: the agentic CLI for the entire Cloudflare API

emphasis my own to highlight the key word missing in the HN title

alasano2 days ago
I don't know what it is about wrangler that made me dislike it so much but I welcome this change since it's meant to replace wrangler.
george_max2 days ago
It feels heavy, the emojis are overused, and it is probably the only CLI tool I've felt as "clunky". Maybe that and Claude Code TUI.
verdverm2 days ago
re: wrangler, my biggest gripe was inconsistency between dev and prod
alasano2 days ago
I think I may be confusing my annoyance with pages vs workers and agents that kept deploying to pages due to outdated training data.

Wrangler still didn't feel great to use.

Read the full thread on Hacker News →

Related stories